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

Makes the link with the MGeoRSS extension by Mikel Maron (a bit modified though). It lets you overlay on top of Google Maps the items present in a RSS feed that has GeoRss data. This data can be either in W3C Geo vocabulary or in the GeoRss Simple format. See georss.org to know more about GeoRss.

Methods

create   new  

Included Modules

MappingObject

Attributes

icon  [RW] 
options  [RW] 
proxy  [RW] 
url  [RW] 

Public Class methods

You can pass the following options:

  • :icon: An icon for the items of the feed. Defaults to the classic red balloon icon.
  • :proxy: An URL on your server where fetching the RSS feed will be taken care of.
  • :list_div: In case you want a list of all the markers, with a link on which you can click in order to display the info on the marker, use this option to indicate the ID of the div (that you must place yourself).
  • :list_item_class: class of the DIV containing each item of the list. Ignored if option :list_div is not set.
  • :limit: Maximum number of items to display on the map.
  • :content_div: Instead of having an info window appear, indicates the ID of the DIV where this info should be displayed.

[Source]

     # File lib/gm_plugin/overlay.rb, line 264
264:       def initialize(url, options = {})
265:         @url = url
266:         @icon = options.delete(:icon) || GIcon::DEFAULT
267:         @proxy = options.delete(:proxy) || Variable::UNDEFINED
268:         @options = options 
269:       end

Public Instance methods

[Source]

     # File lib/gm_plugin/overlay.rb, line 271
271:       def create 
272:         "new GeoRssOverlay(#{MappingObject.javascriptify_variable(@url)},#{MappingObject.javascriptify_variable(@icon)},#{MappingObject.javascriptify_variable(@proxy)},#{MappingObject.javascriptify_variable(@options)})"
273:       end

[Validate]