Class Ym4r::GmPlugin::GMarkerManager
In: lib/gm_plugin/overlay.rb
Parent: Object

Can be used to implement a clusterer, similar to the clusterer below, except that there is more stuff to manage explicitly byt the programmer (but this is also more flexible). See the README for usage esamples.

Methods

create   new  

Included Modules

MappingObject

Attributes

managed_markers  [RW] 
map  [RW] 
options  [RW] 

Public Class methods

options can be :border_padding, :max_zoom, :track_markers and :managed_markers: managed_markers must be an array of ManagedMarker objects

[Source]

     # File lib/gm_plugin/overlay.rb, line 193
193:       def initialize(map, options = {})
194:         @map = map
195:         @managed_markers = Array(options.delete(:managed_markers)) #[] if nil
196:         @options = options
197:       end

Public Instance methods

[Source]

     # File lib/gm_plugin/overlay.rb, line 199
199:       def create
200:         puts @options.inspect
201:         "addMarkersToManager(new GMarkerManager(#{MappingObject.javascriptify_variable(@map)},#{MappingObject.javascriptify_variable(@options)}),#{MappingObject.javascriptify_variable(@managed_markers)})"
202:       end

[Validate]