Clustering class, to efficiently manage a large number of markers on a map
[Source]
# File lib/mapstraction_plugin/overlay.rb, line 46 46: def initialize(markers = [], options = {}) 47: @mapstraction = mapstraction 48: @options = options 49: @markers = markers 50: end
To add a marker to the Clusterer before hte mapstraction.clusterer_init is called on the clusterer. No effect after…
# File lib/mapstraction_plugin/overlay.rb, line 54 54: def add_marker_init(marker) 55: @markers << marker 56: end
# File lib/mapstraction_plugin/overlay.rb, line 58 58: def create 59: "new Clusterer(#{MappingObject.javascriptify_variable(@markers)},#{MappingObject.javascriptify_variable(@options)})" 60: end
[Validate]