Search For Markers In A Markercluster Group Leaflet-markercluster
I am using Leaflet.markercluster to cluster my markers in my Mapbox Map. The markers are to be populated using a json file. All I need is a search feature which can popup the requi
Solution 1:
Simply iterate through your layer group (like your Marker Cluster Group), e.g. using eachLayer(fn), test against the marker attributes, and if you find your target marker, get the map to zoom and/or pan to it using markercluster zoomToShowLayer(targetMarker) method.
Post a Comment for "Search For Markers In A Markercluster Group Leaflet-markercluster"