Commit de14810c2b36da4046cee793f55a72ce3fad6877

Authored by Edmar Moretti
1 parent 63d1ec61

Atualização do OpenLayers

mashups/openlayers.js.php
@@ -635,7 +635,7 @@ i3GEO.editorOL = { @@ -635,7 +635,7 @@ i3GEO.editorOL = {
635 635
636 i3GEOpanelEditor = new OpenLayers.Control.Panel({ 636 i3GEOpanelEditor = new OpenLayers.Control.Panel({
637 displayClass: "olControlEditingToolbar1 noprint", 637 displayClass: "olControlEditingToolbar1 noprint",
638 - saveState: true, 638 + saveState: false,
639 activateControl: function(c){ 639 activateControl: function(c){
640 this.deactivate(); 640 this.deactivate();
641 this.activate(); 641 this.activate();
@@ -645,33 +645,42 @@ i3GEO.editorOL = { @@ -645,33 +645,42 @@ i3GEO.editorOL = {
645 catch(e){} 645 catch(e){}
646 if(!c.trigger) 646 if(!c.trigger)
647 {c.activate();} 647 {c.activate();}
648 - else{  
649 - c.trigger.call();  
650 - } 648 + else
  649 + {c.trigger.call();}
651 } 650 }
652 }); 651 });
653 if(botoes.procura===true){ 652 if(botoes.procura===true){
654 button = new OpenLayers.Control.Button({ 653 button = new OpenLayers.Control.Button({
655 displayClass: "editorOLprocura", 654 displayClass: "editorOLprocura",
656 trigger: function(){YAHOO.procura.container.panel.show();}, 655 trigger: function(){YAHOO.procura.container.panel.show();},
657 - title: "procura" 656 + title: "procura",
  657 + type: OpenLayers.Control.TYPE_BUTTON
658 }); 658 });
659 controles.push(button); 659 controles.push(button);
660 adiciona = true; 660 adiciona = true;
661 } 661 }
662 if(botoes.pan===true){ 662 if(botoes.pan===true){
663 - controles.push(new OpenLayers.Control.Navigation({title: "deslocar",displayClass:"editorOLpan"})); 663 + controles.push(new OpenLayers.Control.Navigation({
  664 + title: "deslocar",
  665 + displayClass:"editorOLpan",
  666 + type: OpenLayers.Control.TYPE_TOOL
  667 + }));
664 adiciona = true; 668 adiciona = true;
665 } 669 }
666 if(botoes.zoombox===true){ 670 if(botoes.zoombox===true){
667 - controles.push(new OpenLayers.Control.ZoomBox({title: "zoombox",displayClass: "editorOLzoombox"})); 671 + controles.push(new OpenLayers.Control.ZoomBox({
  672 + title: "zoombox",
  673 + displayClass: "editorOLzoombox",
  674 + type: OpenLayers.Control.TYPE_TOOL
  675 + }));
668 adiciona = true; 676 adiciona = true;
669 } 677 }
670 if(botoes.zoomtot===true){ 678 if(botoes.zoomtot===true){
671 button = new OpenLayers.Control.Button({ 679 button = new OpenLayers.Control.Button({
672 displayClass: "editorOLzoomtot", 680 displayClass: "editorOLzoomtot",
673 trigger: function(){i3GEO.editorOL.mapa.zoomToMaxExtent();}, 681 trigger: function(){i3GEO.editorOL.mapa.zoomToMaxExtent();},
674 - title: "ajusta extensão" 682 + title: "ajusta extensão",
  683 + type: OpenLayers.Control.TYPE_BUTTON
675 }); 684 });
676 controles.push(button); 685 controles.push(button);
677 adiciona = true; 686 adiciona = true;
@@ -680,7 +689,8 @@ i3GEO.editorOL = { @@ -680,7 +689,8 @@ i3GEO.editorOL = {
680 button = new OpenLayers.Control.Button({ 689 button = new OpenLayers.Control.Button({
681 displayClass: "editorOLlegenda", 690 displayClass: "editorOLlegenda",
682 trigger: function(){i3GEO.editorOL.mostraLegenda();}, 691 trigger: function(){i3GEO.editorOL.mostraLegenda();},
683 - title: "legenda" 692 + title: "legenda",
  693 + type: OpenLayers.Control.TYPE_BUTTON
684 }); 694 });
685 controles.push(button); 695 controles.push(button);
686 adiciona = true; 696 adiciona = true;
@@ -692,7 +702,8 @@ i3GEO.editorOL = { @@ -692,7 +702,8 @@ i3GEO.editorOL = {
692 handlerOptions: {layerOptions: {styleMap: styleMap}}, 702 handlerOptions: {layerOptions: {styleMap: styleMap}},
693 persist: true, 703 persist: true,
694 displayClass: "editorOLdistancia", 704 displayClass: "editorOLdistancia",
695 - title: "distância" 705 + title: "distância",
  706 + type: OpenLayers.Control.TYPE_TOOL
696 } 707 }
697 ); 708 );
698 button.events.on({ 709 button.events.on({
@@ -712,7 +723,8 @@ i3GEO.editorOL = { @@ -712,7 +723,8 @@ i3GEO.editorOL = {
712 handlerOptions: {layerOptions: {styleMap: styleMap}}, 723 handlerOptions: {layerOptions: {styleMap: styleMap}},
713 persist: true, 724 persist: true,
714 displayClass: "editorOLarea", 725 displayClass: "editorOLarea",
715 - title: "área" 726 + title: "área",
  727 + type: OpenLayers.Control.TYPE_TOOL
716 } 728 }
717 ); 729 );
718 button.events.on({ 730 button.events.on({
@@ -732,6 +744,7 @@ i3GEO.editorOL = { @@ -732,6 +744,7 @@ i3GEO.editorOL = {
732 layers: [i3GEO.editorOL.layerAtivo()], 744 layers: [i3GEO.editorOL.layerAtivo()],
733 queryVisible: true, 745 queryVisible: true,
734 title: "identifica", 746 title: "identifica",
  747 + type: OpenLayers.Control.TYPE_TOOL,
735 displayClass: "editorOLidentifica", 748 displayClass: "editorOLidentifica",
736 eventListeners: { 749 eventListeners: {
737 getfeatureinfo: function(event) { 750 getfeatureinfo: function(event) {
@@ -780,6 +793,7 @@ i3GEO.editorOL = { @@ -780,6 +793,7 @@ i3GEO.editorOL = {
780 { 793 {
781 displayClass: "editorOLlinha", 794 displayClass: "editorOLlinha",
782 title: "digitalizar linha", 795 title: "digitalizar linha",
  796 + type: OpenLayers.Control.TYPE_TOOL,
783 callbacks:{ 797 callbacks:{
784 done: function(feature){ 798 done: function(feature){
785 var f = new OpenLayers.Feature.Vector(feature); 799 var f = new OpenLayers.Feature.Vector(feature);
@@ -809,6 +823,7 @@ i3GEO.editorOL = { @@ -809,6 +823,7 @@ i3GEO.editorOL = {
809 { 823 {
810 displayClass: "editorOLponto", 824 displayClass: "editorOLponto",
811 title: "digitalizar ponto", 825 title: "digitalizar ponto",
  826 + type: OpenLayers.Control.TYPE_TOOL,
812 callbacks:{ 827 callbacks:{
813 done: function(feature){ 828 done: function(feature){
814 var f = new OpenLayers.Feature.Vector(feature); 829 var f = new OpenLayers.Feature.Vector(feature);
@@ -838,6 +853,7 @@ i3GEO.editorOL = { @@ -838,6 +853,7 @@ i3GEO.editorOL = {
838 { 853 {
839 displayClass: "editorOLpoligono", 854 displayClass: "editorOLpoligono",
840 title: "digitalizar polígono", 855 title: "digitalizar polígono",
  856 + type: OpenLayers.Control.TYPE_TOOL,
841 //handlerOptions: {holeModifier: "altKey"}, 857 //handlerOptions: {holeModifier: "altKey"},
842 callbacks:{ 858 callbacks:{
843 done: function(feature){ 859 done: function(feature){
@@ -868,6 +884,7 @@ i3GEO.editorOL = { @@ -868,6 +884,7 @@ i3GEO.editorOL = {
868 { 884 {
869 displayClass: "editorOLtexto", 885 displayClass: "editorOLtexto",
870 title: "incluir texto", 886 title: "incluir texto",
  887 + type: OpenLayers.Control.TYPE_TOOL,
871 persist: true, 888 persist: true,
872 callbacks:{ 889 callbacks:{
873 done: function(feature){ 890 done: function(feature){
@@ -903,6 +920,7 @@ i3GEO.editorOL = { @@ -903,6 +920,7 @@ i3GEO.editorOL = {
903 { 920 {
904 displayClass: "editorOLcorta", 921 displayClass: "editorOLcorta",
905 title: "corta figura", 922 title: "corta figura",
  923 + type: OpenLayers.Control.TYPE_TOOL,
906 clickout: true, 924 clickout: true,
907 toggle: true, 925 toggle: true,
908 trigger: function(){ 926 trigger: function(){
@@ -939,6 +957,7 @@ i3GEO.editorOL = { @@ -939,6 +957,7 @@ i3GEO.editorOL = {
939 { 957 {
940 displayClass: "editorOLedita", 958 displayClass: "editorOLedita",
941 title: "modifica figura", 959 title: "modifica figura",
  960 + type: OpenLayers.Control.TYPE_TOOL,
942 clickout: true, 961 clickout: true,
943 toggle: true, 962 toggle: true,
944 mode: OpenLayers.Control.ModifyFeature.RESHAPE 963 mode: OpenLayers.Control.ModifyFeature.RESHAPE
@@ -953,7 +972,8 @@ i3GEO.editorOL = { @@ -953,7 +972,8 @@ i3GEO.editorOL = {
953 trigger: function(){ 972 trigger: function(){
954 i3GEO.editorOL.listaGeometrias(); 973 i3GEO.editorOL.listaGeometrias();
955 }, 974 },
956 - title: "lista geometrias" 975 + title: "lista geometrias",
  976 + type: OpenLayers.Control.TYPE_BUTTON
957 }); 977 });
958 controles.push(button); 978 controles.push(button);
959 adiciona = true; 979 adiciona = true;
@@ -966,7 +986,8 @@ i3GEO.editorOL = { @@ -966,7 +986,8 @@ i3GEO.editorOL = {
966 if(document.getElementById("panellistagEditor")) 986 if(document.getElementById("panellistagEditor"))
967 {i3GEO.editorOL.listaGeometrias();} 987 {i3GEO.editorOL.listaGeometrias();}
968 }, 988 },
969 - title: "traz para frente" 989 + title: "traz para frente",
  990 + type: OpenLayers.Control.TYPE_BUTTON
970 }); 991 });
971 controles.push(button); 992 controles.push(button);
972 adiciona = true; 993 adiciona = true;
@@ -982,7 +1003,8 @@ i3GEO.editorOL = { @@ -982,7 +1003,8 @@ i3GEO.editorOL = {
982 {i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()");} 1003 {i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()");}
983 1004
984 }, 1005 },
985 - title: "ferramentas" 1006 + title: "ferramentas",
  1007 + type: OpenLayers.Control.TYPE_BUTTON
986 }); 1008 });
987 controles.push(button); 1009 controles.push(button);
988 adiciona = true; 1010 adiciona = true;
@@ -994,6 +1016,7 @@ i3GEO.editorOL = { @@ -994,6 +1016,7 @@ i3GEO.editorOL = {
994 { 1016 {
995 displayClass: "editorOLselecao", 1017 displayClass: "editorOLselecao",
996 title: "seleciona elemento", 1018 title: "seleciona elemento",
  1019 + type: OpenLayers.Control.TYPE_TOOL,
997 clickout: true, 1020 clickout: true,
998 toggle: true, 1021 toggle: true,
999 multiple: false, 1022 multiple: false,
@@ -1022,7 +1045,8 @@ i3GEO.editorOL = { @@ -1022,7 +1045,8 @@ i3GEO.editorOL = {
1022 else 1045 else
1023 {alert("Selecione pelo menos um elemento");} 1046 {alert("Selecione pelo menos um elemento");}
1024 }, 1047 },
1025 - title: "apaga selecionados" 1048 + title: "apaga selecionados",
  1049 + type: OpenLayers.Control.TYPE_BUTTON
1026 }); 1050 });
1027 controles.push(button); 1051 controles.push(button);
1028 adiciona = true; 1052 adiciona = true;
@@ -1043,7 +1067,8 @@ i3GEO.editorOL = { @@ -1043,7 +1067,8 @@ i3GEO.editorOL = {
1043 button = new OpenLayers.Control.Button({ 1067 button = new OpenLayers.Control.Button({
1044 displayClass: "editorOLpropriedades", 1068 displayClass: "editorOLpropriedades",
1045 trigger: function(){i3GEO.editorOL.propriedades();}, 1069 trigger: function(){i3GEO.editorOL.propriedades();},
1046 - title: "propriedades" 1070 + title: "propriedades",
  1071 + type: OpenLayers.Control.TYPE_BUTTON
1047 }); 1072 });
1048 controles.push(button); 1073 controles.push(button);
1049 adiciona = true; 1074 adiciona = true;
@@ -1052,7 +1077,8 @@ i3GEO.editorOL = { @@ -1052,7 +1077,8 @@ i3GEO.editorOL = {
1052 button = new OpenLayers.Control.Button({ 1077 button = new OpenLayers.Control.Button({
1053 displayClass: "editorOLsalva", 1078 displayClass: "editorOLsalva",
1054 trigger: function(){i3GEO.editorOL.salvaGeometrias();}, 1079 trigger: function(){i3GEO.editorOL.salvaGeometrias();},
1055 - title: "salva" 1080 + title: "salva",
  1081 + type: OpenLayers.Control.TYPE_BUTTON
1056 }); 1082 });
1057 controles.push(button); 1083 controles.push(button);
1058 adiciona = true; 1084 adiciona = true;
@@ -1066,7 +1092,8 @@ i3GEO.editorOL = { @@ -1066,7 +1092,8 @@ i3GEO.editorOL = {
1066 catch(e) 1092 catch(e)
1067 {window.open("openlayers_ajuda.php");} 1093 {window.open("openlayers_ajuda.php");}
1068 }, 1094 },
1069 - title: "ajuda" 1095 + title: "ajuda",
  1096 + type: OpenLayers.Control.TYPE_BUTTON
1070 }); 1097 });
1071 controles.push(button); 1098 controles.push(button);
1072 adiciona = true; 1099 adiciona = true;
@@ -1098,7 +1125,8 @@ i3GEO.editorOL = { @@ -1098,7 +1125,8 @@ i3GEO.editorOL = {
1098 catch(e){} 1125 catch(e){}
1099 } 1126 }
1100 }, 1127 },
1101 - title: "fecha editor" 1128 + title: "fecha editor",
  1129 + type: OpenLayers.Control.TYPE_BUTTON
1102 }); 1130 });
1103 controles.push(button); 1131 controles.push(button);
1104 adiciona = true; 1132 adiciona = true;
mashups/openlayers_compacto.js
@@ -1332,6 +1332,7 @@ var width=style.graphicWidth||style.graphicHeight; @@ -1332,6 +1332,7 @@ var width=style.graphicWidth||style.graphicHeight;
1332 var height=style.graphicHeight||style.graphicWidth; 1332 var height=style.graphicHeight||style.graphicWidth;
1333 width=width?width:style.pointRadius*2; 1333 width=width?width:style.pointRadius*2;
1334 height=height?height:style.pointRadius*2; 1334 height=height?height:style.pointRadius*2;
  1335 +//alert("oi");
1335 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width); 1336 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);
1336 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height); 1337 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);
1337 var opacity=style.graphicOpacity||style.fillOpacity; 1338 var opacity=style.graphicOpacity||style.fillOpacity;
@@ -1969,6 +1970,7 @@ var height=style.graphicHeight||style.graphicWidth; @@ -1969,6 +1970,7 @@ var height=style.graphicHeight||style.graphicWidth;
1969 width=width?width:style.pointRadius*2; 1970 width=width?width:style.pointRadius*2;
1970 height=height?height:style.pointRadius*2; 1971 height=height?height:style.pointRadius*2;
1971 width*=resolution;height*=resolution; 1972 width*=resolution;height*=resolution;
  1973 +//alert(width);
1972 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width); 1974 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width);
1973 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height); 1975 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height);
1974 var opacity=style.graphicOpacity||style.fillOpacity; 1976 var opacity=style.graphicOpacity||style.fillOpacity;
@@ -1983,6 +1985,7 @@ else if(this.isComplexSymbol(style.graphicName)){ @@ -1983,6 +1985,7 @@ else if(this.isComplexSymbol(style.graphicName)){
1983 //modificado por edmar 1985 //modificado por edmar
1984 style.label = " "; 1986 style.label = " ";
1985 style.pointRadius = 5; 1987 style.pointRadius = 5;
  1988 +//alert("oi");
1986 var offset=style.pointRadius*3*resolution;var size=offset*2;var src=this.importSymbol(style.graphicName);widthFactor=this.symbolMetrics[src.id].size*3/size*resolution;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);} 1989 var offset=style.pointRadius*3*resolution;var size=offset*2;var src=this.importSymbol(style.graphicName);widthFactor=this.symbolMetrics[src.id].size*3/size*resolution;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
1987 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",node._x-offset);node.setAttributeNS(null,"y",node._y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius*resolution);} 1990 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",node._x-offset);node.setAttributeNS(null,"y",node._y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius*resolution);}
1988 var rotation=style.rotation;if(rotation!==undefined||node._rotation!==undefined){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform",["rotate(",rotation,node._x,node._y,")"].join(" "));}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform",["rotate(",rotation,metrics.x,metrics.y,")"].join(" "));}}} 1991 var rotation=style.rotation;if(rotation!==undefined||node._rotation!==undefined){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform",["rotate(",rotation,node._x,node._y,")"].join(" "));}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform",["rotate(",rotation,metrics.x,metrics.y,")"].join(" "));}}}
@@ -2151,7 +2154,14 @@ this.root.setAttributeNS(null,"transform",transformString);this.translationParam @@ -2151,7 +2154,14 @@ this.root.setAttributeNS(null,"transform",transformString);this.translationParam
2151 break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;} 2154 break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;}
2152 return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);var label=this.nodeFactory(null,"title");label.textContent=style.graphicTitle;node.appendChild(label);} 2155 return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);var label=this.nodeFactory(null,"title");label.textContent=style.graphicTitle;node.appendChild(label);}
2153 if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");} 2156 if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");}
2154 -var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);node.onclick=OpenLayers.Renderer.SVG.preventDefault;}else if(this.isComplexSymbol(style.graphicName)){var offset=style.pointRadius*3;var size=offset*2;var src=this.importSymbol(style.graphicName);pos=this.getPosition(node);widthFactor=this.symbolMetrics[src.id][0]*3/size;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);} 2157 +var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);node.onclick=OpenLayers.Renderer.SVG.preventDefault;}else if(this.isComplexSymbol(style.graphicName)){
  2158 +//modificado por edmar
  2159 +style.label = " ";
  2160 +style.pointRadius = 5;
  2161 +var offset=style.pointRadius*3;var size=offset*2;
  2162 +var src=this.importSymbol(style.graphicName);pos=this.getPosition(node);
  2163 +widthFactor=this.symbolMetrics[src.id][0]*3/size;
  2164 +var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
2155 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);} 2165 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);}
2156 var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+ 2166 var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+
2157 pos.y+")");}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform","rotate(" 2167 pos.y+")");}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform","rotate("
@@ -2168,21 +2178,35 @@ d+=" z";if(draw){node.setAttributeNS(null,"d",d);node.setAttributeNS(null,"fill- @@ -2168,21 +2178,35 @@ d+=" z";if(draw){node.setAttributeNS(null,"d",d);node.setAttributeNS(null,"fill-
2168 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} 2178 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2169 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} 2179 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2170 d+=" "+component;}} 2180 d+=" "+component;}}
2171 -d+=" Z";if(draw){node.setAttributeNS(null,"d",d);return node;}else{return false;}},drawText:function(featureId,style,location){var resolution=this.getResolution();var x=(location.x/resolution+this.left);var y=(location.y/resolution-this.top);var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"text");label.setAttributeNS(null,"x",x);label.setAttributeNS(null,"y",-y);if(style.fontColor){label.setAttributeNS(null,"fill",style.fontColor);} 2181 +d+=" Z";if(draw){node.setAttributeNS(null,"d",d);return node;}else{return false;}},
  2182 +drawText:function(featureId,style,location){var resolution=this.getResolution();var x=(location.x/resolution+this.left);var y=(location.y/resolution-this.top);
  2183 +var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"text");
  2184 +label.setAttributeNS(null,"x",x);
  2185 +label.setAttributeNS(null,"y",-y);
  2186 +if(style.fontColor){label.setAttributeNS(null,"fill",style.fontColor);}
2172 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);} 2187 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);}
2173 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);} 2188 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);}
2174 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);} 2189 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);}
2175 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);} 2190 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);}
2176 if(style.fontStyle){label.setAttributeNS(null,"font-style",style.fontStyle);} 2191 if(style.fontStyle){label.setAttributeNS(null,"font-style",style.fontStyle);}
2177 -if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");label._featureId=featureId;}else{label.setAttributeNS(null,"pointer-events","none");} 2192 +if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");
  2193 +label._featureId=featureId;}else{label.setAttributeNS(null,"pointer-events","none");}
2178 var align=style.labelAlign||"cm";label.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]]||"middle");if(OpenLayers.IS_GECKO===true){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");} 2194 var align=style.labelAlign||"cm";label.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]]||"middle");if(OpenLayers.IS_GECKO===true){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");}
2179 var labelRows=style.label.split('\n');var numRows=labelRows.length;while(label.childNodes.length>numRows){label.removeChild(label.lastChild);} 2195 var labelRows=style.label.split('\n');var numRows=labelRows.length;while(label.childNodes.length>numRows){label.removeChild(label.lastChild);}
2180 -for(var i=0;i<numRows;i++){var tspan=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_tspan_"+i,"tspan");if(style.labelSelect===true){tspan._featureId=featureId;tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}  
2181 -if(OpenLayers.IS_GECKO===false){tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");} 2196 +for(var i=0;i<numRows;i++){
  2197 +var tspan=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_tspan_"+i,"tspan");
  2198 +if(style.labelSelect===true){tspan._featureId=featureId;
  2199 +tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}
  2200 +if(OpenLayers.IS_GECKO===false){
  2201 +tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");}
2182 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;} 2202 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;}
2183 tspan.setAttribute("dy",(vfactor*(numRows-1))+"em");}else{tspan.setAttribute("dy","1em");} 2203 tspan.setAttribute("dy",(vfactor*(numRows-1))+"em");}else{tspan.setAttribute("dy","1em");}
2184 -tspan.textContent=(labelRows[i]==='')?' ':labelRows[i];if(!tspan.parentNode){label.appendChild(tspan);}}  
2185 -if(!label.parentNode){this.textRoot.appendChild(label);}},getComponentsString:function(components,separator){var renderCmp=[];var complete=true;var len=components.length;var strings=[];var str,component;for(var i=0;i<len;i++){component=components[i];renderCmp.push(component);str=this.getShortString(component);if(str){strings.push(str);}else{if(i>0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}} 2204 +tspan.textContent=(labelRows[i]==='')?' ':labelRows[i];
  2205 +if(tspan.textContent == undefined || tspan.textContent == 'undefined')
  2206 +{tspan.textContent = "";}
  2207 +if(!tspan.parentNode){label.appendChild(tspan);}}
  2208 +if(!label.parentNode){this.textRoot.appendChild(label);}},
  2209 +getComponentsString:function(components,separator){var renderCmp=[];var complete=true;var len=components.length;var strings=[];var str,component;for(var i=0;i<len;i++){component=components[i];renderCmp.push(component);str=this.getShortString(component);if(str){strings.push(str);}else{if(i>0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}}
2186 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}} 2210 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}}
2187 complete=false;}} 2211 complete=false;}}
2188 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";} 2212 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";}
@@ -2733,6 +2757,7 @@ else{ @@ -2733,6 +2757,7 @@ else{
2733 var symbol=OpenLayers.Renderer.symbol[graphicName]; 2757 var symbol=OpenLayers.Renderer.symbol[graphicName];
2734 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;} 2758 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;}
2735 } 2759 }
  2760 +//alert("oi");
2736 var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var pathitems=["m"];for(var i=0;i<symbol.length;i=i+2){var x=symbol[i];var y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);pathitems.push(x);pathitems.push(y);if(i==0){pathitems.push("l");}} 2761 var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var pathitems=["m"];for(var i=0;i<symbol.length;i=i+2){var x=symbol[i];var y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);pathitems.push(x);pathitems.push(y);if(i==0){pathitems.push("l");}}
2737 pathitems.push("x e");var path=pathitems.join(" ");var diff=(symbolExtent.getWidth()-symbolExtent.getHeight())/2;if(diff>0){symbolExtent.bottom=symbolExtent.bottom-diff;symbolExtent.top=symbolExtent.top+diff;}else{symbolExtent.left=symbolExtent.left+diff;symbolExtent.right=symbolExtent.right-diff;} 2762 pathitems.push("x e");var path=pathitems.join(" ");var diff=(symbolExtent.getWidth()-symbolExtent.getHeight())/2;if(diff>0){symbolExtent.bottom=symbolExtent.bottom-diff;symbolExtent.top=symbolExtent.top+diff;}else{symbolExtent.left=symbolExtent.left+diff;symbolExtent.right=symbolExtent.right-diff;}
2738 cache={path:path,size:symbolExtent.getWidth(),left:symbolExtent.left,bottom:symbolExtent.bottom};this.symbolCache[id]=cache;return cache;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={"l":0,"c":.5,"r":1,"t":0,"m":.5,"b":1};OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10);}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div);}catch(e){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{'layerType':"MM",'layerLib':"MultiMap"});},setMapObjectCenter:function(center,zoom){this.mapObject.goToPosition(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition();},getMapObjectZoom:function(){return this.mapObject.getZoomFactor();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){moPixel.x=moPixel.x-(this.map.getSize().w/2);moPixel.y=moPixel.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.geoPosToContainerPixels(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lon:moLonLat.lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lat:moLonLat.lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var mmLatLon;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);mmLatLon=new MMLatLon(lonlat.lat,lonlat.lon);}else{mmLatLon=new MMLatLon(lat,lon);} 2763 cache={path:path,size:symbolExtent.getWidth(),left:symbolExtent.left,bottom:symbolExtent.bottom};this.symbolCache[id]=cache;return cache;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={"l":0,"c":.5,"r":1,"t":0,"m":.5,"b":1};OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10);}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div);}catch(e){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{'layerType':"MM",'layerLib':"MultiMap"});},setMapObjectCenter:function(center,zoom){this.mapObject.goToPosition(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition();},getMapObjectZoom:function(){return this.mapObject.getZoomFactor();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){moPixel.x=moPixel.x-(this.map.getSize().w/2);moPixel.y=moPixel.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.geoPosToContainerPixels(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lon:moLonLat.lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lat:moLonLat.lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var mmLatLon;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);mmLatLon=new MMLatLon(lonlat.lat,lonlat.lon);}else{mmLatLon=new MMLatLon(lat,lon);}
@@ -3615,7 +3640,7 @@ new OpenLayers.Rule({symbolizer: sketchSymbolizers}) @@ -3615,7 +3640,7 @@ new OpenLayers.Rule({symbolizer: sketchSymbolizers})
3615 ]); 3640 ]);
3616 i3GEOpanelEditor = new OpenLayers.Control.Panel({ 3641 i3GEOpanelEditor = new OpenLayers.Control.Panel({
3617 displayClass: "olControlEditingToolbar1 noprint", 3642 displayClass: "olControlEditingToolbar1 noprint",
3618 -saveState: true, 3643 +saveState: false,
3619 activateControl: function(c){ 3644 activateControl: function(c){
3620 this.deactivate(); 3645 this.deactivate();
3621 this.activate(); 3646 this.activate();
@@ -3625,33 +3650,42 @@ i3GEO.editorOL.ModifyFeature.deactivate(); @@ -3625,33 +3650,42 @@ i3GEO.editorOL.ModifyFeature.deactivate();
3625 catch(e){} 3650 catch(e){}
3626 if(!c.trigger) 3651 if(!c.trigger)
3627 {c.activate();} 3652 {c.activate();}
3628 -else{  
3629 -c.trigger.call();  
3630 -} 3653 +else
  3654 +{c.trigger.call();}
3631 } 3655 }
3632 }); 3656 });
3633 if(botoes.procura===true){ 3657 if(botoes.procura===true){
3634 button = new OpenLayers.Control.Button({ 3658 button = new OpenLayers.Control.Button({
3635 displayClass: "editorOLprocura", 3659 displayClass: "editorOLprocura",
3636 trigger: function(){YAHOO.procura.container.panel.show();}, 3660 trigger: function(){YAHOO.procura.container.panel.show();},
3637 -title: "procura" 3661 +title: "procura",
  3662 +type: OpenLayers.Control.TYPE_BUTTON
3638 }); 3663 });
3639 controles.push(button); 3664 controles.push(button);
3640 adiciona = true; 3665 adiciona = true;
3641 } 3666 }
3642 if(botoes.pan===true){ 3667 if(botoes.pan===true){
3643 -controles.push(new OpenLayers.Control.Navigation({title: "deslocar",displayClass:"editorOLpan"})); 3668 +controles.push(new OpenLayers.Control.Navigation({
  3669 +title: "deslocar",
  3670 +displayClass:"editorOLpan",
  3671 +type: OpenLayers.Control.TYPE_TOOL
  3672 +}));
3644 adiciona = true; 3673 adiciona = true;
3645 } 3674 }
3646 if(botoes.zoombox===true){ 3675 if(botoes.zoombox===true){
3647 -controles.push(new OpenLayers.Control.ZoomBox({title: "zoombox",displayClass: "editorOLzoombox"})); 3676 +controles.push(new OpenLayers.Control.ZoomBox({
  3677 +title: "zoombox",
  3678 +displayClass: "editorOLzoombox",
  3679 +type: OpenLayers.Control.TYPE_TOOL
  3680 +}));
3648 adiciona = true; 3681 adiciona = true;
3649 } 3682 }
3650 if(botoes.zoomtot===true){ 3683 if(botoes.zoomtot===true){
3651 button = new OpenLayers.Control.Button({ 3684 button = new OpenLayers.Control.Button({
3652 displayClass: "editorOLzoomtot", 3685 displayClass: "editorOLzoomtot",
3653 trigger: function(){i3GEO.editorOL.mapa.zoomToMaxExtent();}, 3686 trigger: function(){i3GEO.editorOL.mapa.zoomToMaxExtent();},
3654 -title: "ajusta extensão" 3687 +title: "ajusta extensão",
  3688 +type: OpenLayers.Control.TYPE_BUTTON
3655 }); 3689 });
3656 controles.push(button); 3690 controles.push(button);
3657 adiciona = true; 3691 adiciona = true;
@@ -3660,7 +3694,8 @@ if(botoes.legenda===true){ @@ -3660,7 +3694,8 @@ if(botoes.legenda===true){
3660 button = new OpenLayers.Control.Button({ 3694 button = new OpenLayers.Control.Button({
3661 displayClass: "editorOLlegenda", 3695 displayClass: "editorOLlegenda",
3662 trigger: function(){i3GEO.editorOL.mostraLegenda();}, 3696 trigger: function(){i3GEO.editorOL.mostraLegenda();},
3663 -title: "legenda" 3697 +title: "legenda",
  3698 +type: OpenLayers.Control.TYPE_BUTTON
3664 }); 3699 });
3665 controles.push(button); 3700 controles.push(button);
3666 adiciona = true; 3701 adiciona = true;
@@ -3672,7 +3707,8 @@ OpenLayers.Handler.Path, @@ -3672,7 +3707,8 @@ OpenLayers.Handler.Path,
3672 handlerOptions: {layerOptions: {styleMap: styleMap}}, 3707 handlerOptions: {layerOptions: {styleMap: styleMap}},
3673 persist: true, 3708 persist: true,
3674 displayClass: "editorOLdistancia", 3709 displayClass: "editorOLdistancia",
3675 -title: "distância" 3710 +title: "distância",
  3711 +type: OpenLayers.Control.TYPE_TOOL
3676 } 3712 }
3677 ); 3713 );
3678 button.events.on({ 3714 button.events.on({
@@ -3692,7 +3728,8 @@ OpenLayers.Handler.Polygon, @@ -3692,7 +3728,8 @@ OpenLayers.Handler.Polygon,
3692 handlerOptions: {layerOptions: {styleMap: styleMap}}, 3728 handlerOptions: {layerOptions: {styleMap: styleMap}},
3693 persist: true, 3729 persist: true,
3694 displayClass: "editorOLarea", 3730 displayClass: "editorOLarea",
3695 -title: "área" 3731 +title: "área",
  3732 +type: OpenLayers.Control.TYPE_TOOL
3696 } 3733 }
3697 ); 3734 );
3698 button.events.on({ 3735 button.events.on({
@@ -3712,6 +3749,7 @@ infoFormat:&#39;text/plain&#39;, //&#39;application/vnd.ogc.gml&#39;, @@ -3712,6 +3749,7 @@ infoFormat:&#39;text/plain&#39;, //&#39;application/vnd.ogc.gml&#39;,
3712 layers: [i3GEO.editorOL.layerAtivo()], 3749 layers: [i3GEO.editorOL.layerAtivo()],
3713 queryVisible: true, 3750 queryVisible: true,
3714 title: "identifica", 3751 title: "identifica",
  3752 +type: OpenLayers.Control.TYPE_TOOL,
3715 displayClass: "editorOLidentifica", 3753 displayClass: "editorOLidentifica",
3716 eventListeners: { 3754 eventListeners: {
3717 getfeatureinfo: function(event) { 3755 getfeatureinfo: function(event) {
@@ -3760,6 +3798,7 @@ OpenLayers.Handler.Path, @@ -3760,6 +3798,7 @@ OpenLayers.Handler.Path,
3760 { 3798 {
3761 displayClass: "editorOLlinha", 3799 displayClass: "editorOLlinha",
3762 title: "digitalizar linha", 3800 title: "digitalizar linha",
  3801 +type: OpenLayers.Control.TYPE_TOOL,
3763 callbacks:{ 3802 callbacks:{
3764 done: function(feature){ 3803 done: function(feature){
3765 var f = new OpenLayers.Feature.Vector(feature); 3804 var f = new OpenLayers.Feature.Vector(feature);
@@ -3789,6 +3828,7 @@ OpenLayers.Handler.Point, @@ -3789,6 +3828,7 @@ OpenLayers.Handler.Point,
3789 { 3828 {
3790 displayClass: "editorOLponto", 3829 displayClass: "editorOLponto",
3791 title: "digitalizar ponto", 3830 title: "digitalizar ponto",
  3831 +type: OpenLayers.Control.TYPE_TOOL,
3792 callbacks:{ 3832 callbacks:{
3793 done: function(feature){ 3833 done: function(feature){
3794 var f = new OpenLayers.Feature.Vector(feature); 3834 var f = new OpenLayers.Feature.Vector(feature);
@@ -3818,6 +3858,7 @@ OpenLayers.Handler.Polygon, @@ -3818,6 +3858,7 @@ OpenLayers.Handler.Polygon,
3818 { 3858 {
3819 displayClass: "editorOLpoligono", 3859 displayClass: "editorOLpoligono",
3820 title: "digitalizar polígono", 3860 title: "digitalizar polígono",
  3861 +type: OpenLayers.Control.TYPE_TOOL,
3821 //handlerOptions: {holeModifier: "altKey"}, 3862 //handlerOptions: {holeModifier: "altKey"},
3822 callbacks:{ 3863 callbacks:{
3823 done: function(feature){ 3864 done: function(feature){
@@ -3848,6 +3889,7 @@ OpenLayers.Handler.Point, @@ -3848,6 +3889,7 @@ OpenLayers.Handler.Point,
3848 { 3889 {
3849 displayClass: "editorOLtexto", 3890 displayClass: "editorOLtexto",
3850 title: "incluir texto", 3891 title: "incluir texto",
  3892 +type: OpenLayers.Control.TYPE_TOOL,
3851 persist: true, 3893 persist: true,
3852 callbacks:{ 3894 callbacks:{
3853 done: function(feature){ 3895 done: function(feature){
@@ -3883,6 +3925,7 @@ OpenLayers.Handler.Polygon, @@ -3883,6 +3925,7 @@ OpenLayers.Handler.Polygon,
3883 { 3925 {
3884 displayClass: "editorOLcorta", 3926 displayClass: "editorOLcorta",
3885 title: "corta figura", 3927 title: "corta figura",
  3928 +type: OpenLayers.Control.TYPE_TOOL,
3886 clickout: true, 3929 clickout: true,
3887 toggle: true, 3930 toggle: true,
3888 trigger: function(){ 3931 trigger: function(){
@@ -3919,6 +3962,7 @@ i3GEO.editorOL.layergrafico, @@ -3919,6 +3962,7 @@ i3GEO.editorOL.layergrafico,
3919 { 3962 {
3920 displayClass: "editorOLedita", 3963 displayClass: "editorOLedita",
3921 title: "modifica figura", 3964 title: "modifica figura",
  3965 +type: OpenLayers.Control.TYPE_TOOL,
3922 clickout: true, 3966 clickout: true,
3923 toggle: true, 3967 toggle: true,
3924 mode: OpenLayers.Control.ModifyFeature.RESHAPE 3968 mode: OpenLayers.Control.ModifyFeature.RESHAPE
@@ -3933,7 +3977,8 @@ displayClass: &quot;editorOLlistag&quot;, @@ -3933,7 +3977,8 @@ displayClass: &quot;editorOLlistag&quot;,
3933 trigger: function(){ 3977 trigger: function(){
3934 i3GEO.editorOL.listaGeometrias(); 3978 i3GEO.editorOL.listaGeometrias();
3935 }, 3979 },
3936 -title: "lista geometrias" 3980 +title: "lista geometrias",
  3981 +type: OpenLayers.Control.TYPE_BUTTON
3937 }); 3982 });
3938 controles.push(button); 3983 controles.push(button);
3939 adiciona = true; 3984 adiciona = true;
@@ -3946,7 +3991,8 @@ i3GEO.editorOL.trazParaFrente(); @@ -3946,7 +3991,8 @@ i3GEO.editorOL.trazParaFrente();
3946 if(document.getElementById("panellistagEditor")) 3991 if(document.getElementById("panellistagEditor"))
3947 {i3GEO.editorOL.listaGeometrias();} 3992 {i3GEO.editorOL.listaGeometrias();}
3948 }, 3993 },
3949 -title: "traz para frente" 3994 +title: "traz para frente",
  3995 +type: OpenLayers.Control.TYPE_BUTTON
3950 }); 3996 });
3951 controles.push(button); 3997 controles.push(button);
3952 adiciona = true; 3998 adiciona = true;
@@ -3961,7 +4007,8 @@ if(i3GEO.php) @@ -3961,7 +4007,8 @@ if(i3GEO.php)
3961 else 4007 else
3962 {i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()");} 4008 {i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()");}
3963 }, 4009 },
3964 -title: "ferramentas" 4010 +title: "ferramentas",
  4011 +type: OpenLayers.Control.TYPE_BUTTON
3965 }); 4012 });
3966 controles.push(button); 4013 controles.push(button);
3967 adiciona = true; 4014 adiciona = true;
@@ -3973,6 +4020,7 @@ i3GEO.editorOL.layergrafico, @@ -3973,6 +4020,7 @@ i3GEO.editorOL.layergrafico,
3973 { 4020 {
3974 displayClass: "editorOLselecao", 4021 displayClass: "editorOLselecao",
3975 title: "seleciona elemento", 4022 title: "seleciona elemento",
  4023 +type: OpenLayers.Control.TYPE_TOOL,
3976 clickout: true, 4024 clickout: true,
3977 toggle: true, 4025 toggle: true,
3978 multiple: false, 4026 multiple: false,
@@ -4001,7 +4049,8 @@ if(document.getElementById(&quot;panellistagEditor&quot;)) @@ -4001,7 +4049,8 @@ if(document.getElementById(&quot;panellistagEditor&quot;))
4001 else 4049 else
4002 {alert("Selecione pelo menos um elemento");} 4050 {alert("Selecione pelo menos um elemento");}
4003 }, 4051 },
4004 -title: "apaga selecionados" 4052 +title: "apaga selecionados",
  4053 +type: OpenLayers.Control.TYPE_BUTTON
4005 }); 4054 });
4006 controles.push(button); 4055 controles.push(button);
4007 adiciona = true; 4056 adiciona = true;
@@ -4022,7 +4071,8 @@ if(botoes.propriedades===true){ @@ -4022,7 +4071,8 @@ if(botoes.propriedades===true){
4022 button = new OpenLayers.Control.Button({ 4071 button = new OpenLayers.Control.Button({
4023 displayClass: "editorOLpropriedades", 4072 displayClass: "editorOLpropriedades",
4024 trigger: function(){i3GEO.editorOL.propriedades();}, 4073 trigger: function(){i3GEO.editorOL.propriedades();},
4025 -title: "propriedades" 4074 +title: "propriedades",
  4075 +type: OpenLayers.Control.TYPE_BUTTON
4026 }); 4076 });
4027 controles.push(button); 4077 controles.push(button);
4028 adiciona = true; 4078 adiciona = true;
@@ -4031,7 +4081,8 @@ if(botoes.salva===true){ @@ -4031,7 +4081,8 @@ if(botoes.salva===true){
4031 button = new OpenLayers.Control.Button({ 4081 button = new OpenLayers.Control.Button({
4032 displayClass: "editorOLsalva", 4082 displayClass: "editorOLsalva",
4033 trigger: function(){i3GEO.editorOL.salvaGeometrias();}, 4083 trigger: function(){i3GEO.editorOL.salvaGeometrias();},
4034 -title: "salva" 4084 +title: "salva",
  4085 +type: OpenLayers.Control.TYPE_BUTTON
4035 }); 4086 });
4036 controles.push(button); 4087 controles.push(button);
4037 adiciona = true; 4088 adiciona = true;
@@ -4045,7 +4096,8 @@ try @@ -4045,7 +4096,8 @@ try
4045 catch(e) 4096 catch(e)
4046 {window.open("openlayers_ajuda.php");} 4097 {window.open("openlayers_ajuda.php");}
4047 }, 4098 },
4048 -title: "ajuda" 4099 +title: "ajuda",
  4100 +type: OpenLayers.Control.TYPE_BUTTON
4049 }); 4101 });
4050 controles.push(button); 4102 controles.push(button);
4051 adiciona = true; 4103 adiciona = true;
@@ -4077,7 +4129,8 @@ if(i3GEO.editorOL.backup) @@ -4077,7 +4129,8 @@ if(i3GEO.editorOL.backup)
4077 catch(e){} 4129 catch(e){}
4078 } 4130 }
4079 }, 4131 },
4080 -title: "fecha editor" 4132 +title: "fecha editor",
  4133 +type: OpenLayers.Control.TYPE_BUTTON
4081 }); 4134 });
4082 controles.push(button); 4135 controles.push(button);
4083 adiciona = true; 4136 adiciona = true;
mashups/openlayers_compacto.js.php
@@ -1332,6 +1332,7 @@ var width=style.graphicWidth||style.graphicHeight; @@ -1332,6 +1332,7 @@ var width=style.graphicWidth||style.graphicHeight;
1332 var height=style.graphicHeight||style.graphicWidth; 1332 var height=style.graphicHeight||style.graphicWidth;
1333 width=width?width:style.pointRadius*2; 1333 width=width?width:style.pointRadius*2;
1334 height=height?height:style.pointRadius*2; 1334 height=height?height:style.pointRadius*2;
  1335 +//alert("oi");
1335 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width); 1336 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);
1336 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height); 1337 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);
1337 var opacity=style.graphicOpacity||style.fillOpacity; 1338 var opacity=style.graphicOpacity||style.fillOpacity;
@@ -1969,6 +1970,7 @@ var height=style.graphicHeight||style.graphicWidth; @@ -1969,6 +1970,7 @@ var height=style.graphicHeight||style.graphicWidth;
1969 width=width?width:style.pointRadius*2; 1970 width=width?width:style.pointRadius*2;
1970 height=height?height:style.pointRadius*2; 1971 height=height?height:style.pointRadius*2;
1971 width*=resolution;height*=resolution; 1972 width*=resolution;height*=resolution;
  1973 +//alert(width);
1972 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width); 1974 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width);
1973 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height); 1975 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height);
1974 var opacity=style.graphicOpacity||style.fillOpacity; 1976 var opacity=style.graphicOpacity||style.fillOpacity;
@@ -1983,6 +1985,7 @@ else if(this.isComplexSymbol(style.graphicName)){ @@ -1983,6 +1985,7 @@ else if(this.isComplexSymbol(style.graphicName)){
1983 //modificado por edmar 1985 //modificado por edmar
1984 style.label = " "; 1986 style.label = " ";
1985 style.pointRadius = 5; 1987 style.pointRadius = 5;
  1988 +//alert("oi");
1986 var offset=style.pointRadius*3*resolution;var size=offset*2;var src=this.importSymbol(style.graphicName);widthFactor=this.symbolMetrics[src.id].size*3/size*resolution;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);} 1989 var offset=style.pointRadius*3*resolution;var size=offset*2;var src=this.importSymbol(style.graphicName);widthFactor=this.symbolMetrics[src.id].size*3/size*resolution;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
1987 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",node._x-offset);node.setAttributeNS(null,"y",node._y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius*resolution);} 1990 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",node._x-offset);node.setAttributeNS(null,"y",node._y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius*resolution);}
1988 var rotation=style.rotation;if(rotation!==undefined||node._rotation!==undefined){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform",["rotate(",rotation,node._x,node._y,")"].join(" "));}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform",["rotate(",rotation,metrics.x,metrics.y,")"].join(" "));}}} 1991 var rotation=style.rotation;if(rotation!==undefined||node._rotation!==undefined){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform",["rotate(",rotation,node._x,node._y,")"].join(" "));}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform",["rotate(",rotation,metrics.x,metrics.y,")"].join(" "));}}}
@@ -2151,7 +2154,14 @@ this.root.setAttributeNS(null,&quot;transform&quot;,transformString);this.translationParam @@ -2151,7 +2154,14 @@ this.root.setAttributeNS(null,&quot;transform&quot;,transformString);this.translationParam
2151 break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;} 2154 break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;}
2152 return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);var label=this.nodeFactory(null,"title");label.textContent=style.graphicTitle;node.appendChild(label);} 2155 return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);var label=this.nodeFactory(null,"title");label.textContent=style.graphicTitle;node.appendChild(label);}
2153 if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");} 2156 if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");}
2154 -var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);node.onclick=OpenLayers.Renderer.SVG.preventDefault;}else if(this.isComplexSymbol(style.graphicName)){var offset=style.pointRadius*3;var size=offset*2;var src=this.importSymbol(style.graphicName);pos=this.getPosition(node);widthFactor=this.symbolMetrics[src.id][0]*3/size;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);} 2157 +var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);node.onclick=OpenLayers.Renderer.SVG.preventDefault;}else if(this.isComplexSymbol(style.graphicName)){
  2158 +//modificado por edmar
  2159 +style.label = " ";
  2160 +style.pointRadius = 5;
  2161 +var offset=style.pointRadius*3;var size=offset*2;
  2162 +var src=this.importSymbol(style.graphicName);pos=this.getPosition(node);
  2163 +widthFactor=this.symbolMetrics[src.id][0]*3/size;
  2164 +var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
2155 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);} 2165 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);}
2156 var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+ 2166 var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+
2157 pos.y+")");}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform","rotate(" 2167 pos.y+")");}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform","rotate("
@@ -2168,21 +2178,35 @@ d+=&quot; z&quot;;if(draw){node.setAttributeNS(null,&quot;d&quot;,d);node.setAttributeNS(null,&quot;fill- @@ -2168,21 +2178,35 @@ d+=&quot; z&quot;;if(draw){node.setAttributeNS(null,&quot;d&quot;,d);node.setAttributeNS(null,&quot;fill-
2168 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} 2178 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2169 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} 2179 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2170 d+=" "+component;}} 2180 d+=" "+component;}}
2171 -d+=" Z";if(draw){node.setAttributeNS(null,"d",d);return node;}else{return false;}},drawText:function(featureId,style,location){var resolution=this.getResolution();var x=(location.x/resolution+this.left);var y=(location.y/resolution-this.top);var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"text");label.setAttributeNS(null,"x",x);label.setAttributeNS(null,"y",-y);if(style.fontColor){label.setAttributeNS(null,"fill",style.fontColor);} 2181 +d+=" Z";if(draw){node.setAttributeNS(null,"d",d);return node;}else{return false;}},
  2182 +drawText:function(featureId,style,location){var resolution=this.getResolution();var x=(location.x/resolution+this.left);var y=(location.y/resolution-this.top);
  2183 +var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"text");
  2184 +label.setAttributeNS(null,"x",x);
  2185 +label.setAttributeNS(null,"y",-y);
  2186 +if(style.fontColor){label.setAttributeNS(null,"fill",style.fontColor);}
2172 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);} 2187 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);}
2173 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);} 2188 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);}
2174 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);} 2189 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);}
2175 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);} 2190 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);}
2176 if(style.fontStyle){label.setAttributeNS(null,"font-style",style.fontStyle);} 2191 if(style.fontStyle){label.setAttributeNS(null,"font-style",style.fontStyle);}
2177 -if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");label._featureId=featureId;}else{label.setAttributeNS(null,"pointer-events","none");} 2192 +if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");
  2193 +label._featureId=featureId;}else{label.setAttributeNS(null,"pointer-events","none");}
2178 var align=style.labelAlign||"cm";label.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]]||"middle");if(OpenLayers.IS_GECKO===true){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");} 2194 var align=style.labelAlign||"cm";label.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]]||"middle");if(OpenLayers.IS_GECKO===true){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");}
2179 var labelRows=style.label.split('\n');var numRows=labelRows.length;while(label.childNodes.length>numRows){label.removeChild(label.lastChild);} 2195 var labelRows=style.label.split('\n');var numRows=labelRows.length;while(label.childNodes.length>numRows){label.removeChild(label.lastChild);}
2180 -for(var i=0;i<numRows;i++){var tspan=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_tspan_"+i,"tspan");if(style.labelSelect===true){tspan._featureId=featureId;tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}  
2181 -if(OpenLayers.IS_GECKO===false){tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");} 2196 +for(var i=0;i<numRows;i++){
  2197 +var tspan=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_tspan_"+i,"tspan");
  2198 +if(style.labelSelect===true){tspan._featureId=featureId;
  2199 +tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}
  2200 +if(OpenLayers.IS_GECKO===false){
  2201 +tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");}
2182 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;} 2202 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;}
2183 tspan.setAttribute("dy",(vfactor*(numRows-1))+"em");}else{tspan.setAttribute("dy","1em");} 2203 tspan.setAttribute("dy",(vfactor*(numRows-1))+"em");}else{tspan.setAttribute("dy","1em");}
2184 -tspan.textContent=(labelRows[i]==='')?' ':labelRows[i];if(!tspan.parentNode){label.appendChild(tspan);}}  
2185 -if(!label.parentNode){this.textRoot.appendChild(label);}},getComponentsString:function(components,separator){var renderCmp=[];var complete=true;var len=components.length;var strings=[];var str,component;for(var i=0;i<len;i++){component=components[i];renderCmp.push(component);str=this.getShortString(component);if(str){strings.push(str);}else{if(i>0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}} 2204 +tspan.textContent=(labelRows[i]==='')?' ':labelRows[i];
  2205 +if(tspan.textContent == undefined || tspan.textContent == 'undefined')
  2206 +{tspan.textContent = "";}
  2207 +if(!tspan.parentNode){label.appendChild(tspan);}}
  2208 +if(!label.parentNode){this.textRoot.appendChild(label);}},
  2209 +getComponentsString:function(components,separator){var renderCmp=[];var complete=true;var len=components.length;var strings=[];var str,component;for(var i=0;i<len;i++){component=components[i];renderCmp.push(component);str=this.getShortString(component);if(str){strings.push(str);}else{if(i>0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}}
2186 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}} 2210 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}}
2187 complete=false;}} 2211 complete=false;}}
2188 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";} 2212 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";}
@@ -2733,6 +2757,7 @@ else{ @@ -2733,6 +2757,7 @@ else{
2733 var symbol=OpenLayers.Renderer.symbol[graphicName]; 2757 var symbol=OpenLayers.Renderer.symbol[graphicName];
2734 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;} 2758 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;}
2735 } 2759 }
  2760 +//alert("oi");
2736 var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var pathitems=["m"];for(var i=0;i<symbol.length;i=i+2){var x=symbol[i];var y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);pathitems.push(x);pathitems.push(y);if(i==0){pathitems.push("l");}} 2761 var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var pathitems=["m"];for(var i=0;i<symbol.length;i=i+2){var x=symbol[i];var y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);pathitems.push(x);pathitems.push(y);if(i==0){pathitems.push("l");}}
2737 pathitems.push("x e");var path=pathitems.join(" ");var diff=(symbolExtent.getWidth()-symbolExtent.getHeight())/2;if(diff>0){symbolExtent.bottom=symbolExtent.bottom-diff;symbolExtent.top=symbolExtent.top+diff;}else{symbolExtent.left=symbolExtent.left+diff;symbolExtent.right=symbolExtent.right-diff;} 2762 pathitems.push("x e");var path=pathitems.join(" ");var diff=(symbolExtent.getWidth()-symbolExtent.getHeight())/2;if(diff>0){symbolExtent.bottom=symbolExtent.bottom-diff;symbolExtent.top=symbolExtent.top+diff;}else{symbolExtent.left=symbolExtent.left+diff;symbolExtent.right=symbolExtent.right-diff;}
2738 cache={path:path,size:symbolExtent.getWidth(),left:symbolExtent.left,bottom:symbolExtent.bottom};this.symbolCache[id]=cache;return cache;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={"l":0,"c":.5,"r":1,"t":0,"m":.5,"b":1};OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10);}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div);}catch(e){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{'layerType':"MM",'layerLib':"MultiMap"});},setMapObjectCenter:function(center,zoom){this.mapObject.goToPosition(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition();},getMapObjectZoom:function(){return this.mapObject.getZoomFactor();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){moPixel.x=moPixel.x-(this.map.getSize().w/2);moPixel.y=moPixel.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.geoPosToContainerPixels(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lon:moLonLat.lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lat:moLonLat.lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var mmLatLon;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);mmLatLon=new MMLatLon(lonlat.lat,lonlat.lon);}else{mmLatLon=new MMLatLon(lat,lon);} 2763 cache={path:path,size:symbolExtent.getWidth(),left:symbolExtent.left,bottom:symbolExtent.bottom};this.symbolCache[id]=cache;return cache;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={"l":0,"c":.5,"r":1,"t":0,"m":.5,"b":1};OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10);}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div);}catch(e){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{'layerType':"MM",'layerLib':"MultiMap"});},setMapObjectCenter:function(center,zoom){this.mapObject.goToPosition(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition();},getMapObjectZoom:function(){return this.mapObject.getZoomFactor();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){moPixel.x=moPixel.x-(this.map.getSize().w/2);moPixel.y=moPixel.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.geoPosToContainerPixels(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lon:moLonLat.lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lat:moLonLat.lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var mmLatLon;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);mmLatLon=new MMLatLon(lonlat.lat,lonlat.lon);}else{mmLatLon=new MMLatLon(lat,lon);}
@@ -3615,7 +3640,7 @@ new OpenLayers.Rule({symbolizer: sketchSymbolizers}) @@ -3615,7 +3640,7 @@ new OpenLayers.Rule({symbolizer: sketchSymbolizers})
3615 ]); 3640 ]);
3616 i3GEOpanelEditor = new OpenLayers.Control.Panel({ 3641 i3GEOpanelEditor = new OpenLayers.Control.Panel({
3617 displayClass: "olControlEditingToolbar1 noprint", 3642 displayClass: "olControlEditingToolbar1 noprint",
3618 -saveState: true, 3643 +saveState: false,
3619 activateControl: function(c){ 3644 activateControl: function(c){
3620 this.deactivate(); 3645 this.deactivate();
3621 this.activate(); 3646 this.activate();
@@ -3625,33 +3650,42 @@ i3GEO.editorOL.ModifyFeature.deactivate(); @@ -3625,33 +3650,42 @@ i3GEO.editorOL.ModifyFeature.deactivate();
3625 catch(e){} 3650 catch(e){}
3626 if(!c.trigger) 3651 if(!c.trigger)
3627 {c.activate();} 3652 {c.activate();}
3628 -else{  
3629 -c.trigger.call();  
3630 -} 3653 +else
  3654 +{c.trigger.call();}
3631 } 3655 }
3632 }); 3656 });
3633 if(botoes.procura===true){ 3657 if(botoes.procura===true){
3634 button = new OpenLayers.Control.Button({ 3658 button = new OpenLayers.Control.Button({
3635 displayClass: "editorOLprocura", 3659 displayClass: "editorOLprocura",
3636 trigger: function(){YAHOO.procura.container.panel.show();}, 3660 trigger: function(){YAHOO.procura.container.panel.show();},
3637 -title: "procura" 3661 +title: "procura",
  3662 +type: OpenLayers.Control.TYPE_BUTTON
3638 }); 3663 });
3639 controles.push(button); 3664 controles.push(button);
3640 adiciona = true; 3665 adiciona = true;
3641 } 3666 }
3642 if(botoes.pan===true){ 3667 if(botoes.pan===true){
3643 -controles.push(new OpenLayers.Control.Navigation({title: "deslocar",displayClass:"editorOLpan"})); 3668 +controles.push(new OpenLayers.Control.Navigation({
  3669 +title: "deslocar",
  3670 +displayClass:"editorOLpan",
  3671 +type: OpenLayers.Control.TYPE_TOOL
  3672 +}));
3644 adiciona = true; 3673 adiciona = true;
3645 } 3674 }
3646 if(botoes.zoombox===true){ 3675 if(botoes.zoombox===true){
3647 -controles.push(new OpenLayers.Control.ZoomBox({title: "zoombox",displayClass: "editorOLzoombox"})); 3676 +controles.push(new OpenLayers.Control.ZoomBox({
  3677 +title: "zoombox",
  3678 +displayClass: "editorOLzoombox",
  3679 +type: OpenLayers.Control.TYPE_TOOL
  3680 +}));
3648 adiciona = true; 3681 adiciona = true;
3649 } 3682 }
3650 if(botoes.zoomtot===true){ 3683 if(botoes.zoomtot===true){
3651 button = new OpenLayers.Control.Button({ 3684 button = new OpenLayers.Control.Button({
3652 displayClass: "editorOLzoomtot", 3685 displayClass: "editorOLzoomtot",
3653 trigger: function(){i3GEO.editorOL.mapa.zoomToMaxExtent();}, 3686 trigger: function(){i3GEO.editorOL.mapa.zoomToMaxExtent();},
3654 -title: "ajusta extensão" 3687 +title: "ajusta extensão",
  3688 +type: OpenLayers.Control.TYPE_BUTTON
3655 }); 3689 });
3656 controles.push(button); 3690 controles.push(button);
3657 adiciona = true; 3691 adiciona = true;
@@ -3660,7 +3694,8 @@ if(botoes.legenda===true){ @@ -3660,7 +3694,8 @@ if(botoes.legenda===true){
3660 button = new OpenLayers.Control.Button({ 3694 button = new OpenLayers.Control.Button({
3661 displayClass: "editorOLlegenda", 3695 displayClass: "editorOLlegenda",
3662 trigger: function(){i3GEO.editorOL.mostraLegenda();}, 3696 trigger: function(){i3GEO.editorOL.mostraLegenda();},
3663 -title: "legenda" 3697 +title: "legenda",
  3698 +type: OpenLayers.Control.TYPE_BUTTON
3664 }); 3699 });
3665 controles.push(button); 3700 controles.push(button);
3666 adiciona = true; 3701 adiciona = true;
@@ -3672,7 +3707,8 @@ OpenLayers.Handler.Path, @@ -3672,7 +3707,8 @@ OpenLayers.Handler.Path,
3672 handlerOptions: {layerOptions: {styleMap: styleMap}}, 3707 handlerOptions: {layerOptions: {styleMap: styleMap}},
3673 persist: true, 3708 persist: true,
3674 displayClass: "editorOLdistancia", 3709 displayClass: "editorOLdistancia",
3675 -title: "distância" 3710 +title: "distância",
  3711 +type: OpenLayers.Control.TYPE_TOOL
3676 } 3712 }
3677 ); 3713 );
3678 button.events.on({ 3714 button.events.on({
@@ -3692,7 +3728,8 @@ OpenLayers.Handler.Polygon, @@ -3692,7 +3728,8 @@ OpenLayers.Handler.Polygon,
3692 handlerOptions: {layerOptions: {styleMap: styleMap}}, 3728 handlerOptions: {layerOptions: {styleMap: styleMap}},
3693 persist: true, 3729 persist: true,
3694 displayClass: "editorOLarea", 3730 displayClass: "editorOLarea",
3695 -title: "área" 3731 +title: "área",
  3732 +type: OpenLayers.Control.TYPE_TOOL
3696 } 3733 }
3697 ); 3734 );
3698 button.events.on({ 3735 button.events.on({
@@ -3712,6 +3749,7 @@ infoFormat:&#39;text/plain&#39;, //&#39;application/vnd.ogc.gml&#39;, @@ -3712,6 +3749,7 @@ infoFormat:&#39;text/plain&#39;, //&#39;application/vnd.ogc.gml&#39;,
3712 layers: [i3GEO.editorOL.layerAtivo()], 3749 layers: [i3GEO.editorOL.layerAtivo()],
3713 queryVisible: true, 3750 queryVisible: true,
3714 title: "identifica", 3751 title: "identifica",
  3752 +type: OpenLayers.Control.TYPE_TOOL,
3715 displayClass: "editorOLidentifica", 3753 displayClass: "editorOLidentifica",
3716 eventListeners: { 3754 eventListeners: {
3717 getfeatureinfo: function(event) { 3755 getfeatureinfo: function(event) {
@@ -3760,6 +3798,7 @@ OpenLayers.Handler.Path, @@ -3760,6 +3798,7 @@ OpenLayers.Handler.Path,
3760 { 3798 {
3761 displayClass: "editorOLlinha", 3799 displayClass: "editorOLlinha",
3762 title: "digitalizar linha", 3800 title: "digitalizar linha",
  3801 +type: OpenLayers.Control.TYPE_TOOL,
3763 callbacks:{ 3802 callbacks:{
3764 done: function(feature){ 3803 done: function(feature){
3765 var f = new OpenLayers.Feature.Vector(feature); 3804 var f = new OpenLayers.Feature.Vector(feature);
@@ -3789,6 +3828,7 @@ OpenLayers.Handler.Point, @@ -3789,6 +3828,7 @@ OpenLayers.Handler.Point,
3789 { 3828 {
3790 displayClass: "editorOLponto", 3829 displayClass: "editorOLponto",
3791 title: "digitalizar ponto", 3830 title: "digitalizar ponto",
  3831 +type: OpenLayers.Control.TYPE_TOOL,
3792 callbacks:{ 3832 callbacks:{
3793 done: function(feature){ 3833 done: function(feature){
3794 var f = new OpenLayers.Feature.Vector(feature); 3834 var f = new OpenLayers.Feature.Vector(feature);
@@ -3818,6 +3858,7 @@ OpenLayers.Handler.Polygon, @@ -3818,6 +3858,7 @@ OpenLayers.Handler.Polygon,
3818 { 3858 {
3819 displayClass: "editorOLpoligono", 3859 displayClass: "editorOLpoligono",
3820 title: "digitalizar polígono", 3860 title: "digitalizar polígono",
  3861 +type: OpenLayers.Control.TYPE_TOOL,
3821 //handlerOptions: {holeModifier: "altKey"}, 3862 //handlerOptions: {holeModifier: "altKey"},
3822 callbacks:{ 3863 callbacks:{
3823 done: function(feature){ 3864 done: function(feature){
@@ -3848,6 +3889,7 @@ OpenLayers.Handler.Point, @@ -3848,6 +3889,7 @@ OpenLayers.Handler.Point,
3848 { 3889 {
3849 displayClass: "editorOLtexto", 3890 displayClass: "editorOLtexto",
3850 title: "incluir texto", 3891 title: "incluir texto",
  3892 +type: OpenLayers.Control.TYPE_TOOL,
3851 persist: true, 3893 persist: true,
3852 callbacks:{ 3894 callbacks:{
3853 done: function(feature){ 3895 done: function(feature){
@@ -3883,6 +3925,7 @@ OpenLayers.Handler.Polygon, @@ -3883,6 +3925,7 @@ OpenLayers.Handler.Polygon,
3883 { 3925 {
3884 displayClass: "editorOLcorta", 3926 displayClass: "editorOLcorta",
3885 title: "corta figura", 3927 title: "corta figura",
  3928 +type: OpenLayers.Control.TYPE_TOOL,
3886 clickout: true, 3929 clickout: true,
3887 toggle: true, 3930 toggle: true,
3888 trigger: function(){ 3931 trigger: function(){
@@ -3919,6 +3962,7 @@ i3GEO.editorOL.layergrafico, @@ -3919,6 +3962,7 @@ i3GEO.editorOL.layergrafico,
3919 { 3962 {
3920 displayClass: "editorOLedita", 3963 displayClass: "editorOLedita",
3921 title: "modifica figura", 3964 title: "modifica figura",
  3965 +type: OpenLayers.Control.TYPE_TOOL,
3922 clickout: true, 3966 clickout: true,
3923 toggle: true, 3967 toggle: true,
3924 mode: OpenLayers.Control.ModifyFeature.RESHAPE 3968 mode: OpenLayers.Control.ModifyFeature.RESHAPE
@@ -3933,7 +3977,8 @@ displayClass: &quot;editorOLlistag&quot;, @@ -3933,7 +3977,8 @@ displayClass: &quot;editorOLlistag&quot;,
3933 trigger: function(){ 3977 trigger: function(){
3934 i3GEO.editorOL.listaGeometrias(); 3978 i3GEO.editorOL.listaGeometrias();
3935 }, 3979 },
3936 -title: "lista geometrias" 3980 +title: "lista geometrias",
  3981 +type: OpenLayers.Control.TYPE_BUTTON
3937 }); 3982 });
3938 controles.push(button); 3983 controles.push(button);
3939 adiciona = true; 3984 adiciona = true;
@@ -3946,7 +3991,8 @@ i3GEO.editorOL.trazParaFrente(); @@ -3946,7 +3991,8 @@ i3GEO.editorOL.trazParaFrente();
3946 if(document.getElementById("panellistagEditor")) 3991 if(document.getElementById("panellistagEditor"))
3947 {i3GEO.editorOL.listaGeometrias();} 3992 {i3GEO.editorOL.listaGeometrias();}
3948 }, 3993 },
3949 -title: "traz para frente" 3994 +title: "traz para frente",
  3995 +type: OpenLayers.Control.TYPE_BUTTON
3950 }); 3996 });
3951 controles.push(button); 3997 controles.push(button);
3952 adiciona = true; 3998 adiciona = true;
@@ -3961,7 +4007,8 @@ if(i3GEO.php) @@ -3961,7 +4007,8 @@ if(i3GEO.php)
3961 else 4007 else
3962 {i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()");} 4008 {i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()");}
3963 }, 4009 },
3964 -title: "ferramentas" 4010 +title: "ferramentas",
  4011 +type: OpenLayers.Control.TYPE_BUTTON
3965 }); 4012 });
3966 controles.push(button); 4013 controles.push(button);
3967 adiciona = true; 4014 adiciona = true;
@@ -3973,6 +4020,7 @@ i3GEO.editorOL.layergrafico, @@ -3973,6 +4020,7 @@ i3GEO.editorOL.layergrafico,
3973 { 4020 {
3974 displayClass: "editorOLselecao", 4021 displayClass: "editorOLselecao",
3975 title: "seleciona elemento", 4022 title: "seleciona elemento",
  4023 +type: OpenLayers.Control.TYPE_TOOL,
3976 clickout: true, 4024 clickout: true,
3977 toggle: true, 4025 toggle: true,
3978 multiple: false, 4026 multiple: false,
@@ -4001,7 +4049,8 @@ if(document.getElementById(&quot;panellistagEditor&quot;)) @@ -4001,7 +4049,8 @@ if(document.getElementById(&quot;panellistagEditor&quot;))
4001 else 4049 else
4002 {alert("Selecione pelo menos um elemento");} 4050 {alert("Selecione pelo menos um elemento");}
4003 }, 4051 },
4004 -title: "apaga selecionados" 4052 +title: "apaga selecionados",
  4053 +type: OpenLayers.Control.TYPE_BUTTON
4005 }); 4054 });
4006 controles.push(button); 4055 controles.push(button);
4007 adiciona = true; 4056 adiciona = true;
@@ -4022,7 +4071,8 @@ if(botoes.propriedades===true){ @@ -4022,7 +4071,8 @@ if(botoes.propriedades===true){
4022 button = new OpenLayers.Control.Button({ 4071 button = new OpenLayers.Control.Button({
4023 displayClass: "editorOLpropriedades", 4072 displayClass: "editorOLpropriedades",
4024 trigger: function(){i3GEO.editorOL.propriedades();}, 4073 trigger: function(){i3GEO.editorOL.propriedades();},
4025 -title: "propriedades" 4074 +title: "propriedades",
  4075 +type: OpenLayers.Control.TYPE_BUTTON
4026 }); 4076 });
4027 controles.push(button); 4077 controles.push(button);
4028 adiciona = true; 4078 adiciona = true;
@@ -4031,7 +4081,8 @@ if(botoes.salva===true){ @@ -4031,7 +4081,8 @@ if(botoes.salva===true){
4031 button = new OpenLayers.Control.Button({ 4081 button = new OpenLayers.Control.Button({
4032 displayClass: "editorOLsalva", 4082 displayClass: "editorOLsalva",
4033 trigger: function(){i3GEO.editorOL.salvaGeometrias();}, 4083 trigger: function(){i3GEO.editorOL.salvaGeometrias();},
4034 -title: "salva" 4084 +title: "salva",
  4085 +type: OpenLayers.Control.TYPE_BUTTON
4035 }); 4086 });
4036 controles.push(button); 4087 controles.push(button);
4037 adiciona = true; 4088 adiciona = true;
@@ -4045,7 +4096,8 @@ try @@ -4045,7 +4096,8 @@ try
4045 catch(e) 4096 catch(e)
4046 {window.open("openlayers_ajuda.php");} 4097 {window.open("openlayers_ajuda.php");}
4047 }, 4098 },
4048 -title: "ajuda" 4099 +title: "ajuda",
  4100 +type: OpenLayers.Control.TYPE_BUTTON
4049 }); 4101 });
4050 controles.push(button); 4102 controles.push(button);
4051 adiciona = true; 4103 adiciona = true;
@@ -4077,7 +4129,8 @@ if(i3GEO.editorOL.backup) @@ -4077,7 +4129,8 @@ if(i3GEO.editorOL.backup)
4077 catch(e){} 4129 catch(e){}
4078 } 4130 }
4079 }, 4131 },
4080 -title: "fecha editor" 4132 +title: "fecha editor",
  4133 +type: OpenLayers.Control.TYPE_BUTTON
4081 }); 4134 });
4082 controles.push(button); 4135 controles.push(button);
4083 adiciona = true; 4136 adiciona = true;
pacotes/openlayers/OpenLayers211.js
@@ -1299,7 +1299,7 @@ var height=style.graphicHeight||style.graphicWidth; @@ -1299,7 +1299,7 @@ var height=style.graphicHeight||style.graphicWidth;
1299 1299
1300 width=width?width:style.pointRadius*2; 1300 width=width?width:style.pointRadius*2;
1301 height=height?height:style.pointRadius*2; 1301 height=height?height:style.pointRadius*2;
1302 - 1302 +//alert("oi");
1303 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width); 1303 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);
1304 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height); 1304 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);
1305 var opacity=style.graphicOpacity||style.fillOpacity; 1305 var opacity=style.graphicOpacity||style.fillOpacity;
@@ -1939,7 +1939,7 @@ var height=style.graphicHeight||style.graphicWidth; @@ -1939,7 +1939,7 @@ var height=style.graphicHeight||style.graphicWidth;
1939 width=width?width:style.pointRadius*2; 1939 width=width?width:style.pointRadius*2;
1940 height=height?height:style.pointRadius*2; 1940 height=height?height:style.pointRadius*2;
1941 width*=resolution;height*=resolution; 1941 width*=resolution;height*=resolution;
1942 - 1942 +//alert(width);
1943 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width); 1943 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width);
1944 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height); 1944 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height);
1945 var opacity=style.graphicOpacity||style.fillOpacity; 1945 var opacity=style.graphicOpacity||style.fillOpacity;
@@ -1954,7 +1954,7 @@ else if(this.isComplexSymbol(style.graphicName)){ @@ -1954,7 +1954,7 @@ else if(this.isComplexSymbol(style.graphicName)){
1954 //modificado por edmar 1954 //modificado por edmar
1955 style.label = " "; 1955 style.label = " ";
1956 style.pointRadius = 5; 1956 style.pointRadius = 5;
1957 - 1957 +//alert("oi");
1958 var offset=style.pointRadius*3*resolution;var size=offset*2;var src=this.importSymbol(style.graphicName);widthFactor=this.symbolMetrics[src.id].size*3/size*resolution;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);} 1958 var offset=style.pointRadius*3*resolution;var size=offset*2;var src=this.importSymbol(style.graphicName);widthFactor=this.symbolMetrics[src.id].size*3/size*resolution;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
1959 1959
1960 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",node._x-offset);node.setAttributeNS(null,"y",node._y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius*resolution);} 1960 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",node._x-offset);node.setAttributeNS(null,"y",node._y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius*resolution);}
@@ -2129,7 +2129,14 @@ this.root.setAttributeNS(null,&quot;transform&quot;,transformString);this.translationParam @@ -2129,7 +2129,14 @@ this.root.setAttributeNS(null,&quot;transform&quot;,transformString);this.translationParam
2129 break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;} 2129 break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;}
2130 return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);var label=this.nodeFactory(null,"title");label.textContent=style.graphicTitle;node.appendChild(label);} 2130 return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);var label=this.nodeFactory(null,"title");label.textContent=style.graphicTitle;node.appendChild(label);}
2131 if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");} 2131 if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");}
2132 -var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);node.onclick=OpenLayers.Renderer.SVG.preventDefault;}else if(this.isComplexSymbol(style.graphicName)){var offset=style.pointRadius*3;var size=offset*2;var src=this.importSymbol(style.graphicName);pos=this.getPosition(node);widthFactor=this.symbolMetrics[src.id][0]*3/size;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);} 2132 +var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);node.onclick=OpenLayers.Renderer.SVG.preventDefault;}else if(this.isComplexSymbol(style.graphicName)){
  2133 + //modificado por edmar
  2134 + style.label = " ";
  2135 + style.pointRadius = 5;
  2136 +var offset=style.pointRadius*3;var size=offset*2;
  2137 +var src=this.importSymbol(style.graphicName);pos=this.getPosition(node);
  2138 +widthFactor=this.symbolMetrics[src.id][0]*3/size;
  2139 +var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
2133 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);} 2140 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);}
2134 var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+ 2141 var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+
2135 pos.y+")");}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform","rotate(" 2142 pos.y+")");}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform","rotate("
@@ -2146,21 +2153,38 @@ d+=&quot; z&quot;;if(draw){node.setAttributeNS(null,&quot;d&quot;,d);node.setAttributeNS(null,&quot;fill- @@ -2146,21 +2153,38 @@ d+=&quot; z&quot;;if(draw){node.setAttributeNS(null,&quot;d&quot;,d);node.setAttributeNS(null,&quot;fill-
2146 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} 2153 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2147 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} 2154 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2148 d+=" "+component;}} 2155 d+=" "+component;}}
2149 -d+=" Z";if(draw){node.setAttributeNS(null,"d",d);return node;}else{return false;}},drawText:function(featureId,style,location){var resolution=this.getResolution();var x=(location.x/resolution+this.left);var y=(location.y/resolution-this.top);var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"text");label.setAttributeNS(null,"x",x);label.setAttributeNS(null,"y",-y);if(style.fontColor){label.setAttributeNS(null,"fill",style.fontColor);} 2156 +d+=" Z";if(draw){node.setAttributeNS(null,"d",d);return node;}else{return false;}},
  2157 +drawText:function(featureId,style,location){var resolution=this.getResolution();var x=(location.x/resolution+this.left);var y=(location.y/resolution-this.top);
  2158 +var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"text");
  2159 +label.setAttributeNS(null,"x",x);
  2160 +label.setAttributeNS(null,"y",-y);
  2161 +if(style.fontColor){label.setAttributeNS(null,"fill",style.fontColor);}
2150 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);} 2162 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);}
2151 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);} 2163 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);}
2152 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);} 2164 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);}
2153 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);} 2165 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);}
2154 if(style.fontStyle){label.setAttributeNS(null,"font-style",style.fontStyle);} 2166 if(style.fontStyle){label.setAttributeNS(null,"font-style",style.fontStyle);}
2155 -if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");label._featureId=featureId;}else{label.setAttributeNS(null,"pointer-events","none");} 2167 +if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");
  2168 +label._featureId=featureId;}else{label.setAttributeNS(null,"pointer-events","none");}
2156 var align=style.labelAlign||"cm";label.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]]||"middle");if(OpenLayers.IS_GECKO===true){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");} 2169 var align=style.labelAlign||"cm";label.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]]||"middle");if(OpenLayers.IS_GECKO===true){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");}
2157 var labelRows=style.label.split('\n');var numRows=labelRows.length;while(label.childNodes.length>numRows){label.removeChild(label.lastChild);} 2170 var labelRows=style.label.split('\n');var numRows=labelRows.length;while(label.childNodes.length>numRows){label.removeChild(label.lastChild);}
2158 -for(var i=0;i<numRows;i++){var tspan=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_tspan_"+i,"tspan");if(style.labelSelect===true){tspan._featureId=featureId;tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}  
2159 -if(OpenLayers.IS_GECKO===false){tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");} 2171 +for(var i=0;i<numRows;i++){
  2172 +
  2173 +var tspan=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_tspan_"+i,"tspan");
  2174 +if(style.labelSelect===true){tspan._featureId=featureId;
  2175 +tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}
  2176 +if(OpenLayers.IS_GECKO===false){
  2177 +tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");}
2160 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;} 2178 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;}
2161 tspan.setAttribute("dy",(vfactor*(numRows-1))+"em");}else{tspan.setAttribute("dy","1em");} 2179 tspan.setAttribute("dy",(vfactor*(numRows-1))+"em");}else{tspan.setAttribute("dy","1em");}
2162 -tspan.textContent=(labelRows[i]==='')?' ':labelRows[i];if(!tspan.parentNode){label.appendChild(tspan);}}  
2163 -if(!label.parentNode){this.textRoot.appendChild(label);}},getComponentsString:function(components,separator){var renderCmp=[];var complete=true;var len=components.length;var strings=[];var str,component;for(var i=0;i<len;i++){component=components[i];renderCmp.push(component);str=this.getShortString(component);if(str){strings.push(str);}else{if(i>0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}} 2180 +
  2181 +tspan.textContent=(labelRows[i]==='')?' ':labelRows[i];
  2182 +if(tspan.textContent == undefined || tspan.textContent == 'undefined')
  2183 +{tspan.textContent = "";}
  2184 +if(!tspan.parentNode){label.appendChild(tspan);}}
  2185 +
  2186 +if(!label.parentNode){this.textRoot.appendChild(label);}},
  2187 +getComponentsString:function(components,separator){var renderCmp=[];var complete=true;var len=components.length;var strings=[];var str,component;for(var i=0;i<len;i++){component=components[i];renderCmp.push(component);str=this.getShortString(component);if(str){strings.push(str);}else{if(i>0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}}
2164 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}} 2188 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}}
2165 complete=false;}} 2189 complete=false;}}
2166 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";} 2190 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";}
@@ -2715,7 +2739,7 @@ else{ @@ -2715,7 +2739,7 @@ else{
2715 var symbol=OpenLayers.Renderer.symbol[graphicName]; 2739 var symbol=OpenLayers.Renderer.symbol[graphicName];
2716 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;} 2740 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;}
2717 } 2741 }
2718 - 2742 +//alert("oi");
2719 var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var pathitems=["m"];for(var i=0;i<symbol.length;i=i+2){var x=symbol[i];var y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);pathitems.push(x);pathitems.push(y);if(i==0){pathitems.push("l");}} 2743 var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var pathitems=["m"];for(var i=0;i<symbol.length;i=i+2){var x=symbol[i];var y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);pathitems.push(x);pathitems.push(y);if(i==0){pathitems.push("l");}}
2720 pathitems.push("x e");var path=pathitems.join(" ");var diff=(symbolExtent.getWidth()-symbolExtent.getHeight())/2;if(diff>0){symbolExtent.bottom=symbolExtent.bottom-diff;symbolExtent.top=symbolExtent.top+diff;}else{symbolExtent.left=symbolExtent.left+diff;symbolExtent.right=symbolExtent.right-diff;} 2744 pathitems.push("x e");var path=pathitems.join(" ");var diff=(symbolExtent.getWidth()-symbolExtent.getHeight())/2;if(diff>0){symbolExtent.bottom=symbolExtent.bottom-diff;symbolExtent.top=symbolExtent.top+diff;}else{symbolExtent.left=symbolExtent.left+diff;symbolExtent.right=symbolExtent.right-diff;}
2721 cache={path:path,size:symbolExtent.getWidth(),left:symbolExtent.left,bottom:symbolExtent.bottom};this.symbolCache[id]=cache;return cache;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={"l":0,"c":.5,"r":1,"t":0,"m":.5,"b":1};OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10);}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div);}catch(e){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{'layerType':"MM",'layerLib':"MultiMap"});},setMapObjectCenter:function(center,zoom){this.mapObject.goToPosition(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition();},getMapObjectZoom:function(){return this.mapObject.getZoomFactor();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){moPixel.x=moPixel.x-(this.map.getSize().w/2);moPixel.y=moPixel.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.geoPosToContainerPixels(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lon:moLonLat.lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lat:moLonLat.lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var mmLatLon;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);mmLatLon=new MMLatLon(lonlat.lat,lonlat.lon);}else{mmLatLon=new MMLatLon(lat,lon);} 2745 cache={path:path,size:symbolExtent.getWidth(),left:symbolExtent.left,bottom:symbolExtent.bottom};this.symbolCache[id]=cache;return cache;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={"l":0,"c":.5,"r":1,"t":0,"m":.5,"b":1};OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10);}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div);}catch(e){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{'layerType':"MM",'layerLib':"MultiMap"});},setMapObjectCenter:function(center,zoom){this.mapObject.goToPosition(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition();},getMapObjectZoom:function(){return this.mapObject.getZoomFactor();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){moPixel.x=moPixel.x-(this.map.getSize().w/2);moPixel.y=moPixel.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.geoPosToContainerPixels(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lon:moLonLat.lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lat:moLonLat.lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var mmLatLon;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);mmLatLon=new MMLatLon(lonlat.lat,lonlat.lon);}else{mmLatLon=new MMLatLon(lat,lon);}
pacotes/openlayers/OpenLayers211.js.php
@@ -1300,7 +1300,7 @@ var height=style.graphicHeight||style.graphicWidth; @@ -1300,7 +1300,7 @@ var height=style.graphicHeight||style.graphicWidth;
1300 1300
1301 width=width?width:style.pointRadius*2; 1301 width=width?width:style.pointRadius*2;
1302 height=height?height:style.pointRadius*2; 1302 height=height?height:style.pointRadius*2;
1303 - 1303 +//alert("oi");
1304 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width); 1304 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);
1305 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height); 1305 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);
1306 var opacity=style.graphicOpacity||style.fillOpacity; 1306 var opacity=style.graphicOpacity||style.fillOpacity;
@@ -1940,7 +1940,7 @@ var height=style.graphicHeight||style.graphicWidth; @@ -1940,7 +1940,7 @@ var height=style.graphicHeight||style.graphicWidth;
1940 width=width?width:style.pointRadius*2; 1940 width=width?width:style.pointRadius*2;
1941 height=height?height:style.pointRadius*2; 1941 height=height?height:style.pointRadius*2;
1942 width*=resolution;height*=resolution; 1942 width*=resolution;height*=resolution;
1943 - 1943 +//alert(width);
1944 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width); 1944 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width);
1945 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height); 1945 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height);
1946 var opacity=style.graphicOpacity||style.fillOpacity; 1946 var opacity=style.graphicOpacity||style.fillOpacity;
@@ -1955,7 +1955,7 @@ else if(this.isComplexSymbol(style.graphicName)){ @@ -1955,7 +1955,7 @@ else if(this.isComplexSymbol(style.graphicName)){
1955 //modificado por edmar 1955 //modificado por edmar
1956 style.label = " "; 1956 style.label = " ";
1957 style.pointRadius = 5; 1957 style.pointRadius = 5;
1958 - 1958 +//alert("oi");
1959 var offset=style.pointRadius*3*resolution;var size=offset*2;var src=this.importSymbol(style.graphicName);widthFactor=this.symbolMetrics[src.id].size*3/size*resolution;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);} 1959 var offset=style.pointRadius*3*resolution;var size=offset*2;var src=this.importSymbol(style.graphicName);widthFactor=this.symbolMetrics[src.id].size*3/size*resolution;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
1960 1960
1961 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",node._x-offset);node.setAttributeNS(null,"y",node._y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius*resolution);} 1961 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",node._x-offset);node.setAttributeNS(null,"y",node._y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius*resolution);}
@@ -2130,7 +2130,14 @@ this.root.setAttributeNS(null,&quot;transform&quot;,transformString);this.translationParam @@ -2130,7 +2130,14 @@ this.root.setAttributeNS(null,&quot;transform&quot;,transformString);this.translationParam
2130 break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;} 2130 break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;}
2131 return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);var label=this.nodeFactory(null,"title");label.textContent=style.graphicTitle;node.appendChild(label);} 2131 return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);var label=this.nodeFactory(null,"title");label.textContent=style.graphicTitle;node.appendChild(label);}
2132 if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");} 2132 if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");}
2133 -var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);node.onclick=OpenLayers.Renderer.SVG.preventDefault;}else if(this.isComplexSymbol(style.graphicName)){var offset=style.pointRadius*3;var size=offset*2;var src=this.importSymbol(style.graphicName);pos=this.getPosition(node);widthFactor=this.symbolMetrics[src.id][0]*3/size;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);} 2133 +var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);node.onclick=OpenLayers.Renderer.SVG.preventDefault;}else if(this.isComplexSymbol(style.graphicName)){
  2134 + //modificado por edmar
  2135 + style.label = " ";
  2136 + style.pointRadius = 5;
  2137 +var offset=style.pointRadius*3;var size=offset*2;
  2138 +var src=this.importSymbol(style.graphicName);pos=this.getPosition(node);
  2139 +widthFactor=this.symbolMetrics[src.id][0]*3/size;
  2140 +var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
2134 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);} 2141 node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);}
2135 var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+ 2142 var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+
2136 pos.y+")");}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform","rotate(" 2143 pos.y+")");}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform","rotate("
@@ -2147,21 +2154,38 @@ d+=&quot; z&quot;;if(draw){node.setAttributeNS(null,&quot;d&quot;,d);node.setAttributeNS(null,&quot;fill- @@ -2147,21 +2154,38 @@ d+=&quot; z&quot;;if(draw){node.setAttributeNS(null,&quot;d&quot;,d);node.setAttributeNS(null,&quot;fill-
2147 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} 2154 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2148 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} 2155 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2149 d+=" "+component;}} 2156 d+=" "+component;}}
2150 -d+=" Z";if(draw){node.setAttributeNS(null,"d",d);return node;}else{return false;}},drawText:function(featureId,style,location){var resolution=this.getResolution();var x=(location.x/resolution+this.left);var y=(location.y/resolution-this.top);var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"text");label.setAttributeNS(null,"x",x);label.setAttributeNS(null,"y",-y);if(style.fontColor){label.setAttributeNS(null,"fill",style.fontColor);} 2157 +d+=" Z";if(draw){node.setAttributeNS(null,"d",d);return node;}else{return false;}},
  2158 +drawText:function(featureId,style,location){var resolution=this.getResolution();var x=(location.x/resolution+this.left);var y=(location.y/resolution-this.top);
  2159 +var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"text");
  2160 +label.setAttributeNS(null,"x",x);
  2161 +label.setAttributeNS(null,"y",-y);
  2162 +if(style.fontColor){label.setAttributeNS(null,"fill",style.fontColor);}
2151 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);} 2163 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);}
2152 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);} 2164 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);}
2153 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);} 2165 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);}
2154 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);} 2166 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);}
2155 if(style.fontStyle){label.setAttributeNS(null,"font-style",style.fontStyle);} 2167 if(style.fontStyle){label.setAttributeNS(null,"font-style",style.fontStyle);}
2156 -if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");label._featureId=featureId;}else{label.setAttributeNS(null,"pointer-events","none");} 2168 +if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");
  2169 +label._featureId=featureId;}else{label.setAttributeNS(null,"pointer-events","none");}
2157 var align=style.labelAlign||"cm";label.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]]||"middle");if(OpenLayers.IS_GECKO===true){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");} 2170 var align=style.labelAlign||"cm";label.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]]||"middle");if(OpenLayers.IS_GECKO===true){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");}
2158 var labelRows=style.label.split('\n');var numRows=labelRows.length;while(label.childNodes.length>numRows){label.removeChild(label.lastChild);} 2171 var labelRows=style.label.split('\n');var numRows=labelRows.length;while(label.childNodes.length>numRows){label.removeChild(label.lastChild);}
2159 -for(var i=0;i<numRows;i++){var tspan=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_tspan_"+i,"tspan");if(style.labelSelect===true){tspan._featureId=featureId;tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}  
2160 -if(OpenLayers.IS_GECKO===false){tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");} 2172 +for(var i=0;i<numRows;i++){
  2173 +
  2174 +var tspan=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_tspan_"+i,"tspan");
  2175 +if(style.labelSelect===true){tspan._featureId=featureId;
  2176 +tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}
  2177 +if(OpenLayers.IS_GECKO===false){
  2178 +tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");}
2161 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;} 2179 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;}
2162 tspan.setAttribute("dy",(vfactor*(numRows-1))+"em");}else{tspan.setAttribute("dy","1em");} 2180 tspan.setAttribute("dy",(vfactor*(numRows-1))+"em");}else{tspan.setAttribute("dy","1em");}
2163 -tspan.textContent=(labelRows[i]==='')?' ':labelRows[i];if(!tspan.parentNode){label.appendChild(tspan);}}  
2164 -if(!label.parentNode){this.textRoot.appendChild(label);}},getComponentsString:function(components,separator){var renderCmp=[];var complete=true;var len=components.length;var strings=[];var str,component;for(var i=0;i<len;i++){component=components[i];renderCmp.push(component);str=this.getShortString(component);if(str){strings.push(str);}else{if(i>0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}} 2181 +
  2182 +tspan.textContent=(labelRows[i]==='')?' ':labelRows[i];
  2183 +if(tspan.textContent == undefined || tspan.textContent == 'undefined')
  2184 +{tspan.textContent = "";}
  2185 +if(!tspan.parentNode){label.appendChild(tspan);}}
  2186 +
  2187 +if(!label.parentNode){this.textRoot.appendChild(label);}},
  2188 +getComponentsString:function(components,separator){var renderCmp=[];var complete=true;var len=components.length;var strings=[];var str,component;for(var i=0;i<len;i++){component=components[i];renderCmp.push(component);str=this.getShortString(component);if(str){strings.push(str);}else{if(i>0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}}
2165 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}} 2189 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}}
2166 complete=false;}} 2190 complete=false;}}
2167 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";} 2191 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";}
@@ -2716,7 +2740,7 @@ else{ @@ -2716,7 +2740,7 @@ else{
2716 var symbol=OpenLayers.Renderer.symbol[graphicName]; 2740 var symbol=OpenLayers.Renderer.symbol[graphicName];
2717 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;} 2741 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;}
2718 } 2742 }
2719 - 2743 +//alert("oi");
2720 var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var pathitems=["m"];for(var i=0;i<symbol.length;i=i+2){var x=symbol[i];var y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);pathitems.push(x);pathitems.push(y);if(i==0){pathitems.push("l");}} 2744 var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var pathitems=["m"];for(var i=0;i<symbol.length;i=i+2){var x=symbol[i];var y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);pathitems.push(x);pathitems.push(y);if(i==0){pathitems.push("l");}}
2721 pathitems.push("x e");var path=pathitems.join(" ");var diff=(symbolExtent.getWidth()-symbolExtent.getHeight())/2;if(diff>0){symbolExtent.bottom=symbolExtent.bottom-diff;symbolExtent.top=symbolExtent.top+diff;}else{symbolExtent.left=symbolExtent.left+diff;symbolExtent.right=symbolExtent.right-diff;} 2745 pathitems.push("x e");var path=pathitems.join(" ");var diff=(symbolExtent.getWidth()-symbolExtent.getHeight())/2;if(diff>0){symbolExtent.bottom=symbolExtent.bottom-diff;symbolExtent.top=symbolExtent.top+diff;}else{symbolExtent.left=symbolExtent.left+diff;symbolExtent.right=symbolExtent.right-diff;}
2722 cache={path:path,size:symbolExtent.getWidth(),left:symbolExtent.left,bottom:symbolExtent.bottom};this.symbolCache[id]=cache;return cache;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={"l":0,"c":.5,"r":1,"t":0,"m":.5,"b":1};OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10);}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div);}catch(e){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{'layerType':"MM",'layerLib':"MultiMap"});},setMapObjectCenter:function(center,zoom){this.mapObject.goToPosition(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition();},getMapObjectZoom:function(){return this.mapObject.getZoomFactor();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){moPixel.x=moPixel.x-(this.map.getSize().w/2);moPixel.y=moPixel.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.geoPosToContainerPixels(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lon:moLonLat.lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lat:moLonLat.lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var mmLatLon;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);mmLatLon=new MMLatLon(lonlat.lat,lonlat.lon);}else{mmLatLon=new MMLatLon(lat,lon);} 2746 cache={path:path,size:symbolExtent.getWidth(),left:symbolExtent.left,bottom:symbolExtent.bottom};this.symbolCache[id]=cache;return cache;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={"l":0,"c":.5,"r":1,"t":0,"m":.5,"b":1};OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10);}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div);}catch(e){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{'layerType':"MM",'layerLib':"MultiMap"});},setMapObjectCenter:function(center,zoom){this.mapObject.goToPosition(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition();},getMapObjectZoom:function(){return this.mapObject.getZoomFactor();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){moPixel.x=moPixel.x-(this.map.getSize().w/2);moPixel.y=moPixel.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.geoPosToContainerPixels(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lon:moLonLat.lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lat:moLonLat.lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var mmLatLon;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);mmLatLon=new MMLatLon(lonlat.lat,lonlat.lon);}else{mmLatLon=new MMLatLon(lat,lon);}