<!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 type="text/css">
        html,
        body,
        #container {
            width: 100%;
            height: 100%;
        }
    </style>
    <script src="https://webapi.amap.com/js/marker.js"></script>
    <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=956c7e213563e8c3898836ede49fe212&plugin=AMap.Driving"></script>
</head>
<body>
<div id="container"></div>
<script type="text/javascript">
    var map = new AMap.Map('container', {
        resizeEnable: true, //是否监控地图容器尺寸变化
        zoom:15, //初始化地图层级
        center: ["${lng}","${lat}"] //初始化地图中心点
    });
    var marker = new AMap.Marker({
        position: new AMap.LngLat("${lng}","${lat}"),
        //offset: new AMap.Pixel(-10, -10),
        //icon: '//vdata.amap.com/icons/b18/1/2.png', // 添加 Icon 图标 URL
        title: '${address}'
    });
    marker.setLabel({
        //offset: new AMap.Pixel(20, 20),  //设置文本标注偏移量
        content: "<div>${address}</div>", //设置文本标注内容
        direction: 'top' //设置文本标注方位
    });
    map.add(marker);
</script>
</body>
</html>