-
Notifications
You must be signed in to change notification settings - Fork 0
/
custommap.html
57 lines (52 loc) · 1.47 KB
/
custommap.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?key=%Your-API-Key%&sensor=false">
</script>
<script type="text/javascript">
var mandelbrotTypeOptions = {
getTileUrl: function(coord, zoom) {
var bound = Math.pow(2, zoom);
var left=(coord.y/bound - 0.5)
var top= (coord.x/bound - 0.5)
return "http://localhost:8080/" + left +
"/" + top +
"/" + (left + 1.0/bound) +
"/" + (top + 1.0/bound) +
"/" + (32*(zoom+1));
},
tileSize: new google.maps.Size(256, 256),
maxZoom: 19,
minZoom: 0,
radius: 2,
name: "Mandelbrot"
};
var mandelbrotMapType = new google.maps.ImageMapType(mandelbrotTypeOptions);
function initialize() {
var myLatlng = new google.maps.LatLng(0, 0);
var mapOptions = {
center: myLatlng,
zoom: 1,
streetViewControl: false,
mapTypeControlOptions: {
mapTypeIds: ["mandelbrot"]
}
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
mapOptions);
map.mapTypes.set('mandelbrot', mandelbrotMapType);
map.setMapTypeId('mandelbrot');
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>