Home > Article > Web Front-end > Baidu Map cancels custom marker overlays
This time I will bring you BaidumapCancel custom markercovering, Baidu MapNotesYes Which ones, the following are practical cases, let’s take a look.
is as follows:
var marker = new BMap.Marker(...); //方法1 map.removeOverlay(marker); //方法2 marker.remove(); //如果是Marker设置的setLabel还可以设置其样式来隐藏 mapComponent.state.bikeMarkLabel.setStyle({ display:"none" }); 41787
The label method is the same as the marker.
It is recommended to use method 1 and method 2. Method 3 is just to hide but not clear
I believe you have mastered the method after reading the case in this article, and there will be more exciting things. Please pay attention to other related articles on php Chinese website!
Recommended reading:
How to develop a WeChat applet to obtain user personal information
Vue2.5 and Element UI component paging function realizes
The above is the detailed content of Baidu Map cancels custom marker overlays. For more information, please follow other related articles on the PHP Chinese website!