-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
52 lines (45 loc) · 1.29 KB
/
index.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
<!doctype html>
<html>
<head>
<title>static-openstreetmap</title>
<meta charset="utf-8">
<script src="http://cdnjs.cloudflare.com/ajax/libs/polymer/0.2.2/platform.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/polymer/0.2.2/polymer.js"></script>
<link rel="import" href="src/static-openstreetmap.html">
<style>
.mapContainer {
width: 400px;
height: 400px;
background-color: palegoldenrod;
}
input[type=number] {
width: 40px;
}
</style>
</head>
<body>
<h1>static-openstreetmap</h1>
<template id="tpl" bind>
<div>
<input value="{{ query }}">
<label>Zoom: <input type="number" value="{{ zoom }}"></label>
<label>Width: <input type="number" value="{{ width }}"></label>
<label>Height: <input type="number" value="{{ height }}"></label>
(empty width or height means expand to available space)
</div>
<div class="mapContainer">
<static-openstreetmap query="{{ query }}" width="{{ width }}" height="{{ height }}" zoom="{{ zoom }}"></static-openstreetmap>
</div>
</template>
<script>
window.addEventListener('polymer-ready', function() {
document.getElementById('tpl').model = {
query: 'Jumeira 3, Dubai',
zoom: 10,
width: 390,
height: 390
}
});
</script>
</body>
</html>