Google Maps API Custom Map


	
var CustomTypeOptions = { getTileUrl: function(coord, zoom) { var normCoord = getNormalizedCoord(coord, zoom); if (!normCoord) { return null; } return "./tiles_demo" + "/" + "kumamoto" + "/" + "kumamoto_" + zoom + "_" + normCoord.x + "-" + normCoord.y + ".png"; }, tileSize: new google.maps.Size(256, 256), isPng: true, maxZoom: 5, minZoom: 2, name: 'Custom' }; var CustomMapType = new google.maps.ImageMapType(CustomTypeOptions); function initialize() { var mapCustom = ['Custom'] var myLatlng = new google.maps.LatLng(0, 0); var myOptions = { center: myLatlng, zoom:2, mapTypeControl: false, streetViewControl: false, }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions ); map.mapTypes.set('Custom',CustomMapType) map.setMapTypeId('Custom'); map.setCenter(myLatlng); }
Created by