forked from eva-hafermalz/gn-map
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgn-map.html
More file actions
59 lines (48 loc) · 1.2 KB
/
gn-map.html
File metadata and controls
59 lines (48 loc) · 1.2 KB
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
56
57
58
59
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../osm-map/osm-map.html">
<!--
Maps are canvases on which the geographical maps get displayed via any given source.
Features like markers, polygons or polylines can be attached to the map.
@demo
-->
<dom-module id="gn-map">
<template>
<style>
:host {
display: block;
width: 100%;
height: 100%;
}
</style>
<template is="dom-if" if="_typeIsOpenStreetMap(mapType)">
<osm-map><content></content></osm-map>
</template>
<template is="dom-if" if="_typeIsGoogleMap(mapType)">
<google-map><content></content></google-map>
</template>
</template>
<script>
Polymer({
is: 'gn-map',
properties: {
mapType: {
type: String,
value:"GooleMap",
notify: true
},
map: Object,
center: {
type: Object,
observer: "setCenter"
},
},
_typeIsOpenStreetMap: function(mapType) {
return mapType === 'OpenStreetMap';
},
_typeIsGoogleMap: function(mapType) {
return mapType === 'GoogleMap';
},
});
</script>
</dom-module>