-
Notifications
You must be signed in to change notification settings - Fork 0
/
google_maps_method_2.html
47 lines (44 loc) · 1.09 KB
/
google_maps_method_2.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Dhivehi Maps with Google Maps v3 API</title>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js"></script>
<style type="text/css">
html, body, #map {
height: 100%;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
var element = document.getElementById("map");
var mapTypeIds = ["satellite", "dhivehi"];
var map = new google.maps.Map(element, {
center: new google.maps.LatLng(4.30399, 73.17453),
zoom: 10,
mapTypeId: "dhivehi",
rotateControl: true,
mapTypeControlOptions: {
mapTypeIds: mapTypeIds
}
}
);
map.mapTypes.set("dhivehi", new google.maps.ImageMapType({
getTileUrl: function(coord, zoom) {
return "https://dhivehi.mv/maps/server/live/?z="+zoom+"&x="+coord.x+"&y="+coord.y;
}
,
tileSize: new google.maps.Size(256, 256),
name: "Dhivehi",
maxZoom: 20
}
));
</script>
</body>
</html>