-
Notifications
You must be signed in to change notification settings - Fork 0
/
tesr.html
51 lines (46 loc) · 1.5 KB
/
tesr.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /
>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?
sensor=false"></script>
<script type="text/javascript">
var locations = {};
locations['Location 1'] = new google.maps.LatLng(56.96073070463192,
24.078392486572266);
locations['Location 2'] = new google.maps.LatLng(59.96073070463192,
27.078392486572266);
var map;
function initialize() {
var latlng = new google.maps.LatLng(0, 0);
var myOptions = {
zoom: 1,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
}
function MarkerFromDDList (){
var selected = document.getElementById("location").value;
startMarker = new google.maps.Marker({
position: locations[selected],
map: map,
draggable: true,
title: selected
});
}
</script>
</head>
<body onload="initialize()">
<p>
<select onchange="MarkerFromDDList()" id="location">
<option value="None">-</option>
<option value="Location 1">Location 1</option>
<option value="Location 2">Location 2</option>
</select>
</p>
<div id="map_canvas" style="width:600px; height:400px"></div>
</body>
</html>