Commit de14810c2b36da4046cee793f55a72ce3fad6877

Authored by Edmar Moretti
1 parent 63d1ec61

Atualização do OpenLayers

mashups/openlayers.js.php
... ... @@ -635,7 +635,7 @@ i3GEO.editorOL = {
635 635  
636 636 i3GEOpanelEditor = new OpenLayers.Control.Panel({
637 637 displayClass: "olControlEditingToolbar1 noprint",
638   - saveState: true,
  638 + saveState: false,
639 639 activateControl: function(c){
640 640 this.deactivate();
641 641 this.activate();
... ... @@ -645,33 +645,42 @@ i3GEO.editorOL = {
645 645 catch(e){}
646 646 if(!c.trigger)
647 647 {c.activate();}
648   - else{
649   - c.trigger.call();
650   - }
  648 + else
  649 + {c.trigger.call();}
651 650 }
652 651 });
653 652 if(botoes.procura===true){
654 653 button = new OpenLayers.Control.Button({
655 654 displayClass: "editorOLprocura",
656 655 trigger: function(){YAHOO.procura.container.panel.show();},
657   - title: "procura"
  656 + title: "procura",
  657 + type: OpenLayers.Control.TYPE_BUTTON
658 658 });
659 659 controles.push(button);
660 660 adiciona = true;
661 661 }
662 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 668 adiciona = true;
665 669 }
666 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 676 adiciona = true;
669 677 }
670 678 if(botoes.zoomtot===true){
671 679 button = new OpenLayers.Control.Button({
672 680 displayClass: "editorOLzoomtot",
673 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 685 controles.push(button);
677 686 adiciona = true;
... ... @@ -680,7 +689,8 @@ i3GEO.editorOL = {
680 689 button = new OpenLayers.Control.Button({
681 690 displayClass: "editorOLlegenda",
682 691 trigger: function(){i3GEO.editorOL.mostraLegenda();},
683   - title: "legenda"
  692 + title: "legenda",
  693 + type: OpenLayers.Control.TYPE_BUTTON
684 694 });
685 695 controles.push(button);
686 696 adiciona = true;
... ... @@ -692,7 +702,8 @@ i3GEO.editorOL = {
692 702 handlerOptions: {layerOptions: {styleMap: styleMap}},
693 703 persist: true,
694 704 displayClass: "editorOLdistancia",
695   - title: "distância"
  705 + title: "distância",
  706 + type: OpenLayers.Control.TYPE_TOOL
696 707 }
697 708 );
698 709 button.events.on({
... ... @@ -712,7 +723,8 @@ i3GEO.editorOL = {
712 723 handlerOptions: {layerOptions: {styleMap: styleMap}},
713 724 persist: true,
714 725 displayClass: "editorOLarea",
715   - title: "área"
  726 + title: "área",
  727 + type: OpenLayers.Control.TYPE_TOOL
716 728 }
717 729 );
718 730 button.events.on({
... ... @@ -732,6 +744,7 @@ i3GEO.editorOL = {
732 744 layers: [i3GEO.editorOL.layerAtivo()],
733 745 queryVisible: true,
734 746 title: "identifica",
  747 + type: OpenLayers.Control.TYPE_TOOL,
735 748 displayClass: "editorOLidentifica",
736 749 eventListeners: {
737 750 getfeatureinfo: function(event) {
... ... @@ -780,6 +793,7 @@ i3GEO.editorOL = {
780 793 {
781 794 displayClass: "editorOLlinha",
782 795 title: "digitalizar linha",
  796 + type: OpenLayers.Control.TYPE_TOOL,
783 797 callbacks:{
784 798 done: function(feature){
785 799 var f = new OpenLayers.Feature.Vector(feature);
... ... @@ -809,6 +823,7 @@ i3GEO.editorOL = {
809 823 {
810 824 displayClass: "editorOLponto",
811 825 title: "digitalizar ponto",
  826 + type: OpenLayers.Control.TYPE_TOOL,
812 827 callbacks:{
813 828 done: function(feature){
814 829 var f = new OpenLayers.Feature.Vector(feature);
... ... @@ -838,6 +853,7 @@ i3GEO.editorOL = {
838 853 {
839 854 displayClass: "editorOLpoligono",
840 855 title: "digitalizar polígono",
  856 + type: OpenLayers.Control.TYPE_TOOL,
841 857 //handlerOptions: {holeModifier: "altKey"},
842 858 callbacks:{
843 859 done: function(feature){
... ... @@ -868,6 +884,7 @@ i3GEO.editorOL = {
868 884 {
869 885 displayClass: "editorOLtexto",
870 886 title: "incluir texto",
  887 + type: OpenLayers.Control.TYPE_TOOL,
871 888 persist: true,
872 889 callbacks:{
873 890 done: function(feature){
... ... @@ -903,6 +920,7 @@ i3GEO.editorOL = {
903 920 {
904 921 displayClass: "editorOLcorta",
905 922 title: "corta figura",
  923 + type: OpenLayers.Control.TYPE_TOOL,
906 924 clickout: true,
907 925 toggle: true,
908 926 trigger: function(){
... ... @@ -939,6 +957,7 @@ i3GEO.editorOL = {
939 957 {
940 958 displayClass: "editorOLedita",
941 959 title: "modifica figura",
  960 + type: OpenLayers.Control.TYPE_TOOL,
942 961 clickout: true,
943 962 toggle: true,
944 963 mode: OpenLayers.Control.ModifyFeature.RESHAPE
... ... @@ -953,7 +972,8 @@ i3GEO.editorOL = {
953 972 trigger: function(){
954 973 i3GEO.editorOL.listaGeometrias();
955 974 },
956   - title: "lista geometrias"
  975 + title: "lista geometrias",
  976 + type: OpenLayers.Control.TYPE_BUTTON
957 977 });
958 978 controles.push(button);
959 979 adiciona = true;
... ... @@ -966,7 +986,8 @@ i3GEO.editorOL = {
966 986 if(document.getElementById("panellistagEditor"))
967 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 992 controles.push(button);
972 993 adiciona = true;
... ... @@ -982,7 +1003,8 @@ i3GEO.editorOL = {
982 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 1009 controles.push(button);
988 1010 adiciona = true;
... ... @@ -994,6 +1016,7 @@ i3GEO.editorOL = {
994 1016 {
995 1017 displayClass: "editorOLselecao",
996 1018 title: "seleciona elemento",
  1019 + type: OpenLayers.Control.TYPE_TOOL,
997 1020 clickout: true,
998 1021 toggle: true,
999 1022 multiple: false,
... ... @@ -1022,7 +1045,8 @@ i3GEO.editorOL = {
1022 1045 else
1023 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 1051 controles.push(button);
1028 1052 adiciona = true;
... ... @@ -1043,7 +1067,8 @@ i3GEO.editorOL = {
1043 1067 button = new OpenLayers.Control.Button({
1044 1068 displayClass: "editorOLpropriedades",
1045 1069 trigger: function(){i3GEO.editorOL.propriedades();},
1046   - title: "propriedades"
  1070 + title: "propriedades",
  1071 + type: OpenLayers.Control.TYPE_BUTTON
1047 1072 });
1048 1073 controles.push(button);
1049 1074 adiciona = true;
... ... @@ -1052,7 +1077,8 @@ i3GEO.editorOL = {
1052 1077 button = new OpenLayers.Control.Button({
1053 1078 displayClass: "editorOLsalva",
1054 1079 trigger: function(){i3GEO.editorOL.salvaGeometrias();},
1055   - title: "salva"
  1080 + title: "salva",
  1081 + type: OpenLayers.Control.TYPE_BUTTON
1056 1082 });
1057 1083 controles.push(button);
1058 1084 adiciona = true;
... ... @@ -1066,7 +1092,8 @@ i3GEO.editorOL = {
1066 1092 catch(e)
1067 1093 {window.open("openlayers_ajuda.php");}
1068 1094 },
1069   - title: "ajuda"
  1095 + title: "ajuda",
  1096 + type: OpenLayers.Control.TYPE_BUTTON
1070 1097 });
1071 1098 controles.push(button);
1072 1099 adiciona = true;
... ... @@ -1098,7 +1125,8 @@ i3GEO.editorOL = {
1098 1125 catch(e){}
1099 1126 }
1100 1127 },
1101   - title: "fecha editor"
  1128 + title: "fecha editor",
  1129 + type: OpenLayers.Control.TYPE_BUTTON
1102 1130 });
1103 1131 controles.push(button);
1104 1132 adiciona = true;
... ...
mashups/openlayers_compacto.js
... ... @@ -1332,6 +1332,7 @@ var width=style.graphicWidth||style.graphicHeight;
1332 1332 var height=style.graphicHeight||style.graphicWidth;
1333 1333 width=width?width:style.pointRadius*2;
1334 1334 height=height?height:style.pointRadius*2;
  1335 +//alert("oi");
1335 1336 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);
1336 1337 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);
1337 1338 var opacity=style.graphicOpacity||style.fillOpacity;
... ... @@ -1969,6 +1970,7 @@ var height=style.graphicHeight||style.graphicWidth;
1969 1970 width=width?width:style.pointRadius*2;
1970 1971 height=height?height:style.pointRadius*2;
1971 1972 width*=resolution;height*=resolution;
  1973 +//alert(width);
1972 1974 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width);
1973 1975 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height);
1974 1976 var opacity=style.graphicOpacity||style.fillOpacity;
... ... @@ -1983,6 +1985,7 @@ else if(this.isComplexSymbol(style.graphicName)){
1983 1985 //modificado por edmar
1984 1986 style.label = " ";
1985 1987 style.pointRadius = 5;
  1988 +//alert("oi");
1986 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 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 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 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 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 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 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 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 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 2178 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2169 2179 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2170 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 2187 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);}
2173 2188 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);}
2174 2189 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);}
2175 2190 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);}
2176 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 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 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 2202 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;}
2183 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 2210 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}}
2187 2211 complete=false;}}
2188 2212 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";}
... ... @@ -2733,6 +2757,7 @@ else{
2733 2757 var symbol=OpenLayers.Renderer.symbol[graphicName];
2734 2758 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;}
2735 2759 }
  2760 +//alert("oi");
2736 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 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 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 3640 ]);
3616 3641 i3GEOpanelEditor = new OpenLayers.Control.Panel({
3617 3642 displayClass: "olControlEditingToolbar1 noprint",
3618   -saveState: true,
  3643 +saveState: false,
3619 3644 activateControl: function(c){
3620 3645 this.deactivate();
3621 3646 this.activate();
... ... @@ -3625,33 +3650,42 @@ i3GEO.editorOL.ModifyFeature.deactivate();
3625 3650 catch(e){}
3626 3651 if(!c.trigger)
3627 3652 {c.activate();}
3628   -else{
3629   -c.trigger.call();
3630   -}
  3653 +else
  3654 +{c.trigger.call();}
3631 3655 }
3632 3656 });
3633 3657 if(botoes.procura===true){
3634 3658 button = new OpenLayers.Control.Button({
3635 3659 displayClass: "editorOLprocura",
3636 3660 trigger: function(){YAHOO.procura.container.panel.show();},
3637   -title: "procura"
  3661 +title: "procura",
  3662 +type: OpenLayers.Control.TYPE_BUTTON
3638 3663 });
3639 3664 controles.push(button);
3640 3665 adiciona = true;
3641 3666 }
3642 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 3673 adiciona = true;
3645 3674 }
3646 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 3681 adiciona = true;
3649 3682 }
3650 3683 if(botoes.zoomtot===true){
3651 3684 button = new OpenLayers.Control.Button({
3652 3685 displayClass: "editorOLzoomtot",
3653 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 3690 controles.push(button);
3657 3691 adiciona = true;
... ... @@ -3660,7 +3694,8 @@ if(botoes.legenda===true){
3660 3694 button = new OpenLayers.Control.Button({
3661 3695 displayClass: "editorOLlegenda",
3662 3696 trigger: function(){i3GEO.editorOL.mostraLegenda();},
3663   -title: "legenda"
  3697 +title: "legenda",
  3698 +type: OpenLayers.Control.TYPE_BUTTON
3664 3699 });
3665 3700 controles.push(button);
3666 3701 adiciona = true;
... ... @@ -3672,7 +3707,8 @@ OpenLayers.Handler.Path,
3672 3707 handlerOptions: {layerOptions: {styleMap: styleMap}},
3673 3708 persist: true,
3674 3709 displayClass: "editorOLdistancia",
3675   -title: "distância"
  3710 +title: "distância",
  3711 +type: OpenLayers.Control.TYPE_TOOL
3676 3712 }
3677 3713 );
3678 3714 button.events.on({
... ... @@ -3692,7 +3728,8 @@ OpenLayers.Handler.Polygon,
3692 3728 handlerOptions: {layerOptions: {styleMap: styleMap}},
3693 3729 persist: true,
3694 3730 displayClass: "editorOLarea",
3695   -title: "área"
  3731 +title: "área",
  3732 +type: OpenLayers.Control.TYPE_TOOL
3696 3733 }
3697 3734 );
3698 3735 button.events.on({
... ... @@ -3712,6 +3749,7 @@ infoFormat:&#39;text/plain&#39;, //&#39;application/vnd.ogc.gml&#39;,
3712 3749 layers: [i3GEO.editorOL.layerAtivo()],
3713 3750 queryVisible: true,
3714 3751 title: "identifica",
  3752 +type: OpenLayers.Control.TYPE_TOOL,
3715 3753 displayClass: "editorOLidentifica",
3716 3754 eventListeners: {
3717 3755 getfeatureinfo: function(event) {
... ... @@ -3760,6 +3798,7 @@ OpenLayers.Handler.Path,
3760 3798 {
3761 3799 displayClass: "editorOLlinha",
3762 3800 title: "digitalizar linha",
  3801 +type: OpenLayers.Control.TYPE_TOOL,
3763 3802 callbacks:{
3764 3803 done: function(feature){
3765 3804 var f = new OpenLayers.Feature.Vector(feature);
... ... @@ -3789,6 +3828,7 @@ OpenLayers.Handler.Point,
3789 3828 {
3790 3829 displayClass: "editorOLponto",
3791 3830 title: "digitalizar ponto",
  3831 +type: OpenLayers.Control.TYPE_TOOL,
3792 3832 callbacks:{
3793 3833 done: function(feature){
3794 3834 var f = new OpenLayers.Feature.Vector(feature);
... ... @@ -3818,6 +3858,7 @@ OpenLayers.Handler.Polygon,
3818 3858 {
3819 3859 displayClass: "editorOLpoligono",
3820 3860 title: "digitalizar polígono",
  3861 +type: OpenLayers.Control.TYPE_TOOL,
3821 3862 //handlerOptions: {holeModifier: "altKey"},
3822 3863 callbacks:{
3823 3864 done: function(feature){
... ... @@ -3848,6 +3889,7 @@ OpenLayers.Handler.Point,
3848 3889 {
3849 3890 displayClass: "editorOLtexto",
3850 3891 title: "incluir texto",
  3892 +type: OpenLayers.Control.TYPE_TOOL,
3851 3893 persist: true,
3852 3894 callbacks:{
3853 3895 done: function(feature){
... ... @@ -3883,6 +3925,7 @@ OpenLayers.Handler.Polygon,
3883 3925 {
3884 3926 displayClass: "editorOLcorta",
3885 3927 title: "corta figura",
  3928 +type: OpenLayers.Control.TYPE_TOOL,
3886 3929 clickout: true,
3887 3930 toggle: true,
3888 3931 trigger: function(){
... ... @@ -3919,6 +3962,7 @@ i3GEO.editorOL.layergrafico,
3919 3962 {
3920 3963 displayClass: "editorOLedita",
3921 3964 title: "modifica figura",
  3965 +type: OpenLayers.Control.TYPE_TOOL,
3922 3966 clickout: true,
3923 3967 toggle: true,
3924 3968 mode: OpenLayers.Control.ModifyFeature.RESHAPE
... ... @@ -3933,7 +3977,8 @@ displayClass: &quot;editorOLlistag&quot;,
3933 3977 trigger: function(){
3934 3978 i3GEO.editorOL.listaGeometrias();
3935 3979 },
3936   -title: "lista geometrias"
  3980 +title: "lista geometrias",
  3981 +type: OpenLayers.Control.TYPE_BUTTON
3937 3982 });
3938 3983 controles.push(button);
3939 3984 adiciona = true;
... ... @@ -3946,7 +3991,8 @@ i3GEO.editorOL.trazParaFrente();
3946 3991 if(document.getElementById("panellistagEditor"))
3947 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 3997 controles.push(button);
3952 3998 adiciona = true;
... ... @@ -3961,7 +4007,8 @@ if(i3GEO.php)
3961 4007 else
3962 4008 {i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()");}
3963 4009 },
3964   -title: "ferramentas"
  4010 +title: "ferramentas",
  4011 +type: OpenLayers.Control.TYPE_BUTTON
3965 4012 });
3966 4013 controles.push(button);
3967 4014 adiciona = true;
... ... @@ -3973,6 +4020,7 @@ i3GEO.editorOL.layergrafico,
3973 4020 {
3974 4021 displayClass: "editorOLselecao",
3975 4022 title: "seleciona elemento",
  4023 +type: OpenLayers.Control.TYPE_TOOL,
3976 4024 clickout: true,
3977 4025 toggle: true,
3978 4026 multiple: false,
... ... @@ -4001,7 +4049,8 @@ if(document.getElementById(&quot;panellistagEditor&quot;))
4001 4049 else
4002 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 4055 controles.push(button);
4007 4056 adiciona = true;
... ... @@ -4022,7 +4071,8 @@ if(botoes.propriedades===true){
4022 4071 button = new OpenLayers.Control.Button({
4023 4072 displayClass: "editorOLpropriedades",
4024 4073 trigger: function(){i3GEO.editorOL.propriedades();},
4025   -title: "propriedades"
  4074 +title: "propriedades",
  4075 +type: OpenLayers.Control.TYPE_BUTTON
4026 4076 });
4027 4077 controles.push(button);
4028 4078 adiciona = true;
... ... @@ -4031,7 +4081,8 @@ if(botoes.salva===true){
4031 4081 button = new OpenLayers.Control.Button({
4032 4082 displayClass: "editorOLsalva",
4033 4083 trigger: function(){i3GEO.editorOL.salvaGeometrias();},
4034   -title: "salva"
  4084 +title: "salva",
  4085 +type: OpenLayers.Control.TYPE_BUTTON
4035 4086 });
4036 4087 controles.push(button);
4037 4088 adiciona = true;
... ... @@ -4045,7 +4096,8 @@ try
4045 4096 catch(e)
4046 4097 {window.open("openlayers_ajuda.php");}
4047 4098 },
4048   -title: "ajuda"
  4099 +title: "ajuda",
  4100 +type: OpenLayers.Control.TYPE_BUTTON
4049 4101 });
4050 4102 controles.push(button);
4051 4103 adiciona = true;
... ... @@ -4077,7 +4129,8 @@ if(i3GEO.editorOL.backup)
4077 4129 catch(e){}
4078 4130 }
4079 4131 },
4080   -title: "fecha editor"
  4132 +title: "fecha editor",
  4133 +type: OpenLayers.Control.TYPE_BUTTON
4081 4134 });
4082 4135 controles.push(button);
4083 4136 adiciona = true;
... ...
mashups/openlayers_compacto.js.php
... ... @@ -1332,6 +1332,7 @@ var width=style.graphicWidth||style.graphicHeight;
1332 1332 var height=style.graphicHeight||style.graphicWidth;
1333 1333 width=width?width:style.pointRadius*2;
1334 1334 height=height?height:style.pointRadius*2;
  1335 +//alert("oi");
1335 1336 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);
1336 1337 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);
1337 1338 var opacity=style.graphicOpacity||style.fillOpacity;
... ... @@ -1969,6 +1970,7 @@ var height=style.graphicHeight||style.graphicWidth;
1969 1970 width=width?width:style.pointRadius*2;
1970 1971 height=height?height:style.pointRadius*2;
1971 1972 width*=resolution;height*=resolution;
  1973 +//alert(width);
1972 1974 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width);
1973 1975 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height);
1974 1976 var opacity=style.graphicOpacity||style.fillOpacity;
... ... @@ -1983,6 +1985,7 @@ else if(this.isComplexSymbol(style.graphicName)){
1983 1985 //modificado por edmar
1984 1986 style.label = " ";
1985 1987 style.pointRadius = 5;
  1988 +//alert("oi");
1986 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 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 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 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 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 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 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 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 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 2178 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2169 2179 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2170 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 2187 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);}
2173 2188 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);}
2174 2189 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);}
2175 2190 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);}
2176 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 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 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 2202 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;}
2183 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 2210 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}}
2187 2211 complete=false;}}
2188 2212 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";}
... ... @@ -2733,6 +2757,7 @@ else{
2733 2757 var symbol=OpenLayers.Renderer.symbol[graphicName];
2734 2758 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;}
2735 2759 }
  2760 +//alert("oi");
2736 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 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 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 3640 ]);
3616 3641 i3GEOpanelEditor = new OpenLayers.Control.Panel({
3617 3642 displayClass: "olControlEditingToolbar1 noprint",
3618   -saveState: true,
  3643 +saveState: false,
3619 3644 activateControl: function(c){
3620 3645 this.deactivate();
3621 3646 this.activate();
... ... @@ -3625,33 +3650,42 @@ i3GEO.editorOL.ModifyFeature.deactivate();
3625 3650 catch(e){}
3626 3651 if(!c.trigger)
3627 3652 {c.activate();}
3628   -else{
3629   -c.trigger.call();
3630   -}
  3653 +else
  3654 +{c.trigger.call();}
3631 3655 }
3632 3656 });
3633 3657 if(botoes.procura===true){
3634 3658 button = new OpenLayers.Control.Button({
3635 3659 displayClass: "editorOLprocura",
3636 3660 trigger: function(){YAHOO.procura.container.panel.show();},
3637   -title: "procura"
  3661 +title: "procura",
  3662 +type: OpenLayers.Control.TYPE_BUTTON
3638 3663 });
3639 3664 controles.push(button);
3640 3665 adiciona = true;
3641 3666 }
3642 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 3673 adiciona = true;
3645 3674 }
3646 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 3681 adiciona = true;
3649 3682 }
3650 3683 if(botoes.zoomtot===true){
3651 3684 button = new OpenLayers.Control.Button({
3652 3685 displayClass: "editorOLzoomtot",
3653 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 3690 controles.push(button);
3657 3691 adiciona = true;
... ... @@ -3660,7 +3694,8 @@ if(botoes.legenda===true){
3660 3694 button = new OpenLayers.Control.Button({
3661 3695 displayClass: "editorOLlegenda",
3662 3696 trigger: function(){i3GEO.editorOL.mostraLegenda();},
3663   -title: "legenda"
  3697 +title: "legenda",
  3698 +type: OpenLayers.Control.TYPE_BUTTON
3664 3699 });
3665 3700 controles.push(button);
3666 3701 adiciona = true;
... ... @@ -3672,7 +3707,8 @@ OpenLayers.Handler.Path,
3672 3707 handlerOptions: {layerOptions: {styleMap: styleMap}},
3673 3708 persist: true,
3674 3709 displayClass: "editorOLdistancia",
3675   -title: "distância"
  3710 +title: "distância",
  3711 +type: OpenLayers.Control.TYPE_TOOL
3676 3712 }
3677 3713 );
3678 3714 button.events.on({
... ... @@ -3692,7 +3728,8 @@ OpenLayers.Handler.Polygon,
3692 3728 handlerOptions: {layerOptions: {styleMap: styleMap}},
3693 3729 persist: true,
3694 3730 displayClass: "editorOLarea",
3695   -title: "área"
  3731 +title: "área",
  3732 +type: OpenLayers.Control.TYPE_TOOL
3696 3733 }
3697 3734 );
3698 3735 button.events.on({
... ... @@ -3712,6 +3749,7 @@ infoFormat:&#39;text/plain&#39;, //&#39;application/vnd.ogc.gml&#39;,
3712 3749 layers: [i3GEO.editorOL.layerAtivo()],
3713 3750 queryVisible: true,
3714 3751 title: "identifica",
  3752 +type: OpenLayers.Control.TYPE_TOOL,
3715 3753 displayClass: "editorOLidentifica",
3716 3754 eventListeners: {
3717 3755 getfeatureinfo: function(event) {
... ... @@ -3760,6 +3798,7 @@ OpenLayers.Handler.Path,
3760 3798 {
3761 3799 displayClass: "editorOLlinha",
3762 3800 title: "digitalizar linha",
  3801 +type: OpenLayers.Control.TYPE_TOOL,
3763 3802 callbacks:{
3764 3803 done: function(feature){
3765 3804 var f = new OpenLayers.Feature.Vector(feature);
... ... @@ -3789,6 +3828,7 @@ OpenLayers.Handler.Point,
3789 3828 {
3790 3829 displayClass: "editorOLponto",
3791 3830 title: "digitalizar ponto",
  3831 +type: OpenLayers.Control.TYPE_TOOL,
3792 3832 callbacks:{
3793 3833 done: function(feature){
3794 3834 var f = new OpenLayers.Feature.Vector(feature);
... ... @@ -3818,6 +3858,7 @@ OpenLayers.Handler.Polygon,
3818 3858 {
3819 3859 displayClass: "editorOLpoligono",
3820 3860 title: "digitalizar polígono",
  3861 +type: OpenLayers.Control.TYPE_TOOL,
3821 3862 //handlerOptions: {holeModifier: "altKey"},
3822 3863 callbacks:{
3823 3864 done: function(feature){
... ... @@ -3848,6 +3889,7 @@ OpenLayers.Handler.Point,
3848 3889 {
3849 3890 displayClass: "editorOLtexto",
3850 3891 title: "incluir texto",
  3892 +type: OpenLayers.Control.TYPE_TOOL,
3851 3893 persist: true,
3852 3894 callbacks:{
3853 3895 done: function(feature){
... ... @@ -3883,6 +3925,7 @@ OpenLayers.Handler.Polygon,
3883 3925 {
3884 3926 displayClass: "editorOLcorta",
3885 3927 title: "corta figura",
  3928 +type: OpenLayers.Control.TYPE_TOOL,
3886 3929 clickout: true,
3887 3930 toggle: true,
3888 3931 trigger: function(){
... ... @@ -3919,6 +3962,7 @@ i3GEO.editorOL.layergrafico,
3919 3962 {
3920 3963 displayClass: "editorOLedita",
3921 3964 title: "modifica figura",
  3965 +type: OpenLayers.Control.TYPE_TOOL,
3922 3966 clickout: true,
3923 3967 toggle: true,
3924 3968 mode: OpenLayers.Control.ModifyFeature.RESHAPE
... ... @@ -3933,7 +3977,8 @@ displayClass: &quot;editorOLlistag&quot;,
3933 3977 trigger: function(){
3934 3978 i3GEO.editorOL.listaGeometrias();
3935 3979 },
3936   -title: "lista geometrias"
  3980 +title: "lista geometrias",
  3981 +type: OpenLayers.Control.TYPE_BUTTON
3937 3982 });
3938 3983 controles.push(button);
3939 3984 adiciona = true;
... ... @@ -3946,7 +3991,8 @@ i3GEO.editorOL.trazParaFrente();
3946 3991 if(document.getElementById("panellistagEditor"))
3947 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 3997 controles.push(button);
3952 3998 adiciona = true;
... ... @@ -3961,7 +4007,8 @@ if(i3GEO.php)
3961 4007 else
3962 4008 {i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()");}
3963 4009 },
3964   -title: "ferramentas"
  4010 +title: "ferramentas",
  4011 +type: OpenLayers.Control.TYPE_BUTTON
3965 4012 });
3966 4013 controles.push(button);
3967 4014 adiciona = true;
... ... @@ -3973,6 +4020,7 @@ i3GEO.editorOL.layergrafico,
3973 4020 {
3974 4021 displayClass: "editorOLselecao",
3975 4022 title: "seleciona elemento",
  4023 +type: OpenLayers.Control.TYPE_TOOL,
3976 4024 clickout: true,
3977 4025 toggle: true,
3978 4026 multiple: false,
... ... @@ -4001,7 +4049,8 @@ if(document.getElementById(&quot;panellistagEditor&quot;))
4001 4049 else
4002 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 4055 controles.push(button);
4007 4056 adiciona = true;
... ... @@ -4022,7 +4071,8 @@ if(botoes.propriedades===true){
4022 4071 button = new OpenLayers.Control.Button({
4023 4072 displayClass: "editorOLpropriedades",
4024 4073 trigger: function(){i3GEO.editorOL.propriedades();},
4025   -title: "propriedades"
  4074 +title: "propriedades",
  4075 +type: OpenLayers.Control.TYPE_BUTTON
4026 4076 });
4027 4077 controles.push(button);
4028 4078 adiciona = true;
... ... @@ -4031,7 +4081,8 @@ if(botoes.salva===true){
4031 4081 button = new OpenLayers.Control.Button({
4032 4082 displayClass: "editorOLsalva",
4033 4083 trigger: function(){i3GEO.editorOL.salvaGeometrias();},
4034   -title: "salva"
  4084 +title: "salva",
  4085 +type: OpenLayers.Control.TYPE_BUTTON
4035 4086 });
4036 4087 controles.push(button);
4037 4088 adiciona = true;
... ... @@ -4045,7 +4096,8 @@ try
4045 4096 catch(e)
4046 4097 {window.open("openlayers_ajuda.php");}
4047 4098 },
4048   -title: "ajuda"
  4099 +title: "ajuda",
  4100 +type: OpenLayers.Control.TYPE_BUTTON
4049 4101 });
4050 4102 controles.push(button);
4051 4103 adiciona = true;
... ... @@ -4077,7 +4129,8 @@ if(i3GEO.editorOL.backup)
4077 4129 catch(e){}
4078 4130 }
4079 4131 },
4080   -title: "fecha editor"
  4132 +title: "fecha editor",
  4133 +type: OpenLayers.Control.TYPE_BUTTON
4081 4134 });
4082 4135 controles.push(button);
4083 4136 adiciona = true;
... ...
pacotes/openlayers/OpenLayers211.js
... ... @@ -1299,7 +1299,7 @@ var height=style.graphicHeight||style.graphicWidth;
1299 1299  
1300 1300 width=width?width:style.pointRadius*2;
1301 1301 height=height?height:style.pointRadius*2;
1302   -
  1302 +//alert("oi");
1303 1303 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);
1304 1304 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);
1305 1305 var opacity=style.graphicOpacity||style.fillOpacity;
... ... @@ -1939,7 +1939,7 @@ var height=style.graphicHeight||style.graphicWidth;
1939 1939 width=width?width:style.pointRadius*2;
1940 1940 height=height?height:style.pointRadius*2;
1941 1941 width*=resolution;height*=resolution;
1942   -
  1942 +//alert(width);
1943 1943 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width);
1944 1944 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height);
1945 1945 var opacity=style.graphicOpacity||style.fillOpacity;
... ... @@ -1954,7 +1954,7 @@ else if(this.isComplexSymbol(style.graphicName)){
1954 1954 //modificado por edmar
1955 1955 style.label = " ";
1956 1956 style.pointRadius = 5;
1957   -
  1957 +//alert("oi");
1958 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 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 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 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 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 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 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 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 2153 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2147 2154 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2148 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 2162 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);}
2151 2163 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);}
2152 2164 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);}
2153 2165 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);}
2154 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 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 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 2178 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;}
2161 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 2188 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}}
2165 2189 complete=false;}}
2166 2190 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";}
... ... @@ -2715,7 +2739,7 @@ else{
2715 2739 var symbol=OpenLayers.Renderer.symbol[graphicName];
2716 2740 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;}
2717 2741 }
2718   -
  2742 +//alert("oi");
2719 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 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 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 1300  
1301 1301 width=width?width:style.pointRadius*2;
1302 1302 height=height?height:style.pointRadius*2;
1303   -
  1303 +//alert("oi");
1304 1304 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);
1305 1305 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);
1306 1306 var opacity=style.graphicOpacity||style.fillOpacity;
... ... @@ -1940,7 +1940,7 @@ var height=style.graphicHeight||style.graphicWidth;
1940 1940 width=width?width:style.pointRadius*2;
1941 1941 height=height?height:style.pointRadius*2;
1942 1942 width*=resolution;height*=resolution;
1943   -
  1943 +//alert(width);
1944 1944 var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset*resolution:-(0.5*width);
1945 1945 var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset*resolution:-(0.5*height);
1946 1946 var opacity=style.graphicOpacity||style.fillOpacity;
... ... @@ -1955,7 +1955,7 @@ else if(this.isComplexSymbol(style.graphicName)){
1955 1955 //modificado por edmar
1956 1956 style.label = " ";
1957 1957 style.pointRadius = 5;
1958   -
  1958 +//alert("oi");
1959 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 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 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 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 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 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 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 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 2154 d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2148 2155 d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
2149 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 2163 if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);}
2152 2164 if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);}
2153 2165 if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);}
2154 2166 if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);}
2155 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 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 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 2179 tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;}
2162 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 2189 if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}}
2166 2190 complete=false;}}
2167 2191 return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";}
... ... @@ -2716,7 +2740,7 @@ else{
2716 2740 var symbol=OpenLayers.Renderer.symbol[graphicName];
2717 2741 if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;}
2718 2742 }
2719   -
  2743 +//alert("oi");
2720 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 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 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);}
... ...