代码拉取完成,页面将自动刷新
<!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">
<style type="text/css">
.friend{
border: solid 1px #669CEE;
color: white;
float: left;
width: 80px;
background-color: #669CEE
}
</style>
<title>Friend Map</title>
<link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css"/>
</head>
<body>
<div id="container"></div>
<script src="https://webapi.amap.com/maps?v=1.3&key=af47cfc3bd61f966cdc587476f007730&callback=init"></script>
<script>
function init(){
var map = new AMap.Map('container', {
center: [116.467689,39.881778],
zoom: 12
});
map.plugin(["AMap.ToolBar"], function() {
map.addControl(new AMap.ToolBar());
});
<!-- friends -->
var content2= '<div class="friend">zhangsan</div>';
marker2 = new AMap.Marker({
position: [116.444189,39.884768],
offset: new AMap.Pixel(0,0),
map: map,
title: 'CTO 18888888888',
content: content2
});
}
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。