获取经纬度信息
高德覆盖物的添加与移除
覆盖物的添加与移除-覆盖物与图层管理-示例中心-JS API 示例 | 高德地图API (amap.com)
- 替换右边部分

var map = new AMap.Map('container', {
resizeEnable: true,
zoom:11,
center: [118.778287, 31.972822]
});
// 构造点标记
var marker = new AMap.Marker({
icon: "https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png",
position: [118.778287, 31.972822]
});
// 构造矢量圆形
var circle = new AMap.Circle({
center: new AMap.LngLat("118.778287", "31.972822"), // 圆心位置
radius: 24000, //半径
strokeColor: "#F33", //线颜色
strokeOpacity: 1, //线透明度
strokeWeight: 1, //线粗细度
fillColor: "#ee2200", //填充颜色
fillOpacity: 0.1 //填充透明度
});
- 运行
- 添加Circle