开发者

How can i toggle google maps markers?

开发者 https://www.devze.com 2023-01-03 20:31 出处:网络
Is there a way of quickly show/hide of google maps markers? I don\'t want to remove/re-add every time, because I basically need to display them only on mouseover and hide on mouseout.

Is there a way of quickly show/hide of google maps markers?

I don't want to remove/re-add every time, because I basically need to display them only on mouseover and hide on mouseout.

I tried with

marker.hide()

But I kinda get an ugly error because it seems that hide is available on开发者_如何学编程 gmaps2 but not on gmaps3 api.

Thanks!


Does

marker.setVisible(false)

do what you need?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号