更多功能的导入请直接参考高德开放平台的官方手册https://lbs.amap.com/api/,教程很详细的。
效果预览:
代码展示:
key值的获取在下面。
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<title>地图显示</title>
<style>
/* 设置容器样式,可根据自身需求设置,我这里就直接铺满了 */
html,
body,
#container {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<!-- 为地图创建容器 -->
<div id="container"></div&