Created
October 15, 2012 13:30
-
-
Save zerojuan/3892477 to your computer and use it in GitHub Desktop.
Google Map V3 styling
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
//from http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html | |
var mapStyle = [ | |
{ | |
featureType: "administrative", | |
stylers: [ | |
{ visibility: "off" } | |
] | |
},{ | |
elementType: "labels", | |
stylers: [ | |
{ visibility: "off" } | |
] | |
},{ | |
featureType: "landscape", | |
stylers: [ | |
{ visibility: "off" } | |
] | |
},{ | |
featureType: "water", | |
stylers: [ | |
{ saturation: -99 }, | |
{ lightness: -29 } | |
] | |
},{ | |
featureType: "water", | |
elementType: "labels", | |
stylers: [ | |
{ visibility: "off" } | |
] | |
},{ | |
featureType: "poi", | |
stylers: [ | |
{ visibility: "off" } | |
] | |
},{ | |
featureType: "road", | |
elementType: "geometry", | |
stylers: [ | |
{ visibility: "simplified" }, | |
{ saturation: -38 }, | |
{ lightness: 35 }, | |
{ hue: "#00eeff" } | |
] | |
},{ | |
featureType: "road", | |
stylers: [ | |
{ visibility: "off" } | |
] | |
},{ | |
featureType: "road", | |
elementType: "geometry", | |
stylers: [ | |
{ visibility: "off" } | |
] | |
}]; | |
var mapOptions = { | |
center: new google.maps.LatLng(latitude, longitude), //initial map location | |
zoom: 2, //default zoom | |
streetViewControl: false, //show ui for street view | |
mapTypeControl: false, //show ui for choosing map type | |
mapTypeId: google.maps.MapTypeId.ROADMAP, //Other options: ROADMAP, SATELLITE, HYBRID, TERRAIN | |
styles: mapStyle //attach style | |
}; | |
//draw your map into 'map-container' div | |
this.map = new google.maps.Map(document.getElementById('map-container'), mapOptions); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment