Skip to content

Commit

Permalink
support for ggeoxml
Browse files Browse the repository at this point in the history
git-svn-id: http://ym4r.rubyforge.org/svn/Plugins/GM/trunk/ym4r_gm@90 c9bc9743-7714-0410-b404-d8b1d4e1ace9
  • Loading branch information
Guilhem Vellut committed Mar 22, 2007
1 parent db652a5 commit 9adb4ba
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/gm_plugin/geocoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def self.get(request,options = {})
end
end
when :kml, :xml

doc = REXML::Document.new(res)

response = doc.elements['//Response']
Expand Down
2 changes: 1 addition & 1 deletion lib/gm_plugin/map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def self.header(options = {})
options[:with_vml] = true unless options.has_key?(:with_vml)
options[:hl] ||= ''
api_key = ApiKey.get(options)
a = "<script src=\"http://maps.google.com/maps?file=api&amp;v=2&amp;key=#{api_key}&amp;hl=#{options[:hl]}\" type=\"text/javascript\"></script>\n"
a = "<script src=\"http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=#{api_key}&amp;hl=#{options[:hl]}\" type=\"text/javascript\"></script>\n"
a << "<script src=\"/javascripts/ym4r-gm.js\" type=\"text/javascript\"></script>\n"
a << "<style type=\"text/css\">\n v\:* { behavior:url(#default#VML);}\n</style>" if options[:with_vml]
a
Expand Down
16 changes: 16 additions & 0 deletions lib/gm_plugin/overlay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,22 @@ def create
a << ")"
end
end

#A GGeoXml object gets data from a GeoRSS or KML feed and displays it. Use <tt>overlay_init</tt> to add it to a map at initialization time.
class GGeoXml
include MappingObject

attr_accessor :url

def initialize(url)
@url = url
end

def create
"new GGeoXml(#{MappingObject.javascriptify_variable(@url)})"
end

end

#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.
class GMarkerGroup
Expand Down

0 comments on commit 9adb4ba

Please sign in to comment.