javascript - How to update markerClusterer count show on Clusterer using Gmap4Rails in rails -


I have the filter marker based on the code below

  filters = [ 'Office', 'home'] $ .eec (GMAP.map.markers, function (i, marker) {if (filter.lambi and lt; 1) {Gmaps.map.showMarker (marker);} and if (filter Indexoff (Marker .type) & gt; -1) {Gmaps.map.show Marker (Marker);} and {Gmaps.map.hideMarker (Marker);}});  

This code hides that marker, but the clusterer count is not updated on its map.

How to update Clusterer count on the map

Enter image details here </ P> </ div> <p> <div class =

Please try with this code

  handler = Gmaps.build ('Google'); Handler.buildMap ({Provider: {}, Internal: {id: 'map'}}, function () {markers_json = & lt;% = raw @ json.to_json%>; Gmaps.markers = _.map ( Markers_json, function (marker_season) {marker = handler.ad marker (marker_jsan); _extension (marker, marker_jason); return marker;}) handler.bounds.exthanth (GMAPS) markers; handler. Special metatbots ( );});  

Try this code to handle events

  handler.clusterer.clear (); $ .eE (GMAP.markers, Function (I, Marker) {If (filter.lambi and lt; 1) {marker.show (); handler.cluster.edmark (marker)} and if (filter index Type)) & gt; -1) {handler.cluster. Ed marker); Marker.show ();} f {marker.hide (); Handler.cluster .removeMarker (marker);}});  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -