Skip to content

Instantly share code, notes, and snippets.

@dpsk
Created April 25, 2011 12:27
Show Gist options
  • Save dpsk/940446 to your computer and use it in GitHub Desktop.
Save dpsk/940446 to your computer and use it in GitHub Desktop.
cartographer
def home
@map = Cartographer::Gmap.new( 'map_canvas' ) # this is 11 line
@map.zoom = :bound
@icon = Cartographer::Gicon.new()
@map.icons << @icon
marker1 = Cartographer::Gmarker.new(:name=> "taj_mahal", :marker_type => "Building",
:position => [27.173006,78.042086],
:info_window_url => "/url_for_info_content", :icon => @icon)
marker2 = Cartographer::Gmarker.new(:name=> "raj_bhawan", :marker_type => "Building",
:position => [28.614309,77.201353],
:info_window_url => "/url_for_info_content", :icon => @icon)
@map.markers << marker1
@map.markers << marker2
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment