Commit 2c4d63f9a2c55d6889f04289ed3bee8fe3f1ba2c
1 parent
b0969577
Exists in
master
and in
7 other branches
--no commit message
Showing
4 changed files
with
202 additions
and
257 deletions
Show diff stats
classesjs/classe_barradebotoes.js
| @@ -1089,7 +1089,7 @@ i3GEO.barraDeBotoes = | @@ -1089,7 +1089,7 @@ i3GEO.barraDeBotoes = | ||
| 1089 | if (i3GEO.barraDeBotoes.ATIVA === false) { | 1089 | if (i3GEO.barraDeBotoes.ATIVA === false) { |
| 1090 | return; | 1090 | return; |
| 1091 | } | 1091 | } |
| 1092 | - if(i3GEO.parametros.w < 600){ | 1092 | + if(i3GEO.parametros.w < 700){ |
| 1093 | if(i3GEO.barraDeBotoes.MAXBOTOES > 6){ | 1093 | if(i3GEO.barraDeBotoes.MAXBOTOES > 6){ |
| 1094 | i3GEO.barraDeBotoes.MAXBOTOES = 6; | 1094 | i3GEO.barraDeBotoes.MAXBOTOES = 6; |
| 1095 | } | 1095 | } |
classesjs/classe_coordenadas.js
| @@ -695,7 +695,7 @@ i3GEO.coordenadas = | @@ -695,7 +695,7 @@ i3GEO.coordenadas = | ||
| 695 | */ | 695 | */ |
| 696 | mostraCoordenadas : function(ativaMovimento, onde, x, y) { | 696 | mostraCoordenadas : function(ativaMovimento, onde, x, y) { |
| 697 | //FIXME As coordenadas metricas nao funcionam em OSM | 697 | //FIXME As coordenadas metricas nao funcionam em OSM |
| 698 | - if(i3GEO.parametros.w < 600){ | 698 | + if(i3GEO.parametros.w < 700){ |
| 699 | return; | 699 | return; |
| 700 | } | 700 | } |
| 701 | if (i3GEO.Interface.openlayers.googleLike === true) { | 701 | if (i3GEO.Interface.openlayers.googleLike === true) { |
classesjs/classe_gadgets.js
| @@ -626,7 +626,7 @@ i3GEO.gadgets = | @@ -626,7 +626,7 @@ i3GEO.gadgets = | ||
| 626 | i3GEO.configura.oMenuData = menuUnico; | 626 | i3GEO.configura.oMenuData = menuUnico; |
| 627 | confm = i3GEO.configura.oMenuData; | 627 | confm = i3GEO.configura.oMenuData; |
| 628 | }; | 628 | }; |
| 629 | - if(i3GEO.parametros.w < 600){ | 629 | + if(i3GEO.parametros.w < 700){ |
| 630 | menuUnico(); | 630 | menuUnico(); |
| 631 | } | 631 | } |
| 632 | i3GEOoMenuBar = YAHOO.widget.MenuManager; | 632 | i3GEOoMenuBar = YAHOO.widget.MenuManager; |
classesjs/classe_interface.js
| @@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
| 48 | if (typeof (i3GEO) === 'undefined') { | 48 | if (typeof (i3GEO) === 'undefined') { |
| 49 | var i3GEO = {}; | 49 | var i3GEO = {}; |
| 50 | } | 50 | } |
| 51 | -//TODO integrar Cesium http://cesiumjs.org/2013/04/12/Cesium-up-and-running/ | 51 | +// TODO integrar Cesium http://cesiumjs.org/2013/04/12/Cesium-up-and-running/ |
| 52 | i3GEO.Interface = | 52 | i3GEO.Interface = |
| 53 | { | 53 | { |
| 54 | /** | 54 | /** |
| @@ -287,11 +287,8 @@ i3GEO.Interface = | @@ -287,11 +287,8 @@ i3GEO.Interface = | ||
| 287 | i3GEO.Interface.atual2ol.initemp(); | 287 | i3GEO.Interface.atual2ol.initemp(); |
| 288 | } | 288 | } |
| 289 | } catch (e) { | 289 | } catch (e) { |
| 290 | - i3GEO.util.scriptTag( | ||
| 291 | - i3GEO.configura.locaplic + "/pacotes/openlayers/OpenLayers2131.js.php", | ||
| 292 | - "i3GEO.Interface.atual2ol.initemp()", | ||
| 293 | - "", | ||
| 294 | - false); | 290 | + i3GEO.util.scriptTag(i3GEO.configura.locaplic + "/pacotes/openlayers/OpenLayers2131.js.php", |
| 291 | + "i3GEO.Interface.atual2ol.initemp()", "", false); | ||
| 295 | } | 292 | } |
| 296 | }, | 293 | }, |
| 297 | initemp : function() { | 294 | initemp : function() { |
| @@ -602,10 +599,7 @@ i3GEO.Interface = | @@ -602,10 +599,7 @@ i3GEO.Interface = | ||
| 602 | * [-0.0003, -0.0003, 0.0003, 0.0003] | 599 | * [-0.0003, -0.0003, 0.0003, 0.0003] |
| 603 | */ | 600 | */ |
| 604 | MINEXTENT : [ | 601 | MINEXTENT : [ |
| 605 | - -0.0003, | ||
| 606 | - -0.0003, | ||
| 607 | - 0.0003, | ||
| 608 | - 0.0003 | 602 | + -0.0003, -0.0003, 0.0003, 0.0003 |
| 609 | ], | 603 | ], |
| 610 | /** | 604 | /** |
| 611 | * Propriedade: MAXEXTENT | 605 | * Propriedade: MAXEXTENT |
| @@ -621,10 +615,7 @@ i3GEO.Interface = | @@ -621,10 +615,7 @@ i3GEO.Interface = | ||
| 621 | * [-180, -90, 180, 90] | 615 | * [-180, -90, 180, 90] |
| 622 | */ | 616 | */ |
| 623 | MAXEXTENT : [ | 617 | MAXEXTENT : [ |
| 624 | - -180, | ||
| 625 | - -90, | ||
| 626 | - 180, | ||
| 627 | - 90 | 618 | + -180, -90, 180, 90 |
| 628 | ], | 619 | ], |
| 629 | /** | 620 | /** |
| 630 | * Propriedades: LAYERSADICIONAIS | 621 | * Propriedades: LAYERSADICIONAIS |
| @@ -662,22 +653,12 @@ i3GEO.Interface = | @@ -662,22 +653,12 @@ i3GEO.Interface = | ||
| 662 | classeCadeado : "i3GEOiconeAberto" | 653 | classeCadeado : "i3GEOiconeAberto" |
| 663 | }, | 654 | }, |
| 664 | balao : function(texto, completo, x, y) { | 655 | balao : function(texto, completo, x, y) { |
| 665 | - var e,b,c,temp, | ||
| 666 | - p = i3GEO.Interface.openlayers.BALAOPROP; | 656 | + var e, b, c, temp, p = i3GEO.Interface.openlayers.BALAOPROP; |
| 667 | 657 | ||
| 668 | - //cabecalho de opcoes | 658 | + // cabecalho de opcoes |
| 669 | c = "<div class='i3GEOCabecalhoInfoWindow' ></div>"; | 659 | c = "<div class='i3GEOCabecalhoInfoWindow' ></div>"; |
| 670 | texto = c + texto; | 660 | texto = c + texto; |
| 671 | - b = new OpenLayers.Popup.FramedCloud( | ||
| 672 | - null, | ||
| 673 | - i3GEO.util.projGeo2OSM( | ||
| 674 | - new OpenLayers.LonLat(x, y) | ||
| 675 | - ), | ||
| 676 | - null, | ||
| 677 | - texto, | ||
| 678 | - null, | ||
| 679 | - true | ||
| 680 | - ); | 661 | + b = new OpenLayers.Popup.FramedCloud(null, i3GEO.util.projGeo2OSM(new OpenLayers.LonLat(x, y)), null, texto, null, true); |
| 681 | b.maxsize = new OpenLayers.Size(parseInt(i3GEO.parametros.w / 2, 10), parseInt(i3GEO.parametros.h / 2, 10)); | 662 | b.maxsize = new OpenLayers.Size(parseInt(i3GEO.parametros.w / 2, 10), parseInt(i3GEO.parametros.h / 2, 10)); |
| 682 | 663 | ||
| 683 | i3geoOL.addPopup(b, p.removeAoAdicionar); | 664 | i3geoOL.addPopup(b, p.removeAoAdicionar); |
| @@ -698,20 +679,16 @@ i3GEO.Interface = | @@ -698,20 +679,16 @@ i3GEO.Interface = | ||
| 698 | e.className = "i3GEOiconeFerramentas"; | 679 | e.className = "i3GEOiconeFerramentas"; |
| 699 | e.style.left = "3px"; | 680 | e.style.left = "3px"; |
| 700 | e.onclick = function() { | 681 | e.onclick = function() { |
| 701 | - i3GEO.janela.prompt( | ||
| 702 | - $trad("tolerancia"), | ||
| 703 | - function(){ | ||
| 704 | - i3GEO.mapa.RESOLUCAOTIP = $i("i3GEOjanelaprompt").value; | ||
| 705 | - }, | ||
| 706 | - i3GEO.mapa.RESOLUCAOTIP | ||
| 707 | - ); | 682 | + i3GEO.janela.prompt($trad("tolerancia"), function() { |
| 683 | + i3GEO.mapa.RESOLUCAOTIP = $i("i3GEOjanelaprompt").value; | ||
| 684 | + }, i3GEO.mapa.RESOLUCAOTIP); | ||
| 708 | }; | 685 | }; |
| 709 | temp.appendChild(e); | 686 | temp.appendChild(e); |
| 710 | e = document.createElement("div"); | 687 | e = document.createElement("div"); |
| 711 | e.className = "i3GEOiconeMais"; | 688 | e.className = "i3GEOiconeMais"; |
| 712 | e.style.left = "9px"; | 689 | e.style.left = "9px"; |
| 713 | e.onclick = function() { | 690 | e.onclick = function() { |
| 714 | - i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>"+completo+"</div>", ""); | 691 | + i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>" + completo + "</div>", ""); |
| 715 | }; | 692 | }; |
| 716 | temp.appendChild(e); | 693 | temp.appendChild(e); |
| 717 | }, | 694 | }, |
| @@ -802,7 +779,7 @@ i3GEO.Interface = | @@ -802,7 +779,7 @@ i3GEO.Interface = | ||
| 802 | } | 779 | } |
| 803 | })); | 780 | })); |
| 804 | i3GEO.Interface.openlayers.parametrosMap.controls.push(new OpenLayers.Control.ZoomPanel()); | 781 | i3GEO.Interface.openlayers.parametrosMap.controls.push(new OpenLayers.Control.ZoomPanel()); |
| 805 | - } else { | 782 | + } else if (i3GEO.parametros.w > 700) { |
| 806 | bb.INCLUIBOTAO.zoomli = true; | 783 | bb.INCLUIBOTAO.zoomli = true; |
| 807 | bb.INCLUIBOTAO.pan = true; | 784 | bb.INCLUIBOTAO.pan = true; |
| 808 | bb.INCLUIBOTAO.zoomtot = true; | 785 | bb.INCLUIBOTAO.zoomtot = true; |
| @@ -834,11 +811,9 @@ i3GEO.Interface = | @@ -834,11 +811,9 @@ i3GEO.Interface = | ||
| 834 | function() { | 811 | function() { |
| 835 | var pz, temp, layers, i, texto, estilo, layersn, openlayers = i3GEO.Interface.openlayers; | 812 | var pz, temp, layers, i, texto, estilo, layersn, openlayers = i3GEO.Interface.openlayers; |
| 836 | i3GEO.util.multiStep([ | 813 | i3GEO.util.multiStep([ |
| 837 | - openlayers.registraEventos, | ||
| 838 | - openlayers.zoom2ext | 814 | + openlayers.registraEventos, openlayers.zoom2ext |
| 839 | ], [ | 815 | ], [ |
| 840 | - null, | ||
| 841 | - [ | 816 | + null, [ |
| 842 | i3GEO.parametros.mapexten | 817 | i3GEO.parametros.mapexten |
| 843 | ] | 818 | ] |
| 844 | ], function() { | 819 | ], function() { |
| @@ -872,7 +847,9 @@ i3GEO.Interface = | @@ -872,7 +847,9 @@ i3GEO.Interface = | ||
| 872 | texto = | 847 | texto = |
| 873 | "<input type=radio style='" + estilo | 848 | "<input type=radio style='" + estilo |
| 874 | + "' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='" | 849 | + "' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='" |
| 875 | - + layers[i].name + "' />" + layers[i].name; | 850 | + + layers[i].name |
| 851 | + + "' />" | ||
| 852 | + + layers[i].name; | ||
| 876 | temp.propriedades.push({ | 853 | temp.propriedades.push({ |
| 877 | text : texto, | 854 | text : texto, |
| 878 | url : "" | 855 | url : "" |
| @@ -892,6 +869,9 @@ i3GEO.Interface = | @@ -892,6 +869,9 @@ i3GEO.Interface = | ||
| 892 | if (openlayers.GADGETS.OverviewMap === true) { | 869 | if (openlayers.GADGETS.OverviewMap === true) { |
| 893 | i3geoOL.addControl(new OpenLayers.Control.OverviewMap()); | 870 | i3geoOL.addControl(new OpenLayers.Control.OverviewMap()); |
| 894 | } | 871 | } |
| 872 | + if (i3GEO.parametros.h < 600) { | ||
| 873 | + openlayers.GADGETS.PanZoomBar = false; | ||
| 874 | + } | ||
| 895 | // i3geoOL.addControl(new | 875 | // i3geoOL.addControl(new |
| 896 | // OpenLayers.Control.KeyboardDefaults()); | 876 | // OpenLayers.Control.KeyboardDefaults()); |
| 897 | // | 877 | // |
| @@ -909,10 +889,10 @@ i3GEO.Interface = | @@ -909,10 +889,10 @@ i3GEO.Interface = | ||
| 909 | 889 | ||
| 910 | i3GEO.Interface.openlayers.OLpanel = new OpenLayers.Control.Panel(); | 890 | i3GEO.Interface.openlayers.OLpanel = new OpenLayers.Control.Panel(); |
| 911 | i3GEO.Interface.openlayers.OLpanel.addControls([ | 891 | i3GEO.Interface.openlayers.OLpanel.addControls([ |
| 912 | - i3GEO.Interface.openlayers.OLpan, | ||
| 913 | - i3GEO.Interface.openlayers.OLzoom | 892 | + i3GEO.Interface.openlayers.OLpan, i3GEO.Interface.openlayers.OLzoom |
| 914 | ]); | 893 | ]); |
| 915 | i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel); | 894 | i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel); |
| 895 | + | ||
| 916 | } | 896 | } |
| 917 | if (i3GEO.configura.mapaRefDisplay !== "none") { | 897 | if (i3GEO.configura.mapaRefDisplay !== "none") { |
| 918 | if (i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")) { | 898 | if (i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")) { |
| @@ -924,7 +904,7 @@ i3GEO.Interface = | @@ -924,7 +904,7 @@ i3GEO.Interface = | ||
| 924 | } | 904 | } |
| 925 | // é necessário ativar nesse momento pois a barra | 905 | // é necessário ativar nesse momento pois a barra |
| 926 | // de botoes já foi criada | 906 | // de botoes já foi criada |
| 927 | - if (i3GEO.Interface.TABLET === false) { | 907 | + if (i3GEO.Interface.TABLET === false && i3GEO.Interface.openlayers.OLpanel) { |
| 928 | i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan); | 908 | i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan); |
| 929 | } | 909 | } |
| 930 | /** | 910 | /** |
| @@ -965,20 +945,11 @@ i3GEO.Interface = | @@ -965,20 +945,11 @@ i3GEO.Interface = | ||
| 965 | i3GEO.util.arvore, | 945 | i3GEO.util.arvore, |
| 966 | i3GEO.gadgets.mostraMenuLista | 946 | i3GEO.gadgets.mostraMenuLista |
| 967 | ], [ | 947 | ], [ |
| 968 | - null, | ||
| 969 | - null, | ||
| 970 | - null, | ||
| 971 | - [ | 948 | + null, null, null, [ |
| 972 | i3GEO.parametros.mensagens | 949 | i3GEO.parametros.mensagens |
| 973 | - ], | ||
| 974 | - null, | ||
| 975 | - null, | ||
| 976 | - [ | ||
| 977 | - "<b>" + $trad("p13") + "</b>", | ||
| 978 | - "listaPropriedades", | ||
| 979 | - i3GEO.configura.listaDePropriedadesDoMapa | ||
| 980 | - ], | ||
| 981 | - null | 950 | + ], null, null, [ |
| 951 | + "<b>" + $trad("p13") + "</b>", "listaPropriedades", i3GEO.configura.listaDePropriedadesDoMapa | ||
| 952 | + ], null | ||
| 982 | ], function() { | 953 | ], function() { |
| 983 | }); | 954 | }); |
| 984 | i3GEO.arvoreDeCamadas.cria("", i3GEO.arvoreDeCamadas.CAMADAS, i3GEO.configura.sid, i3GEO.configura.locaplic); | 955 | i3GEO.arvoreDeCamadas.cria("", i3GEO.arvoreDeCamadas.CAMADAS, i3GEO.configura.sid, i3GEO.configura.locaplic); |
| @@ -1127,7 +1098,9 @@ i3GEO.Interface = | @@ -1127,7 +1098,9 @@ i3GEO.Interface = | ||
| 1127 | node = i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml", "raiz"); | 1098 | node = i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml", "raiz"); |
| 1128 | html = | 1099 | html = |
| 1129 | "<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\"" + url | 1100 | "<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\"" + url |
| 1130 | - + "\")' class=inputsb style='cursor:pointer;' type='checkbox' value='" + id + "'"; | 1101 | + + "\")' class=inputsb style='cursor:pointer;' type='checkbox' value='" |
| 1102 | + + id | ||
| 1103 | + + "'"; | ||
| 1131 | if (ativo === true) { | 1104 | if (ativo === true) { |
| 1132 | html += " checked "; | 1105 | html += " checked "; |
| 1133 | } | 1106 | } |
| @@ -1156,37 +1129,31 @@ i3GEO.Interface = | @@ -1156,37 +1129,31 @@ i3GEO.Interface = | ||
| 1156 | * Insere no mapa um layer baseado em kml | 1129 | * Insere no mapa um layer baseado em kml |
| 1157 | */ | 1130 | */ |
| 1158 | insereLayerKml : function(id, url) { | 1131 | insereLayerKml : function(id, url) { |
| 1159 | - var l,temp; | 1132 | + var l, temp; |
| 1160 | url = i3GEO.configura.locaplic + "/classesphp/proxy.php?url=" + url; | 1133 | url = i3GEO.configura.locaplic + "/classesphp/proxy.php?url=" + url; |
| 1161 | /* | 1134 | /* |
| 1162 | - eval(id | ||
| 1163 | - + " = new OpenLayers.Layer.Vector('" | ||
| 1164 | - + id | ||
| 1165 | - + "', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '" | ||
| 1166 | - + url + "',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})"); | ||
| 1167 | - eval("i3geoOL.addLayer(" + id + ");"); | ||
| 1168 | - eval("temp = " + id + ".div;"); | ||
| 1169 | - */ | ||
| 1170 | - l = new OpenLayers.Layer.Vector(id, | ||
| 1171 | - { | ||
| 1172 | - displayOutsideMaxExtent:true, | ||
| 1173 | - displayInLayerSwitcher:false, | ||
| 1174 | - visibility:true, | ||
| 1175 | - strategies: [new OpenLayers.Strategy.Fixed()], | ||
| 1176 | - protocol: new OpenLayers.Protocol.HTTP( | ||
| 1177 | - { | ||
| 1178 | - url: url, | ||
| 1179 | - format: new OpenLayers.Format.KML( | ||
| 1180 | - { | ||
| 1181 | - extractStyles: true, | ||
| 1182 | - extractAttributes: true, | ||
| 1183 | - maxDepth: 5 | ||
| 1184 | - } | ||
| 1185 | - ) | ||
| 1186 | - } | ||
| 1187 | - ) | ||
| 1188 | - } | ||
| 1189 | - ); | 1135 | + * eval(id + " = new OpenLayers.Layer.Vector('" + id + "', |
| 1136 | + * {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new | ||
| 1137 | + * OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '" + url + "',format: new | ||
| 1138 | + * OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})"); eval("i3geoOL.addLayer(" + id + | ||
| 1139 | + * ");"); eval("temp = " + id + ".div;"); | ||
| 1140 | + */ | ||
| 1141 | + l = new OpenLayers.Layer.Vector(id, { | ||
| 1142 | + displayOutsideMaxExtent : true, | ||
| 1143 | + displayInLayerSwitcher : false, | ||
| 1144 | + visibility : true, | ||
| 1145 | + strategies : [ | ||
| 1146 | + new OpenLayers.Strategy.Fixed() | ||
| 1147 | + ], | ||
| 1148 | + protocol : new OpenLayers.Protocol.HTTP({ | ||
| 1149 | + url : url, | ||
| 1150 | + format : new OpenLayers.Format.KML({ | ||
| 1151 | + extractStyles : true, | ||
| 1152 | + extractAttributes : true, | ||
| 1153 | + maxDepth : 5 | ||
| 1154 | + }) | ||
| 1155 | + }) | ||
| 1156 | + }); | ||
| 1190 | i3geoOL.addLayer(l); | 1157 | i3geoOL.addLayer(l); |
| 1191 | temp = l.div; | 1158 | temp = l.div; |
| 1192 | temp.onclick = | 1159 | temp.onclick = |
| @@ -1229,13 +1196,13 @@ i3GEO.Interface = | @@ -1229,13 +1196,13 @@ i3GEO.Interface = | ||
| 1229 | }, | 1196 | }, |
| 1230 | ativaDesativaCamadaKml : function(obj, url) { | 1197 | ativaDesativaCamadaKml : function(obj, url) { |
| 1231 | if (!obj.checked) { | 1198 | if (!obj.checked) { |
| 1232 | - //eval(obj.value + ".setVisibility(false);"); | 1199 | + // eval(obj.value + ".setVisibility(false);"); |
| 1233 | i3geoOL.getLayersByName(obj.value)[0].setVisibility(false); | 1200 | i3geoOL.getLayersByName(obj.value)[0].setVisibility(false); |
| 1234 | } else { | 1201 | } else { |
| 1235 | if (!(i3geoOL.getLayersByName(obj.value)[0])) { | 1202 | if (!(i3geoOL.getLayersByName(obj.value)[0])) { |
| 1236 | i3GEO.Interface.openlayers.insereLayerKml(obj.value, url); | 1203 | i3GEO.Interface.openlayers.insereLayerKml(obj.value, url); |
| 1237 | } else { | 1204 | } else { |
| 1238 | - //eval(obj.value + ".setVisibility(true);"); | 1205 | + // eval(obj.value + ".setVisibility(true);"); |
| 1239 | i3geoOL.getLayersByName(obj.value)[0].setVisibility(true); | 1206 | i3geoOL.getLayersByName(obj.value)[0].setVisibility(true); |
| 1240 | } | 1207 | } |
| 1241 | } | 1208 | } |
| @@ -1245,7 +1212,9 @@ i3GEO.Interface = | @@ -1245,7 +1212,9 @@ i3GEO.Interface = | ||
| 1245 | */ | 1212 | */ |
| 1246 | criaLayers : function() { | 1213 | criaLayers : function() { |
| 1247 | var configura = i3GEO.configura, url = | 1214 | var configura = i3GEO.configura, url = |
| 1248 | - configura.locaplic + "/classesphp/mapa_openlayers.php?g_sid=" + i3GEO.configura.sid + "&TIPOIMAGEM=" | 1215 | + configura.locaplic + "/classesphp/mapa_openlayers.php?g_sid=" |
| 1216 | + + i3GEO.configura.sid | ||
| 1217 | + + "&TIPOIMAGEM=" | ||
| 1249 | + configura.tipoimagem, nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length, layer, camada, urllayer, opcoes, i, n, temp = | 1218 | + configura.tipoimagem, nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length, layer, camada, urllayer, opcoes, i, n, temp = |
| 1250 | $i("i3GEOprogressoDiv"), fundoIsBase = true; | 1219 | $i("i3GEOprogressoDiv"), fundoIsBase = true; |
| 1251 | if (temp) { | 1220 | if (temp) { |
| @@ -1254,7 +1223,9 @@ i3GEO.Interface = | @@ -1254,7 +1223,9 @@ i3GEO.Interface = | ||
| 1254 | } | 1223 | } |
| 1255 | if (i3GEO.Interface.openlayers.googleLike === true) { | 1224 | if (i3GEO.Interface.openlayers.googleLike === true) { |
| 1256 | url = | 1225 | url = |
| 1257 | - configura.locaplic + "/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + "&TIPOIMAGEM=" | 1226 | + configura.locaplic + "/classesphp/mapa_googlemaps.php?g_sid=" |
| 1227 | + + i3GEO.configura.sid | ||
| 1228 | + + "&TIPOIMAGEM=" | ||
| 1258 | + configura.tipoimagem; | 1229 | + configura.tipoimagem; |
| 1259 | } | 1230 | } |
| 1260 | // | 1231 | // |
| @@ -1332,7 +1303,7 @@ i3GEO.Interface = | @@ -1332,7 +1303,7 @@ i3GEO.Interface = | ||
| 1332 | // MS_LAYER_RASTER, MS_LAYER_ANNOTATION (deprecated | 1303 | // MS_LAYER_RASTER, MS_LAYER_ANNOTATION (deprecated |
| 1333 | // since 6.2), MS_LAYER_QUERY, MS_LAYER_CIRCLE, | 1304 | // since 6.2), MS_LAYER_QUERY, MS_LAYER_CIRCLE, |
| 1334 | // MS_LAYER_TILEINDEX, MS_LAYER_CHART | 1305 | // MS_LAYER_TILEINDEX, MS_LAYER_CHART |
| 1335 | - //temp = camada.type === 0 ? opcoes.gutter = 20 : opcoes.gutter = 0; | 1306 | + // temp = camada.type === 0 ? opcoes.gutter = 20 : opcoes.gutter = 0; |
| 1336 | temp = | 1307 | temp = |
| 1337 | camada.transitioneffect === "nao" ? opcoes.transitionEffect = "null" : opcoes.transitionEffect = | 1308 | camada.transitioneffect === "nao" ? opcoes.transitionEffect = "null" : opcoes.transitionEffect = |
| 1338 | "resize"; | 1309 | "resize"; |
| @@ -1342,7 +1313,8 @@ i3GEO.Interface = | @@ -1342,7 +1313,8 @@ i3GEO.Interface = | ||
| 1342 | // 1 sao inseridos com Layer.TileCache | 1313 | // 1 sao inseridos com Layer.TileCache |
| 1343 | // i3GEO.Interface.openlayers.googleLike === false | 1314 | // i3GEO.Interface.openlayers.googleLike === false |
| 1344 | // && | 1315 | // && |
| 1345 | - if (i3GEO.Interface.openlayers.googleLike === false && camada.connectiontype === 7 && camada.wmsurl !== "" | 1316 | + if (i3GEO.Interface.openlayers.googleLike === false && camada.connectiontype === 7 |
| 1317 | + && camada.wmsurl !== "" | ||
| 1346 | && camada.usasld.toLowerCase() != "sim") { | 1318 | && camada.usasld.toLowerCase() != "sim") { |
| 1347 | urllayer = camada.wmsurl + "&r=" + Math.random(); | 1319 | urllayer = camada.wmsurl + "&r=" + Math.random(); |
| 1348 | if (camada.wmstile == 1) { | 1320 | if (camada.wmstile == 1) { |
| @@ -1363,8 +1335,10 @@ i3GEO.Interface = | @@ -1363,8 +1335,10 @@ i3GEO.Interface = | ||
| 1363 | } | 1335 | } |
| 1364 | } else { | 1336 | } else { |
| 1365 | // verifica se havera apenas um tile | 1337 | // verifica se havera apenas um tile |
| 1366 | - if (camada.tiles === "nao" || camada.escondido.toLowerCase() === "sim" || camada.connectiontype === 10 | ||
| 1367 | - || (camada.type === 0 && camada.cache === "nao") || camada.type === 8) { | 1338 | + if (camada.tiles === "nao" || camada.escondido.toLowerCase() === "sim" |
| 1339 | + || camada.connectiontype === 10 | ||
| 1340 | + || (camada.type === 0 && camada.cache === "nao") | ||
| 1341 | + || camada.type === 8) { | ||
| 1368 | opcoes.singleTile = true; | 1342 | opcoes.singleTile = true; |
| 1369 | } else { | 1343 | } else { |
| 1370 | temp = | 1344 | temp = |
| @@ -1381,7 +1355,7 @@ i3GEO.Interface = | @@ -1381,7 +1355,7 @@ i3GEO.Interface = | ||
| 1381 | opcoes.singleTile = false; | 1355 | opcoes.singleTile = false; |
| 1382 | } | 1356 | } |
| 1383 | if (opcoes.singleTile === true) { | 1357 | if (opcoes.singleTile === true) { |
| 1384 | - if(i3GEO.Interface.openlayers.googleLike === true){ | 1358 | + if (i3GEO.Interface.openlayers.googleLike === true) { |
| 1385 | opcoes.projection = new OpenLayers.Projection("EPSG:3857"); | 1359 | opcoes.projection = new OpenLayers.Projection("EPSG:3857"); |
| 1386 | } | 1360 | } |
| 1387 | layer = new OpenLayers.Layer.WMS(camada.name, urllayer, { | 1361 | layer = new OpenLayers.Layer.WMS(camada.name, urllayer, { |
| @@ -1389,7 +1363,7 @@ i3GEO.Interface = | @@ -1389,7 +1363,7 @@ i3GEO.Interface = | ||
| 1389 | format : camada.wmsformat, | 1363 | format : camada.wmsformat, |
| 1390 | transparent : true | 1364 | transparent : true |
| 1391 | }, opcoes); | 1365 | }, opcoes); |
| 1392 | - //layer.url = layer.url + "&SRS=EPSG:3857&CRS=EPSG:3857"; | 1366 | + // layer.url = layer.url + "&SRS=EPSG:3857&CRS=EPSG:3857"; |
| 1393 | // layer = new | 1367 | // layer = new |
| 1394 | // OpenLayers.Layer.TileCache(camada.name, | 1368 | // OpenLayers.Layer.TileCache(camada.name, |
| 1395 | // urllayer,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes); | 1369 | // urllayer,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes); |
| @@ -1595,8 +1569,12 @@ i3GEO.Interface = | @@ -1595,8 +1569,12 @@ i3GEO.Interface = | ||
| 1595 | // beacons pattern | 1569 | // beacons pattern |
| 1596 | b = new Image(); | 1570 | b = new Image(); |
| 1597 | b.src = | 1571 | b.src = |
| 1598 | - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar=" + desligar + "&ligar=" | ||
| 1599 | - + ligar + "&adicionar=nao&g_sid=" + i3GEO.configura.sid; | 1572 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar=" |
| 1573 | + + desligar | ||
| 1574 | + + "&ligar=" | ||
| 1575 | + + ligar | ||
| 1576 | + + "&adicionar=nao&g_sid=" | ||
| 1577 | + + i3GEO.configura.sid; | ||
| 1600 | b.onerror = function() { | 1578 | b.onerror = function() { |
| 1601 | i3GEO.mapa.legendaHTML.atualiza(); | 1579 | i3GEO.mapa.legendaHTML.atualiza(); |
| 1602 | }; | 1580 | }; |
| @@ -1605,7 +1583,7 @@ i3GEO.Interface = | @@ -1605,7 +1583,7 @@ i3GEO.Interface = | ||
| 1605 | * Define um dos layers existentes no mapa como baselayer | 1583 | * Define um dos layers existentes no mapa como baselayer |
| 1606 | */ | 1584 | */ |
| 1607 | ativaFundo : function(nome) { | 1585 | ativaFundo : function(nome) { |
| 1608 | - var t,temp = i3geoOL.getLayersBy("name", nome),layers,layersn,i,status; | 1586 | + var t, temp = i3geoOL.getLayersBy("name", nome), layers, layersn, i, status; |
| 1609 | if (temp.length > 0) { | 1587 | if (temp.length > 0) { |
| 1610 | i3geoOL.setBaseLayer(temp[0]); | 1588 | i3geoOL.setBaseLayer(temp[0]); |
| 1611 | if (i3GEO.Interface.openlayers.OLpanzoombar) { | 1589 | if (i3GEO.Interface.openlayers.OLpanzoombar) { |
| @@ -1624,24 +1602,24 @@ i3GEO.Interface = | @@ -1624,24 +1602,24 @@ i3GEO.Interface = | ||
| 1624 | i3GEO.Interface.openlayers.LAYERFUNDO = ""; | 1602 | i3GEO.Interface.openlayers.LAYERFUNDO = ""; |
| 1625 | } | 1603 | } |
| 1626 | // | 1604 | // |
| 1627 | - //verifica se existe um checkbox com o id do tema | ||
| 1628 | - //se existir, altera o status do checkbox | ||
| 1629 | - //e processa a lista de layers de fundo | 1605 | + // verifica se existe um checkbox com o id do tema |
| 1606 | + // se existir, altera o status do checkbox | ||
| 1607 | + // e processa a lista de layers de fundo | ||
| 1630 | // | 1608 | // |
| 1631 | - t = $i("CK"+temp[0].id); | ||
| 1632 | - if(t){ | 1609 | + t = $i("CK" + temp[0].id); |
| 1610 | + if (t) { | ||
| 1633 | status = true; | 1611 | status = true; |
| 1634 | - if(t.checked === false){ | 1612 | + if (t.checked === false) { |
| 1635 | status = false; | 1613 | status = false; |
| 1636 | } | 1614 | } |
| 1637 | - //desativa todos | ||
| 1638 | - //aqui sao considerados apenas os layers em layersadicionais, pois esses que foram inseridos na arvore | 1615 | + // desativa todos |
| 1616 | + // aqui sao considerados apenas os layers em layersadicionais, pois esses que foram inseridos na arvore | ||
| 1639 | layers = i3GEO.Interface.openlayers.LAYERSADICIONAIS; | 1617 | layers = i3GEO.Interface.openlayers.LAYERSADICIONAIS; |
| 1640 | layersn = layers.length; | 1618 | layersn = layers.length; |
| 1641 | for (i = 0; i < layersn; i++) { | 1619 | for (i = 0; i < layersn; i++) { |
| 1642 | - if(layers[i].name != nome){ | 1620 | + if (layers[i].name != nome) { |
| 1643 | layers[i].setVisibility(false); | 1621 | layers[i].setVisibility(false); |
| 1644 | - $i("CK"+layers[i].id).checked = false; | 1622 | + $i("CK" + layers[i].id).checked = false; |
| 1645 | } | 1623 | } |
| 1646 | } | 1624 | } |
| 1647 | temp[0].setVisibility(!status); | 1625 | temp[0].setVisibility(!status); |
| @@ -1731,7 +1709,7 @@ i3GEO.Interface = | @@ -1731,7 +1709,7 @@ i3GEO.Interface = | ||
| 1731 | if (i3GEO.Interface.openlayers.googleLike === true) { | 1709 | if (i3GEO.Interface.openlayers.googleLike === true) { |
| 1732 | projWGS84 = new OpenLayers.Projection("EPSG:4326"); | 1710 | projWGS84 = new OpenLayers.Projection("EPSG:4326"); |
| 1733 | proj900913 = new OpenLayers.Projection("EPSG:900913"); | 1711 | proj900913 = new OpenLayers.Projection("EPSG:900913"); |
| 1734 | - if(lonlat){ | 1712 | + if (lonlat) { |
| 1735 | point = new OpenLayers.LonLat(lonlat.lon, lonlat.lat); | 1713 | point = new OpenLayers.LonLat(lonlat.lon, lonlat.lat); |
| 1736 | lonlat = point.transform(proj900913, projWGS84); | 1714 | lonlat = point.transform(proj900913, projWGS84); |
| 1737 | } | 1715 | } |
| @@ -1916,14 +1894,12 @@ i3GEO.Interface = | @@ -1916,14 +1894,12 @@ i3GEO.Interface = | ||
| 1916 | visibility : 'off' | 1894 | visibility : 'off' |
| 1917 | } | 1895 | } |
| 1918 | ] | 1896 | ] |
| 1919 | - }, | ||
| 1920 | - { | 1897 | + }, { |
| 1921 | featureType : 'water', | 1898 | featureType : 'water', |
| 1922 | stylers : [ | 1899 | stylers : [ |
| 1923 | { | 1900 | { |
| 1924 | visibility : 'on' | 1901 | visibility : 'on' |
| 1925 | - }, | ||
| 1926 | - { | 1902 | + }, { |
| 1927 | lightness : -100 | 1903 | lightness : -100 |
| 1928 | } | 1904 | } |
| 1929 | ] | 1905 | ] |
| @@ -1946,11 +1922,9 @@ i3GEO.Interface = | @@ -1946,11 +1922,9 @@ i3GEO.Interface = | ||
| 1946 | stylers : [ | 1922 | stylers : [ |
| 1947 | { | 1923 | { |
| 1948 | hue : '#0000b0' | 1924 | hue : '#0000b0' |
| 1949 | - }, | ||
| 1950 | - { | 1925 | + }, { |
| 1951 | invert_lightness : 'true' | 1926 | invert_lightness : 'true' |
| 1952 | - }, | ||
| 1953 | - { | 1927 | + }, { |
| 1954 | saturation : -30 | 1928 | saturation : -30 |
| 1955 | } | 1929 | } |
| 1956 | ] | 1930 | ] |
| @@ -1962,8 +1936,7 @@ i3GEO.Interface = | @@ -1962,8 +1936,7 @@ i3GEO.Interface = | ||
| 1962 | stylers : [ | 1936 | stylers : [ |
| 1963 | { | 1937 | { |
| 1964 | saturation : -100 | 1938 | saturation : -100 |
| 1965 | - }, | ||
| 1966 | - { | 1939 | + }, { |
| 1967 | gamma : 0.50 | 1940 | gamma : 0.50 |
| 1968 | } | 1941 | } |
| 1969 | ] | 1942 | ] |
| @@ -1987,40 +1960,35 @@ i3GEO.Interface = | @@ -1987,40 +1960,35 @@ i3GEO.Interface = | ||
| 1987 | hue : '#00dd00' | 1960 | hue : '#00dd00' |
| 1988 | } | 1961 | } |
| 1989 | ] | 1962 | ] |
| 1990 | - }, | ||
| 1991 | - { | 1963 | + }, { |
| 1992 | featureType : 'road', | 1964 | featureType : 'road', |
| 1993 | stylers : [ | 1965 | stylers : [ |
| 1994 | { | 1966 | { |
| 1995 | hue : '#dd0000' | 1967 | hue : '#dd0000' |
| 1996 | } | 1968 | } |
| 1997 | ] | 1969 | ] |
| 1998 | - }, | ||
| 1999 | - { | 1970 | + }, { |
| 2000 | featureType : 'water', | 1971 | featureType : 'water', |
| 2001 | stylers : [ | 1972 | stylers : [ |
| 2002 | { | 1973 | { |
| 2003 | hue : '#000040' | 1974 | hue : '#000040' |
| 2004 | } | 1975 | } |
| 2005 | ] | 1976 | ] |
| 2006 | - }, | ||
| 2007 | - { | 1977 | + }, { |
| 2008 | featureType : 'poi.park', | 1978 | featureType : 'poi.park', |
| 2009 | stylers : [ | 1979 | stylers : [ |
| 2010 | { | 1980 | { |
| 2011 | visibility : 'off' | 1981 | visibility : 'off' |
| 2012 | } | 1982 | } |
| 2013 | ] | 1983 | ] |
| 2014 | - }, | ||
| 2015 | - { | 1984 | + }, { |
| 2016 | featureType : 'road.arterial', | 1985 | featureType : 'road.arterial', |
| 2017 | stylers : [ | 1986 | stylers : [ |
| 2018 | { | 1987 | { |
| 2019 | hue : '#ffff00' | 1988 | hue : '#ffff00' |
| 2020 | } | 1989 | } |
| 2021 | ] | 1990 | ] |
| 2022 | - }, | ||
| 2023 | - { | 1991 | + }, { |
| 2024 | featureType : 'road.local', | 1992 | featureType : 'road.local', |
| 2025 | stylers : [ | 1993 | stylers : [ |
| 2026 | { | 1994 | { |
| @@ -2038,36 +2006,29 @@ i3GEO.Interface = | @@ -2038,36 +2006,29 @@ i3GEO.Interface = | ||
| 2038 | 'visibility' : 'simplified' | 2006 | 'visibility' : 'simplified' |
| 2039 | } | 2007 | } |
| 2040 | ] | 2008 | ] |
| 2041 | - }, | ||
| 2042 | - { | 2009 | + }, { |
| 2043 | featureType : 'road.arterial', | 2010 | featureType : 'road.arterial', |
| 2044 | stylers : [ | 2011 | stylers : [ |
| 2045 | { | 2012 | { |
| 2046 | hue : 149 | 2013 | hue : 149 |
| 2047 | - }, | ||
| 2048 | - { | 2014 | + }, { |
| 2049 | saturation : -78 | 2015 | saturation : -78 |
| 2050 | - }, | ||
| 2051 | - { | 2016 | + }, { |
| 2052 | lightness : 0 | 2017 | lightness : 0 |
| 2053 | } | 2018 | } |
| 2054 | ] | 2019 | ] |
| 2055 | - }, | ||
| 2056 | - { | 2020 | + }, { |
| 2057 | featureType : 'road.highway', | 2021 | featureType : 'road.highway', |
| 2058 | stylers : [ | 2022 | stylers : [ |
| 2059 | { | 2023 | { |
| 2060 | hue : -31 | 2024 | hue : -31 |
| 2061 | - }, | ||
| 2062 | - { | 2025 | + }, { |
| 2063 | saturation : -40 | 2026 | saturation : -40 |
| 2064 | - }, | ||
| 2065 | - { | 2027 | + }, { |
| 2066 | lightness : 2.8 | 2028 | lightness : 2.8 |
| 2067 | } | 2029 | } |
| 2068 | ] | 2030 | ] |
| 2069 | - }, | ||
| 2070 | - { | 2031 | + }, { |
| 2071 | featureType : 'poi', | 2032 | featureType : 'poi', |
| 2072 | elementType : 'label', | 2033 | elementType : 'label', |
| 2073 | stylers : [ | 2034 | stylers : [ |
| @@ -2075,39 +2036,32 @@ i3GEO.Interface = | @@ -2075,39 +2036,32 @@ i3GEO.Interface = | ||
| 2075 | 'visibility' : 'off' | 2036 | 'visibility' : 'off' |
| 2076 | } | 2037 | } |
| 2077 | ] | 2038 | ] |
| 2078 | - }, | ||
| 2079 | - { | 2039 | + }, { |
| 2080 | featureType : 'landscape', | 2040 | featureType : 'landscape', |
| 2081 | stylers : [ | 2041 | stylers : [ |
| 2082 | { | 2042 | { |
| 2083 | hue : 163 | 2043 | hue : 163 |
| 2084 | - }, | ||
| 2085 | - { | 2044 | + }, { |
| 2086 | saturation : -26 | 2045 | saturation : -26 |
| 2087 | - }, | ||
| 2088 | - { | 2046 | + }, { |
| 2089 | lightness : -1.1 | 2047 | lightness : -1.1 |
| 2090 | } | 2048 | } |
| 2091 | ] | 2049 | ] |
| 2092 | - }, | ||
| 2093 | - { | 2050 | + }, { |
| 2094 | featureType : 'transit', | 2051 | featureType : 'transit', |
| 2095 | stylers : [ | 2052 | stylers : [ |
| 2096 | { | 2053 | { |
| 2097 | 'visibility' : 'off' | 2054 | 'visibility' : 'off' |
| 2098 | } | 2055 | } |
| 2099 | ] | 2056 | ] |
| 2100 | - }, | ||
| 2101 | - { | 2057 | + }, { |
| 2102 | featureType : 'water', | 2058 | featureType : 'water', |
| 2103 | stylers : [ | 2059 | stylers : [ |
| 2104 | { | 2060 | { |
| 2105 | hue : 3 | 2061 | hue : 3 |
| 2106 | - }, | ||
| 2107 | - { | 2062 | + }, { |
| 2108 | saturation : -24.24 | 2063 | saturation : -24.24 |
| 2109 | - }, | ||
| 2110 | - { | 2064 | + }, { |
| 2111 | lightness : -38.57 | 2065 | lightness : -38.57 |
| 2112 | } | 2066 | } |
| 2113 | ] | 2067 | ] |
| @@ -2238,8 +2192,8 @@ i3GEO.Interface = | @@ -2238,8 +2192,8 @@ i3GEO.Interface = | ||
| 2238 | } | 2192 | } |
| 2239 | p = []; | 2193 | p = []; |
| 2240 | }, | 2194 | }, |
| 2241 | - balao : function(texto,completo, x, y) { | ||
| 2242 | - var temp,elem,b, c, p; | 2195 | + balao : function(texto, completo, x, y) { |
| 2196 | + var temp, elem, b, c, p; | ||
| 2243 | if (x === null || y === null) { | 2197 | if (x === null || y === null) { |
| 2244 | return; | 2198 | return; |
| 2245 | } | 2199 | } |
| @@ -2248,13 +2202,13 @@ i3GEO.Interface = | @@ -2248,13 +2202,13 @@ i3GEO.Interface = | ||
| 2248 | if (p.removeAoAdicionar === true) { | 2202 | if (p.removeAoAdicionar === true) { |
| 2249 | i3GEO.Interface.googlemaps.removeBaloes(); | 2203 | i3GEO.Interface.googlemaps.removeBaloes(); |
| 2250 | } | 2204 | } |
| 2251 | - //botoes do balao | 2205 | + // botoes do balao |
| 2252 | temp = document.createElement("div"); | 2206 | temp = document.createElement("div"); |
| 2253 | temp.className = "i3GEOCabecalhoInfoWindow"; | 2207 | temp.className = "i3GEOCabecalhoInfoWindow"; |
| 2254 | temp.style.top = "0px"; | 2208 | temp.style.top = "0px"; |
| 2255 | 2209 | ||
| 2256 | elem = document.createElement("img"); | 2210 | elem = document.createElement("img"); |
| 2257 | - elem.src = i3GEO.configura.locaplic+"/imagens/branco.gif"; | 2211 | + elem.src = i3GEO.configura.locaplic + "/imagens/branco.gif"; |
| 2258 | elem.className = p.classeCadeado; | 2212 | elem.className = p.classeCadeado; |
| 2259 | elem.onclick = function() { | 2213 | elem.onclick = function() { |
| 2260 | if (p.classeCadeado === "i3GEOiconeAberto") { | 2214 | if (p.classeCadeado === "i3GEOiconeAberto") { |
| @@ -2267,32 +2221,28 @@ i3GEO.Interface = | @@ -2267,32 +2221,28 @@ i3GEO.Interface = | ||
| 2267 | }; | 2221 | }; |
| 2268 | temp.appendChild(elem); | 2222 | temp.appendChild(elem); |
| 2269 | elem = document.createElement("img"); | 2223 | elem = document.createElement("img"); |
| 2270 | - elem.src = i3GEO.configura.locaplic+"/imagens/branco.gif"; | 2224 | + elem.src = i3GEO.configura.locaplic + "/imagens/branco.gif"; |
| 2271 | elem.className = "i3GEOiconeFerramentas"; | 2225 | elem.className = "i3GEOiconeFerramentas"; |
| 2272 | elem.style.marginLeft = "5px"; | 2226 | elem.style.marginLeft = "5px"; |
| 2273 | - elem.onclick = function(){ | ||
| 2274 | - i3GEO.janela.prompt( | ||
| 2275 | - $trad("tolerancia"), | ||
| 2276 | - function(){ | ||
| 2277 | - i3GEO.mapa.RESOLUCAOTIP = $i("i3GEOjanelaprompt").value; | ||
| 2278 | - }, | ||
| 2279 | - i3GEO.mapa.RESOLUCAOTIP | ||
| 2280 | - ); | 2227 | + elem.onclick = function() { |
| 2228 | + i3GEO.janela.prompt($trad("tolerancia"), function() { | ||
| 2229 | + i3GEO.mapa.RESOLUCAOTIP = $i("i3GEOjanelaprompt").value; | ||
| 2230 | + }, i3GEO.mapa.RESOLUCAOTIP); | ||
| 2281 | }; | 2231 | }; |
| 2282 | temp.appendChild(elem); | 2232 | temp.appendChild(elem); |
| 2283 | elem = document.createElement("img"); | 2233 | elem = document.createElement("img"); |
| 2284 | - elem.src = i3GEO.configura.locaplic+"/imagens/branco.gif"; | 2234 | + elem.src = i3GEO.configura.locaplic + "/imagens/branco.gif"; |
| 2285 | elem.className = "i3GEOiconeMais"; | 2235 | elem.className = "i3GEOiconeMais"; |
| 2286 | elem.style.marginLeft = "7px"; | 2236 | elem.style.marginLeft = "7px"; |
| 2287 | elem.onclick = function() { | 2237 | elem.onclick = function() { |
| 2288 | - i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>"+completo+"</div>", ""); | 2238 | + i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>" + completo + "</div>", ""); |
| 2289 | return false; | 2239 | return false; |
| 2290 | }; | 2240 | }; |
| 2291 | temp.appendChild(elem); | 2241 | temp.appendChild(elem); |
| 2292 | - //texto do balao | 2242 | + // texto do balao |
| 2293 | c = document.createElement("div"); | 2243 | c = document.createElement("div"); |
| 2294 | c.innerHTML = texto; | 2244 | c.innerHTML = texto; |
| 2295 | - //conteudo do balao | 2245 | + // conteudo do balao |
| 2296 | e = document.createElement("div"); | 2246 | e = document.createElement("div"); |
| 2297 | e.appendChild(temp); | 2247 | e.appendChild(temp); |
| 2298 | e.appendChild(c); | 2248 | e.appendChild(c); |
| @@ -2355,8 +2305,8 @@ i3GEO.Interface = | @@ -2355,8 +2305,8 @@ i3GEO.Interface = | ||
| 2355 | f = $i("googlemapsdiv"); | 2305 | f = $i("googlemapsdiv"); |
| 2356 | if (!f) { | 2306 | if (!f) { |
| 2357 | ins = | 2307 | ins = |
| 2358 | - '<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url(' | ||
| 2359 | - + i3GEO.configura.locaplic + '/imagens/i3geo1bw.jpg)"></div>'; | 2308 | + '<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url(' + i3GEO.configura.locaplic |
| 2309 | + + '/imagens/i3geo1bw.jpg)"></div>'; | ||
| 2360 | i.innerHTML = ins; | 2310 | i.innerHTML = ins; |
| 2361 | } | 2311 | } |
| 2362 | f = $i("googlemapsdiv"); | 2312 | f = $i("googlemapsdiv"); |
| @@ -2510,69 +2460,64 @@ i3GEO.Interface = | @@ -2510,69 +2460,64 @@ i3GEO.Interface = | ||
| 2510 | cache = ""; | 2460 | cache = ""; |
| 2511 | } | 2461 | } |
| 2512 | /* | 2462 | /* |
| 2513 | - var s = | ||
| 2514 | - "i3GEOTileO = new google.maps.ImageMapType({ " + "getTileUrl: function(coord, zoom) {" + " var url = '" | ||
| 2515 | - + i3GEO.configura.locaplic + "/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + "&cache=" + cache | ||
| 2516 | - + "&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer=" + nomeLayer | ||
| 2517 | - + i3GEO.Interface.googlemaps.PARAMETROSLAYER + '&r=' + Math.random() + "';" | ||
| 2518 | - + " return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; " + "}, " + "tileSize: new google.maps.Size(256, 256)," | ||
| 2519 | - + "isPng: true," + "name: '" + nomeLayer + "'" + "});"; | ||
| 2520 | - eval(s); | ||
| 2521 | - */ | 2463 | + * var s = "i3GEOTileO = new google.maps.ImageMapType({ " + "getTileUrl: function(coord, zoom) {" + " var url = '" + |
| 2464 | + * i3GEO.configura.locaplic + "/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + "&cache=" + cache + "&Z=' + | ||
| 2465 | + * zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer=" + nomeLayer + i3GEO.Interface.googlemaps.PARAMETROSLAYER + '&r=' + | ||
| 2466 | + * Math.random() + "';" + " return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; " + "}, " + "tileSize: new | ||
| 2467 | + * google.maps.Size(256, 256)," + "isPng: true," + "name: '" + nomeLayer + "'" + "});"; eval(s); | ||
| 2468 | + */ | ||
| 2522 | 2469 | ||
| 2523 | - i3GEOTileO = new google.maps.ImageMapType({ | ||
| 2524 | - getTileUrl: function(coord, zoom) { | ||
| 2525 | - var url = i3GEO.configura.locaplic + "/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + "&cache=" + cache | ||
| 2526 | - + "&Z=" + zoom + "&X=" + coord.x + "&Y=" + coord.y + "&layer=" + nomeLayer | ||
| 2527 | - + i3GEO.Interface.googlemaps.PARAMETROSLAYER + '&r=' + Math.random(); | ||
| 2528 | - return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; | ||
| 2529 | - }, | ||
| 2530 | - tileSize: new google.maps.Size(256, 256), | ||
| 2531 | - isPng: true, | ||
| 2532 | - name: nomeLayer | ||
| 2533 | - }); | 2470 | + i3GEOTileO = |
| 2471 | + new google.maps.ImageMapType({ | ||
| 2472 | + getTileUrl : function(coord, zoom) { | ||
| 2473 | + var url = | ||
| 2474 | + i3GEO.configura.locaplic + "/classesphp/mapa_googlemaps.php?g_sid=" | ||
| 2475 | + + i3GEO.configura.sid | ||
| 2476 | + + "&cache=" | ||
| 2477 | + + cache | ||
| 2478 | + + "&Z=" | ||
| 2479 | + + zoom | ||
| 2480 | + + "&X=" | ||
| 2481 | + + coord.x | ||
| 2482 | + + "&Y=" | ||
| 2483 | + + coord.y | ||
| 2484 | + + "&layer=" | ||
| 2485 | + + nomeLayer | ||
| 2486 | + + i3GEO.Interface.googlemaps.PARAMETROSLAYER | ||
| 2487 | + + '&r=' | ||
| 2488 | + + Math.random(); | ||
| 2489 | + return url + '&nd=' + i3GEO.Interface.googlemaps.posfixo; | ||
| 2490 | + }, | ||
| 2491 | + tileSize : new google.maps.Size(256, 256), | ||
| 2492 | + isPng : true, | ||
| 2493 | + name : nomeLayer | ||
| 2494 | + }); | ||
| 2534 | 2495 | ||
| 2535 | /* | 2496 | /* |
| 2536 | - i3GEOTileO = new google.maps.ImageMapType({ | ||
| 2537 | - getTileUrl: function(coord, zoom) { | ||
| 2538 | - var url = i3GEO.configura.locaplic + "/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + "&cache=" + cache | ||
| 2539 | - + "&BBOX=" + i3GEO.Interface.googlemaps.bbox2mercator(i3GEO.Interface.googlemaps.bbox()) | ||
| 2540 | - + "&HEIGHT=" + i3GEO.parametros.h | ||
| 2541 | - + "&WIDTH=" + i3GEO.parametros.w | ||
| 2542 | - + "&layer=" + nomeLayer | ||
| 2543 | - + i3GEO.Interface.googlemaps.PARAMETROSLAYER + '&r=' + Math.random(); | ||
| 2544 | - return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; | ||
| 2545 | - }, | ||
| 2546 | - tileSize: new google.maps.Size(i3GEO.parametros.w, i3GEO.parametros.h), | ||
| 2547 | - isPng: true, | ||
| 2548 | - name: nomeLayer, | ||
| 2549 | - projection : i3GeoMap.getProjection(), | ||
| 2550 | - b : i3GeoMap.getBounds() | ||
| 2551 | - }); | ||
| 2552 | - | ||
| 2553 | - | ||
| 2554 | - google.maps.event.addListener(i3GEOTileO, 'tilesloaded', function() { | ||
| 2555 | - var l = i3GEO.Interface.googlemaps.retornaObjetoLayer(nomeLayer); | ||
| 2556 | - var currentBounds = i3GeoMap.getBounds(); | ||
| 2557 | - if (currentBounds.equals(l.b)) { | ||
| 2558 | - return; | ||
| 2559 | - } | ||
| 2560 | - l.b = currentBounds; | ||
| 2561 | - }); | ||
| 2562 | - */ | 2497 | + * i3GEOTileO = new google.maps.ImageMapType({ getTileUrl: function(coord, zoom) { var url = i3GEO.configura.locaplic + |
| 2498 | + * "/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + "&cache=" + cache + "&BBOX=" + | ||
| 2499 | + * i3GEO.Interface.googlemaps.bbox2mercator(i3GEO.Interface.googlemaps.bbox()) + "&HEIGHT=" + i3GEO.parametros.h + "&WIDTH=" + | ||
| 2500 | + * i3GEO.parametros.w + "&layer=" + nomeLayer + i3GEO.Interface.googlemaps.PARAMETROSLAYER + '&r=' + Math.random(); return | ||
| 2501 | + * url+'&nd='+i3GEO.Interface.googlemaps.posfixo; }, tileSize: new google.maps.Size(i3GEO.parametros.w, i3GEO.parametros.h), | ||
| 2502 | + * isPng: true, name: nomeLayer, projection : i3GeoMap.getProjection(), b : i3GeoMap.getBounds() }); | ||
| 2503 | + * | ||
| 2504 | + * | ||
| 2505 | + * google.maps.event.addListener(i3GEOTileO, 'tilesloaded', function() { var l = | ||
| 2506 | + * i3GEO.Interface.googlemaps.retornaObjetoLayer(nomeLayer); var currentBounds = i3GeoMap.getBounds(); if | ||
| 2507 | + * (currentBounds.equals(l.b)) { return; } l.b = currentBounds; }); | ||
| 2508 | + */ | ||
| 2563 | return i3GEOTileO; | 2509 | return i3GEOTileO; |
| 2564 | }, | 2510 | }, |
| 2565 | - bbox2mercator : function(bbox){ | ||
| 2566 | - var c = bbox.split(" "), | ||
| 2567 | - p1,p2; | ||
| 2568 | - p1 = i3GEO.Interface.googlemaps.geo2mercator(c[0],c[1]); | ||
| 2569 | - p2 = i3GEO.Interface.googlemaps.geo2mercator(c[2],c[3]); | ||
| 2570 | - return p1.x+" "+p1.y+" "+p2.x+" "+p2.y; | ||
| 2571 | - }, | ||
| 2572 | - geo2mercator : function(x,y){ | ||
| 2573 | - var source = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs", | ||
| 2574 | - dest = "+title= Google Mercator EPSG:900913 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs", | ||
| 2575 | - p = new Proj4js.Point(parseInt(x,10), parseInt(y,10)); | 2511 | + bbox2mercator : function(bbox) { |
| 2512 | + var c = bbox.split(" "), p1, p2; | ||
| 2513 | + p1 = i3GEO.Interface.googlemaps.geo2mercator(c[0], c[1]); | ||
| 2514 | + p2 = i3GEO.Interface.googlemaps.geo2mercator(c[2], c[3]); | ||
| 2515 | + return p1.x + " " + p1.y + " " + p2.x + " " + p2.y; | ||
| 2516 | + }, | ||
| 2517 | + geo2mercator : function(x, y) { | ||
| 2518 | + var source = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs", dest = | ||
| 2519 | + "+title= Google Mercator EPSG:900913 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs", p = | ||
| 2520 | + new Proj4js.Point(parseInt(x, 10), parseInt(y, 10)); | ||
| 2576 | 2521 | ||
| 2577 | Proj4js.defs["WGS84"] = source; | 2522 | Proj4js.defs["WGS84"] = source; |
| 2578 | Proj4js.defs["EPSG:900913"] = dest; | 2523 | Proj4js.defs["EPSG:900913"] = dest; |
| @@ -2936,7 +2881,9 @@ i3GEO.Interface = | @@ -2936,7 +2881,9 @@ i3GEO.Interface = | ||
| 2936 | node = i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml", "raiz"); | 2881 | node = i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml", "raiz"); |
| 2937 | html = | 2882 | html = |
| 2938 | "<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\"" + url | 2883 | "<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\"" + url |
| 2939 | - + "\")' class=inputsb style='cursor:pointer;' type='checkbox' value='" + id + "'"; | 2884 | + + "\")' class=inputsb style='cursor:pointer;' type='checkbox' value='" |
| 2885 | + + id | ||
| 2886 | + + "'"; | ||
| 2940 | if (ativo === true) { | 2887 | if (ativo === true) { |
| 2941 | html += " checked "; | 2888 | html += " checked "; |
| 2942 | } | 2889 | } |
| @@ -3085,8 +3032,7 @@ i3GEO.Interface = | @@ -3085,8 +3032,7 @@ i3GEO.Interface = | ||
| 3085 | LAYER_TERRAIN : true | 3032 | LAYER_TERRAIN : true |
| 3086 | }, | 3033 | }, |
| 3087 | POSICAOTELA : [ | 3034 | POSICAOTELA : [ |
| 3088 | - 0, | ||
| 3089 | - 0 | 3035 | + 0, 0 |
| 3090 | ], | 3036 | ], |
| 3091 | aguarde : "", | 3037 | aguarde : "", |
| 3092 | ligaDesliga : function(obj) { | 3038 | ligaDesliga : function(obj) { |
| @@ -3145,24 +3091,19 @@ i3GEO.Interface = | @@ -3145,24 +3091,19 @@ i3GEO.Interface = | ||
| 3145 | { | 3091 | { |
| 3146 | text : "p2", | 3092 | text : "p2", |
| 3147 | url : "javascript:i3GEO.mapa.dialogo.tipoimagem()" | 3093 | url : "javascript:i3GEO.mapa.dialogo.tipoimagem()" |
| 3148 | - }, | ||
| 3149 | - { | 3094 | + }, { |
| 3150 | text : "p3", | 3095 | text : "p3", |
| 3151 | url : "javascript:i3GEO.mapa.dialogo.opcoesLegenda()" | 3096 | url : "javascript:i3GEO.mapa.dialogo.opcoesLegenda()" |
| 3152 | - }, | ||
| 3153 | - { | 3097 | + }, { |
| 3154 | text : "p4", | 3098 | text : "p4", |
| 3155 | url : "javascript:i3GEO.mapa.dialogo.opcoesEscala()" | 3099 | url : "javascript:i3GEO.mapa.dialogo.opcoesEscala()" |
| 3156 | - }, | ||
| 3157 | - { | 3100 | + }, { |
| 3158 | text : "p8", | 3101 | text : "p8", |
| 3159 | url : "javascript:i3GEO.mapa.dialogo.queryMap()" | 3102 | url : "javascript:i3GEO.mapa.dialogo.queryMap()" |
| 3160 | - }, | ||
| 3161 | - { | 3103 | + }, { |
| 3162 | text : "p9", | 3104 | text : "p9", |
| 3163 | url : "javascript:i3GEO.mapa.dialogo.corFundo()" | 3105 | url : "javascript:i3GEO.mapa.dialogo.corFundo()" |
| 3164 | - }, | ||
| 3165 | - { | 3106 | + }, { |
| 3166 | text : "p10", | 3107 | text : "p10", |
| 3167 | url : "javascript:i3GEO.mapa.dialogo.gradeCoord()" | 3108 | url : "javascript:i3GEO.mapa.dialogo.gradeCoord()" |
| 3168 | } | 3109 | } |
| @@ -3390,9 +3331,13 @@ i3GEO.Interface = | @@ -3390,9 +3331,13 @@ i3GEO.Interface = | ||
| 3390 | }, | 3331 | }, |
| 3391 | insereLayer : function(nomeLayer) { | 3332 | insereLayer : function(nomeLayer) { |
| 3392 | var kmlUrl = | 3333 | var kmlUrl = |
| 3393 | - i3GEO.configura.locaplic + "/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid=" + i3GEO.configura.sid + "&layer=" | ||
| 3394 | - + nomeLayer + i3GEO.Interface.googleearth.PARAMETROSLAYER + "&r=" + Math.random(), linki3geo = | ||
| 3395 | - i3GeoMap.createLink(''), nl = i3GeoMap.createNetworkLink(''); | 3334 | + i3GEO.configura.locaplic + "/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid=" |
| 3335 | + + i3GEO.configura.sid | ||
| 3336 | + + "&layer=" | ||
| 3337 | + + nomeLayer | ||
| 3338 | + + i3GEO.Interface.googleearth.PARAMETROSLAYER | ||
| 3339 | + + "&r=" | ||
| 3340 | + + Math.random(), linki3geo = i3GeoMap.createLink(''), nl = i3GeoMap.createNetworkLink(''); | ||
| 3396 | linki3geo.setHref(kmlUrl + i3GEO.Interface.googleearth.posfixo); | 3341 | linki3geo.setHref(kmlUrl + i3GEO.Interface.googleearth.posfixo); |
| 3397 | nl.setLink(linki3geo); | 3342 | nl.setLink(linki3geo); |
| 3398 | nl.setFlyToView(false); | 3343 | nl.setFlyToView(false); |
| @@ -3600,8 +3545,8 @@ i3GEO.Interface = | @@ -3600,8 +3545,8 @@ i3GEO.Interface = | ||
| 3600 | } | 3545 | } |
| 3601 | node = i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml", "raiz"); | 3546 | node = i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml", "raiz"); |
| 3602 | html = | 3547 | html = |
| 3603 | - "<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='" | ||
| 3604 | - + id + "'"; | 3548 | + "<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='" + id |
| 3549 | + + "'"; | ||
| 3605 | if (ativo === true) { | 3550 | if (ativo === true) { |
| 3606 | html += " checked "; | 3551 | html += " checked "; |
| 3607 | } | 3552 | } |