AnsweredAssumed Answered

How to modify labels bound to markers in google maps

Question asked by kedingt on Jun 1, 2016

I've recently started working on a project involving google maps with a custom html file, which has several hundred markers which I must label by ID. Because the built in marker label only works for one character, I added a custom label to display the marker number underneath. The problem at the moment is that I have the markers set to hide at a certain zoom level, but the labels will not disappear, and instead just cluster together. Does anyone know a way to bind the visibility settings? The only way that I've been able to make the label disappear is to set the visibility to hidden within the CSS style script.


I've been using this solution: (the second answer) And I've tried using GitHub - googlemaps/js-map-label: A library for creating customized text labels in the Google Maps JavaScript API v3 Which is the new version of MarkerLabel which most sites recommend, but it appears to only work on browsers.