百度地图创建删除单个坐标
// 百度地图API功能
var map = new BMap.Map('map');
var poi = new BMap.Point(113.3253,22.81608);
map.centerAndZoom(poi, 14);
map.enableScrollWheelZoom();
addPoint(113.3253,22.81608);
//添加坐标点
function addPoint(x,y){
//自定义坐标点样式
var changeIcon = new BMap.Icon("zb.png",new BMap.Size(30,30),{anchor: new BMap.Size(15, 30)});
var point = new BMap.Point(x, y);
var marker = new BMap.Marker(point,{icon:changeIcon});
map.addOverlay(marker);
}
删除坐标点
function delPoint(marker){
map.removeOverlay(marker);
}