forked from GNURub/mapbox-map
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
55 lines (53 loc) · 1.4 KB
/
demo.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
<!doctype html>
<html>
<head>
<title>open-map Demo</title>
<meta charset="UTF-8" />
<script src='../platform/platform.js'></script>
<link rel="import" href="open-map.html">
<link rel="import" href="open-search.html">
<style type="text/css">
body, html {
height: 100%;
margin: 0;
}
open-map {
display: block;
height: 100%;
width: 100%;
}
</style>
</head>
<body unresolved>
<open-map id="map"
zoom="15"
fullscreenUI
latitude="38.908847"
mapID="villeda.c4c63d13"
longitude="1.433900">
<open-circle
latitude="38.908847" longitude="1.433900" radius="300"></open-circle>
<open-marker title="School Bus" latitude="38.909847"
longitude="1.435900"
icon="{'icon':'bus', 'markerColor':'#ff0000'}"
draggable="true">
</open-marker>
<open-marker id="me" title="Me"
icon="{'icon':'pitch', 'markerColor':'#000'}" >
</open-marker>
<open-polyline map={{map}}>
<open-point lantitude="0" lontitude="0"></open-point>
</open-polyline>
</open-map>
<script type="text/javascript">
(function(document, navigator){
'use strict';
var me = document.querySelector('#me');
navigator.geolocation.watchPosition(function(pos) {
me.latitude = pos.coords.latitude;
me.longitude = pos.coords.longitude;
});
}(document, navigator));
</script>
</body>
</html>