Skip to content

Instantly share code, notes, and snippets.

Created January 27, 2014 22:01
Show Gist options
  • Save anonymous/8658245 to your computer and use it in GitHub Desktop.
Save anonymous/8658245 to your computer and use it in GitHub Desktop.
html { height: 100% }
body {
height: 100%;
margin: 0;
padding: 0 }
#map-canvas {
height: 100%;
/*height: 480px;
width: 640px;*/
}
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Styled map" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?v=3.14&sensor=false&key=AIzaSyA5UPXabiWwdiV9mOwxsZSinfFIE-zUu3g">
</script>
</head>
<body>
<div id="map-canvas"/>
</body>
</html>
function initialize() {
var styles = [ {
"featureType" : "poi.business",
"stylers" : [ {
"visibility" : "on"
} ]
},
{
featureType : "landscape.natural",
stylers : [ {
color : "#ffffff"
} ]
}, {
featureType : "administrative",
elementType : "geometry",
stylers : [ {
visibility : "off"
} ]
}, {
featureType : "administrative",
elementType : "labels.text.stroke",
stylers : [ {
color : "#ffffff"
} ]
}, {
featureType : "administrative.country",
elementType : "geometry",
stylers : [ {
weight : 1
}, {
visibility : "on"
}, {
color : "#010100"
} ]
}, {
featureType : "road",
elementType : "geometry.stroke",
stylers : [ {
visibility : "off"
} ]
}, {
featureType : "road",
elementType : "geometry.fill",
stylers : [ {
weight : 0.7
}, {
color : "#006464"
} ]
}, {
featureType : "road",
elementType : "labels.icon",
stylers : [ {
visibility : "off"
} ]
}, {
elementType : "labels.text.stroke",
stylers : [ {
color : "#ffffff"
} ]
}, {
featureType : "landscape",
elementType : "labels.text.fill",
stylers : [ {
visibility : "off"
}, {
color : "#007575"
} ]
}, {
featureType : "poi",
stylers : [ {
visibility : "off"
} ]
}, {
featureType : "administrative.land_parcel",
stylers : [ {
visibility : "off"
} ]
}, {
featureType : "poi.park",
stylers : [ {
visibility : "on"
} ]
}, {
featureType : "poi.park",
elementType : "labels.icon",
stylers : [ {
visibility : "off"
} ]
}, {
featureType : "transit",
stylers : [ {
visibility : "off"
} ]
}, {
featureType : "water",
elementType : "geometry",
stylers : [ {
color : "#007575"
} ]
}, {
featureType : "poi.park",
elementType : "geometry.fill",
stylers : [ {
color : "#eeeeee"
} ]
}, {
featureType : "road",
elementType : "geometry.stroke",
stylers : [ {
visibility : "off"
}, {
color : "#ffffff"
}, {
weight : 3
} ]
}, {
featureType : "road",
elementType : "labels.text.stroke",
stylers : [ {
color : "#ffffff"
}, {
weight : 3
} ]
}, {
featureType : "transit",
stylers : [ {
weight : 0.5
}, {
color : "#007575"
} ]
}, {
featureType : "road",
elementType : "labels.icon",
stylers : [ {
visibility : "off"
} ]
}, {
featureType : "road.highway",
elementType : "geometry.fill",
stylers : [ {
weight : 2
} ]
}, {
featureType : "road.arterial",
elementType : "geometry.fill",
stylers : [ {
weight : 1.3
} ]
}
];
var mapOptions = {
center : new google.maps.LatLng(53.3885847, -1.4747644),
zoom : 11,
styles : styles
};
var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment