Class: GoogleMap::GeoXml

Inherits:
Object
  • Object
show all
Includes:
UnbackedDomId
Defined in:
lib/google_map/geo_xml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from UnbackedDomId

#dom_id

Constructor Details

#initialize(options = {}) ⇒ GeoXml

Returns a new instance of GeoXml.



9
10
11
# File 'lib/google_map/geo_xml.rb', line 9

def initialize(options = {})
  options.each_pair { |key, value| send("#{key}=", value) }
end

Instance Attribute Details

#url_of_xmlObject

Returns the value of attribute url_of_xml.



7
8
9
# File 'lib/google_map/geo_xml.rb', line 7

def url_of_xml
  @url_of_xml
end

Instance Method Details

#to_jsObject



13
14
15
16
17
18
19
# File 'lib/google_map/geo_xml.rb', line 13

def to_js

  js = []
  js << "#{dom_id} = new GGeoXml('#{url_of_xml}');"

  js.join "\n"
end