Skip to content

Instantly share code, notes, and snippets.

@zerojuan
Created October 15, 2012 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zerojuan/3892477 to your computer and use it in GitHub Desktop.
Save zerojuan/3892477 to your computer and use it in GitHub Desktop.
Google Map V3 styling
//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