forked from fredj/ol3-polymer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
basic.scales.html
48 lines (41 loc) · 1.36 KB
/
basic.scales.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="app-map.html">
<link rel="import" href="app-scaleselector.html">
<script src="http://openlayers.org/en/master/build/ol-debug.js"></script>
<script src="https://cdn.rawgit.com/fredj/ol3-object-properties/master/dist/ol3-properties.min.js"></script>
<style>
app-map {
width: 600px;
height: 300px;
}
</style>
</head>
<body>
<template is="auto-binding">
<app-map map="{{map}}"></app-map>
<app-scaleselector scales="{{my_scales}}" zoom="{{map.view.zoom}}"></app-scaleselector>
<pre>map.view.zoom is {{map.view.zoom}}</pre>
</template>
<script>
var scope = document.querySelector('template');
scope.my_scales = [
{zoom: 0, label: 'zero'},
{zoom: 1, label: 'un'},
{zoom: 2, label: 'deux'},
{zoom: 3, label: 'trois'},
{zoom: 4, label: 'quatre'},
{zoom: 5, label: 'cinq'},
{zoom: 6, label: 'six'},
{zoom: 7, label: 'sept'},
{zoom: 8, label: 'huit'},
{zoom: 9, label: 'neuf'},
{zoom: 12, label: 'douze'}
];
</script>
</body>
</html>