Commit 210f1212a206115c4642b4d06db8210088884adc
1 parent
19173db3
updates
Showing
1 changed file
with
26 additions
and
1 deletions
controllets/select-marker-map-controllet/select-marker-map-controllet.html
1 | 1 | <link rel="import" href="../../bower_components/polymer/polymer.html"/> |
2 | 2 | <link rel="import" href="../../bower_components/paper-material/paper-material.html"/> |
3 | 3 | <link rel="import" href="../../bower_components/paper-fab/paper-fab.html"/> |
4 | +<link rel="import" href="../../bower_components/iron-icons/maps-icons.html"> | |
4 | 5 | <link rel="import" href="../../bower_components/iron-icons/iron-icons.html"/> |
5 | 6 | <link rel="import" href="../../bower_components/paper-dialog/paper-dialog.html"/> |
6 | 7 | <link rel="import" href="../../bower_components/neon-animation/neon-animation.html"/> |
... | ... | @@ -48,6 +49,7 @@ |
48 | 49 | </paper-dropdown-menu> |
49 | 50 | |
50 | 51 | <!--<paper-input id="shape_label" label="Shape label" maxlenght="30" value="{{label}}"></paper-input>--> |
52 | + <paper-fab id="map_layer" class="cocreation_view_modes_button" mini icon="maps:satellite" on-click="_handleMapLayerClick" style="background-color:#B6B6B6"></paper-fab> | |
51 | 53 | |
52 | 54 | </div> |
53 | 55 | |
... | ... | @@ -139,7 +141,24 @@ |
139 | 141 | label: { |
140 | 142 | type: String, |
141 | 143 | value: "" |
144 | + }, | |
145 | + | |
146 | + satLayer: { | |
147 | + type: Object, | |
148 | + value: new ol.layer.Tile({ | |
149 | + title: 'Global Imagery', | |
150 | + source: new ol.source.BingMaps({ | |
151 | + key : "AiAjdlCagGtE5269Z4YP3e3VtMkzzAKvowq5cQadahNZjVxttUxdDS40u91Uv8qP", | |
152 | + imagerySet: 'AerialWithLabels' | |
153 | + }) | |
154 | + }) | |
155 | + }, | |
156 | + | |
157 | + layers: { | |
158 | + type : Array, | |
159 | + value : [] | |
142 | 160 | } |
161 | + | |
143 | 162 | }, |
144 | 163 | |
145 | 164 | ready : function(){ |
... | ... | @@ -201,8 +220,9 @@ |
201 | 220 | loadTilesWhileAnimating: true, |
202 | 221 | loadTilesWhileInteracting: true, |
203 | 222 | layers: [baseLayer, |
223 | + this.satLayer, | |
204 | 224 | new ol.layer.Vector({ |
205 | - source: this.vectorSource | |
225 | + source: this.vectorSource | |
206 | 226 | }), |
207 | 227 | this.draw_layer |
208 | 228 | ] |
... | ... | @@ -326,6 +346,11 @@ |
326 | 346 | this.addInteraction(); |
327 | 347 | }, |
328 | 348 | |
349 | + _handleMapLayerClick: function(e){ | |
350 | + this.satLayer.setVisible(!this.satLayer.getVisible()); | |
351 | + | |
352 | + }, | |
353 | + | |
329 | 354 | getTextStyle: function(offsetX) { |
330 | 355 | return new ol.style.Style({ |
331 | 356 | fill: new ol.style.Fill({ | ... | ... |