<div id="lhwmap" style="width:800px;height:800px;"></div>
JS 部分:
<script type="text/javascript" src="https://webapi.amap.com/maps?v=2.0&key=f301688cccdde2e101fc68571038a9b7"></script>
<script type="text/javascript">
var map = new AMap.Map('lhwmap', {
resizeEnable: true,
zoom: 10,
center: [122.138567,37.424249],
mapStyle: "amap://styles/grey",//可选值 :normal,grey,dark
lang: "zh_en" //可选值:en,zh_en, zh_cn
});
var marker = new AMap.Marker({
position: [122.138567,37.424249],
//icon 默认蓝色,被注释的是红色图标
//icon: "https://webapi.amap.com/theme/v1.3/markers/n/mark_r.png"
});
marker.setMap(map);
var circle = new AMap.Circle({
center: [122.138567,37.424249],
redius: 100,
fillOpacity: 0.1,
fillColor: '#008c87',
strokeColor: '#008c87',
strokeWeight: 1
});
circle.setMap(map);
map.setFitView();
var info = new AMap.InfoWindow({
content: '<div class="content" style="color:#4196ff;"><div class="tac"><img src="/uploads/allimg/181008/1.jpg" /></div>' +'<p><span>地址:</span>山东省山东省山东省山东省山东省</p><p><span>电话:</span>xxxx-xxxxxxx</p><p><span>邮箱:</span>xxxx@163.com</p>',
offset: new AMap.Pixel(0, -28),
size: new AMap.Size(300, 0)
});
info.open(map, marker.getPosition());
AMap.plugin(['AMap.ToolBar','AMap.Scale','AMap.OverView'],function(){
map.addControl(new AMap.ToolBar());
map.addControl(new AMap.Scale());
map.addControl(new AMap.OverView({isOpen:true}));
});
</script>