Commit e132ba0bee5d5963dd54595552a327a41a24eb0a

Authored by Edmar Moretti
1 parent ced4cb65

Correção na ferramenta de identificação do mashup OpenLayers. Não estava sendo a…

…ceita a opção de alterar o tema ativo.
Showing 1 changed file with 10 additions and 1 deletions   Show diff stats
mashups/openlayers.js.php
@@ -657,7 +657,10 @@ i3GEO.editorOL = { @@ -657,7 +657,10 @@ i3GEO.editorOL = {
657 eventListeners: { 657 eventListeners: {
658 getfeatureinfo: function(event) { 658 getfeatureinfo: function(event) {
659 var lonlat = i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy), 659 var lonlat = i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),
660 - lonlattexto = "<hr><pre><span style=color:blue;cursor:pointer onclick='i3GEO.editorOL.captura(\""+lonlat.lon+","+lonlat.lat+"\")'>captura</span></pre>"; 660 + lonlattexto = "<hr>";
  661 + if( botoes.linha === true || botoes.ponto === true || botoes.poligono === true || botoes.edita === true){
  662 + lonlattexto += "<pre><span style=color:blue;cursor:pointer onclick='i3GEO.editorOL.captura(\""+lonlat.lon+","+lonlat.lat+"\")'>captura</span></pre>";
  663 + }
661 i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud( 664 i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud(
662 "chicken", 665 "chicken",
663 i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy), 666 i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),
@@ -667,6 +670,12 @@ i3GEO.editorOL = { @@ -667,6 +670,12 @@ i3GEO.editorOL = {
667 true 670 true
668 )); 671 ));
669 }, 672 },
  673 + beforegetfeatureinfo: function(event){
  674 + var ativo = [i3GEO.editorOL.layerAtivo()];
  675 + event.object.layers = ativo;
  676 + botaoIdentifica.layers = ativo;
  677 + botaoIdentifica.url = ativo[0].url;
  678 + },
670 activate: function(){ 679 activate: function(){
671 i3GEO.editorOL.criaJanelaAtivaTema(); 680 i3GEO.editorOL.criaJanelaAtivaTema();
672 } 681 }