Commit f6f4c2a0bf02bc402e5ec957ba070d16ca0662cc

Authored by Edmar Moretti
1 parent e132ba0b

Inclusão da legenda em uma janela flutuante no mashup OpenLayers

Showing 1 changed file with 24 additions and 4 deletions   Show diff stats
mashups/openlayers.js.php
@@ -414,10 +414,30 @@ i3GEO.editorOL = { @@ -414,10 +414,30 @@ i3GEO.editorOL = {
414 ins += "<img src='"+url+"' /><br>"; 414 ins += "<img src='"+url+"' /><br>";
415 } 415 }
416 catch(e){} 416 catch(e){}
417 - }  
418 - var w = window.open();  
419 - w.document.write(ins);  
420 - w.document.close(); 417 + }
  418 + //var w = window.open();
  419 + //w.document.write(ins);
  420 + //w.document.close();
  421 + var temp;
  422 + if(!document.getElementById("panellegendaeditorOL")){
  423 + YAHOO.namespace("legendaeditorOL.container");
  424 + YAHOO.legendaeditorOL.container.panel = new YAHOO.widget.Panel("panellegendaeditorOL", {zIndex:20000, iframe:true, width:"250px", visible:false, draggable:true, close:true } );
  425 + YAHOO.legendaeditorOL.container.panel.setBody(ins);
  426 + YAHOO.legendaeditorOL.container.panel.setHeader("Legenda");
  427 + YAHOO.legendaeditorOL.container.panel.setFooter("");
  428 + YAHOO.legendaeditorOL.container.panel.render(document.body);
  429 + YAHOO.legendaeditorOL.container.panel.show();
  430 + YAHOO.legendaeditorOL.container.panel.center();
  431 +
  432 + YAHOO.util.Event.addListener(YAHOO.legendaeditorOL.container.panel.close, "click", function(){
  433 + //i3GEOpanelEditor.deactivate();
  434 + //i3GEOpanelEditor.activate();
  435 + });
  436 + }
  437 + else{
  438 + YAHOO.legendaeditorOL.container.panel.setBody(ins);
  439 + YAHOO.legendaeditorOL.container.panel.show();
  440 + }
421 }, 441 },
422 captura: function(lonlat){ 442 captura: function(lonlat){
423 var layers = [i3GEO.editorOL.layerAtivo()], 443 var layers = [i3GEO.editorOL.layerAtivo()],