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

A GOverlay representing a group of GMarkers. The GMarkers can be identified with an id, which can be used to show the info window of a specific marker, in reponse, for example, to a click on a link. The whole group can be shown on and off at once. It should be declared global at initialization time to be useful.

Methods

create   new  

Included Modules

MappingObject

Attributes

active  [RW] 
markers  [RW] 
markers_by_id  [RW] 

Public Class methods

[Source]

     # File lib/gm_plugin/overlay.rb, line 170
170:       def initialize(active = true , markers = nil)
171:         @active = active
172:         @markers = []
173:         @markers_by_id = {}
174:         if markers.is_a?(Array)
175:           @markers = markers
176:         elsif markers.is_a?(Hash)
177:           @markers_by_id = markers
178:         end
179:       end

Public Instance methods

[Source]

     # File lib/gm_plugin/overlay.rb, line 181
181:       def create
182:         "new GMarkerGroup(#{MappingObject.javascriptify_variable(@active)},#{MappingObject.javascriptify_variable(@markers)},#{MappingObject.javascriptify_variable(@markers_by_id)})"
183:       end

[Validate]