Skip to content

Instantly share code, notes, and snippets.

@yoonchulkoh
Created August 30, 2011 11:02
Show Gist options
  • Save yoonchulkoh/1180660 to your computer and use it in GitHub Desktop.
Save yoonchulkoh/1180660 to your computer and use it in GitHub Desktop.
google maps api
<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps</title>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize() {
var map = new google.maps.Map(document.getElementById("map_canvas"),
{ center: new google.maps.LatLng(35.660482, 139.729217),
zoom: 13,
mapTypeControlOptions: {
mapTypeIds: [ google.maps.MapTypeId.ROADMAP, "gdd" ]
}
});
var gddMapType = new google.maps.StyledMapType(
[ {
featureType: "road",
elementType: "all",
stylers: [ { saturation: -100 } ]
},{
featureType: "poi.school",
elementType: "geometry",
stylers: [ { hue: "#ff0000" } ]
},{
featureType: "transit.line",
elementType: "all",
stylers: [ { visibility: "off" } ]
},{
featureType: "administrative.locality",
elementType: "labels",
stylers: [ { invert_lightness: true } ]
} ], { name: "GDD" });
map.mapTypes.set("gdd", gddMapType);
map.setMapTypeId("gdd");
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width:500px; height:300px"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment