关键代码如下:
var bm = new BMap.Map("container");
bm.centerAndZoom(ggPoint, 15);
bm.addControl(new BMap.NavigationControl());
//去除路网
bm.setMapStyle({
styleJson:[
{
"featureType": "road",
"elementType": "all",
"stylers": {
"color": "#ffffff",
"visibility": "off"
}
},
{
"featureType": "building",
"elementType": "all",
"stylers": {
"visibility": "off"
}
},
{
"featureType": "poilabel",
"elementType": "all",
"stylers": {
"visibility": "off"
}
},
{
"featureType": "manmade",
"elementType": "all",
"stylers": {
"visibility": "off"
}
},
]
});
没去掉路网的效果图:
去掉之后效果:
再加上去掉建筑物建筑物名字的图层