Home > Web Front-end > JS Tutorial > How to remove marker overlay on Baidu Maps

How to remove marker overlay on Baidu Maps

php中世界最好的语言
Release: 2018-04-13 10:33:51
Original
4749 people have browsed it

This time I will bring you the method of removing markercovering from Baidumap. What are the precautions for removing marker covering from Baidu Map? , the following is a practical case, let’s take a look.

This article introduces you to the method of removing the marker covering or removing the maker's label text on Baidu Maps. Friends who are interested should come and take a look.

var marker = new BMap.Marker(...);
//方法1
map.removeOverlay(marker);
//方法2
marker.remove(); 
//如果是Marker设置的setLabel还可以设置其样式来隐藏 
mapComponent.state.bikeMarkLabel.setStyle({
  display:"none"
}); 41787
Copy after login

The method of label is the same as that of marker.

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

$.ajax() method how to obtain json data from the server

vue implements shopping cart Detailed explanation of the small ball parabola effect

Detailed explanation of the use of components in Vue.js

The above is the detailed content of How to remove marker overlay on Baidu Maps. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template