vendor/plugins/ym4r-gm/lib/gm_plugin/overlay.rb
#Creates a marker: If an info_window or info_window_tabs is present, the response to the click action from the user is setup here.

Creates a marker: If an info_window or info_window_tabs is present, the response to the click action from the user is setup here.
Creates a marker : If an info_window or info_window_tabs is present the response to the click action from the user is setup here .
def create
        if @options.empty?
          creation = "new GMarker(#{MappingObject.javascriptify_variable(@point)})"
        else
          creation = "new GMarker(#{MappingObject.javascriptify_variable(@point)},#{MappingObject.javascriptify_variable(@options)})"
        end
        if @info_window && @info_window.is_a?(String)
          creation = "addInfoWindowToMarker(#{creation},#{MappingObject.javascriptify_variable(@info_window)},#{MappingObject.javascriptify_variable(@info_window_options)})"
        elsif @info_window_tabs && @info_window_tabs.is_a?(Hash)
          creation = "addInfoWindowTabsToMarker(#{creation},#{MappingObject.javascriptify_variable(@info_window_tabs.to_a.collect{|kv| GInfoWindowTab.new(kv[0],kv[1] ) })},#{MappingObject.javascriptify_variable(@info_window_options)})"
        elsif @info_window_tabs 
          creation = "addInfoWindowTabsToMarker(#{creation},#{MappingObject.javascriptify_variable(Array(@info_window_tabs))},#{MappingObject.javascriptify_variable(@info_window_options)})"
        end
        if @address.nil?
          creation
        else
          "addGeocodingToMarker(#{creation},#{MappingObject.javascriptify_variable(@address)})"
        end
      end
def create if @options . empty? creation = "new GMarker(#{MappingObject.javascriptify_variable(@point)})" else creation = "new GMarker(#{MappingObject.javascriptify_variable(@point)},#{MappingObject.javascriptify_variable(@options)})" end if @info_window && @info_window . is_a? ( String ) creation = "addInfoWindowToMarker(#{creation},#{MappingObject.javascriptify_variable(@info_window)},#{MappingObject.javascriptify_variable(@info_window_options)})" elsif @info_window_tabs && @info_window_tabs . is_a? ( Hash ) creation = "addInfoWindowTabsToMarker(#{creation},#{MappingObject.javascriptify_variable(@info_window_tabs.to_a.collect{|kv| GInfoWindowTab.new(kv[0],kv[1] ) })},#{MappingObject.javascriptify_variable(@info_window_options)})" elsif @info_window_tabs creation = "addInfoWindowTabsToMarker(#{creation},#{MappingObject.javascriptify_variable(Array(@info_window_tabs))},#{MappingObject.javascriptify_variable(@info_window_options)})" end if @address . nil? creation else "addGeocodingToMarker(#{creation},#{MappingObject.javascriptify_variable(@address)})" end end
Creates a marker: If an info_window or info_window_tabs is present, the response to the click action from the user is setup here.
Creates a marker : If an info_window or info_window_tabs is present the response to the click action from the user is setup here .