-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmapApp.js
More file actions
25 lines (25 loc) · 986 Bytes
/
Copy pathmapApp.js
File metadata and controls
25 lines (25 loc) · 986 Bytes
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
/// <reference path="./typings/index.d.ts" />
function initialize() {
var option = {
center: new google.maps.LatLng(34.059, -118.39),
zoom: 12
};
var map = new google.maps.Map(document.getElementById('mapDiv'), option);
addButtons(map);
}
function addButtons(map) {
document.getElementById('btnTerrain').addEventListener('click', function () {
map.setMapTypeId(google.maps.MapTypeId.TERRAIN);
});
document.getElementById('btnRoadmap').addEventListener('click', function () {
map.setMapTypeId(google.maps.MapTypeId.ROADMAP);
});
document.getElementById('btnSatellite').addEventListener('click', function () {
map.setMapTypeId(google.maps.MapTypeId.SATELLITE);
});
document.getElementById('btnHybrid').addEventListener('click', function () {
map.setMapTypeId(google.maps.MapTypeId.HYBRID);
});
}
google.maps.event.addDomListener(window, "load", initialize);
//# sourceMappingURL=mapApp.js.map