Commit 210f1212a206115c4642b4d06db8210088884adc

Authored by Luigi Serra
1 parent 19173db3

updates

controllets/select-marker-map-controllet/select-marker-map-controllet.html
1 <link rel="import" href="../../bower_components/polymer/polymer.html"/> 1 <link rel="import" href="../../bower_components/polymer/polymer.html"/>
2 <link rel="import" href="../../bower_components/paper-material/paper-material.html"/> 2 <link rel="import" href="../../bower_components/paper-material/paper-material.html"/>
3 <link rel="import" href="../../bower_components/paper-fab/paper-fab.html"/> 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 <link rel="import" href="../../bower_components/iron-icons/iron-icons.html"/> 5 <link rel="import" href="../../bower_components/iron-icons/iron-icons.html"/>
5 <link rel="import" href="../../bower_components/paper-dialog/paper-dialog.html"/> 6 <link rel="import" href="../../bower_components/paper-dialog/paper-dialog.html"/>
6 <link rel="import" href="../../bower_components/neon-animation/neon-animation.html"/> 7 <link rel="import" href="../../bower_components/neon-animation/neon-animation.html"/>
@@ -48,6 +49,7 @@ @@ -48,6 +49,7 @@
48 </paper-dropdown-menu> 49 </paper-dropdown-menu>
49 50
50 <!--<paper-input id="shape_label" label="Shape label" maxlenght="30" value="{{label}}"></paper-input>--> 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 </div> 54 </div>
53 55
@@ -139,7 +141,24 @@ @@ -139,7 +141,24 @@
139 label: { 141 label: {
140 type: String, 142 type: String,
141 value: "" 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 ready : function(){ 164 ready : function(){
@@ -201,8 +220,9 @@ @@ -201,8 +220,9 @@
201 loadTilesWhileAnimating: true, 220 loadTilesWhileAnimating: true,
202 loadTilesWhileInteracting: true, 221 loadTilesWhileInteracting: true,
203 layers: [baseLayer, 222 layers: [baseLayer,
  223 + this.satLayer,
204 new ol.layer.Vector({ 224 new ol.layer.Vector({
205 - source: this.vectorSource 225 + source: this.vectorSource
206 }), 226 }),
207 this.draw_layer 227 this.draw_layer
208 ] 228 ]
@@ -326,6 +346,11 @@ @@ -326,6 +346,11 @@
326 this.addInteraction(); 346 this.addInteraction();
327 }, 347 },
328 348
  349 + _handleMapLayerClick: function(e){
  350 + this.satLayer.setVisible(!this.satLayer.getVisible());
  351 +
  352 + },
  353 +
329 getTextStyle: function(offsetX) { 354 getTextStyle: function(offsetX) {
330 return new ol.style.Style({ 355 return new ol.style.Style({
331 fill: new ol.style.Fill({ 356 fill: new ol.style.Fill({