Skip to content

Instantly share code, notes, and snippets.

@vertis
Created October 25, 2009 12:00
Show Gist options
  • Save vertis/218021 to your computer and use it in GitHub Desktop.
Save vertis/218021 to your computer and use it in GitHub Desktop.
-#views/index.haml
%html
%head
%script{:type => "text/javascript", :charset => "utf-8", :src => "http://www.google.com/jsapi?key=ABQIAAAAR21mr2vnfC9-sjIojad2WhSmbtbI58sJnUq1AueY0BvTVoVv3BSw-I1OHpTaa0zZiaSEsDrZf9fGWQ"}
%script{:type => "text/javascript"}
google.load("maps", "2");
// Call this function when the page has been loaded
function initialize() {
var map = new google.maps.Map2(document.getElementById("map"));
map.setCenter(new google.maps.LatLng(37.4419, -122.1419), 13);
}
google.setOnLoadCallback(initialize);
%body
%h1 Google Maps Example
%p Welcome to the the Google Maps API example application.
#map{:style => "width: 794px; height: 491px"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment