Created
May 24, 2011 06:50
-
-
Save brendannee/988231 to your computer and use it in GitHub Desktop.
Add Google Transit layer to Google Maps API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var transitOptions = { | |
getTileUrl: function(coord, zoom) { | |
return "http://mt1.google.com/vt/lyrs=m@155076273,transit:comp|vm:&" + | |
"hl=en&opts=r&s=Galil&z=" + zoom + "&x=" + coord.x + "&y=" + coord.y; | |
}, | |
tileSize: new google.maps.Size(256, 256), | |
isPng: true | |
}; | |
var transitMapType = new google.maps.ImageMapType(transitOptions); | |
map.overlayMapTypes.insertAt(0, transitMapType); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment