Commit bd49ee7fd58f6a78f00ccf822071912fce5c4606
1 parent
723eb945
Exists in
master
and in
7 other branches
-
Showing
9 changed files
with
495 additions
and
338 deletions
Show diff stats
classesjs/classe_analise.js
| ... | ... | @@ -437,7 +437,7 @@ i3GEO.analise = { |
| 437 | 437 | if($i("pararraios") && $i("pararraios").checked === true ){ |
| 438 | 438 | circ = new OpenLayers.Feature.Vector( |
| 439 | 439 | OpenLayers.Geometry.Polygon.createRegularPolygon( |
| 440 | - point, | |
| 440 | + new OpenLayers.Geometry.Point(x1,y1), | |
| 441 | 441 | raio, |
| 442 | 442 | 30 |
| 443 | 443 | ), |
| ... | ... | @@ -554,12 +554,11 @@ i3GEO.analise = { |
| 554 | 554 | * Executa a funcao de inicializacao do desenho, que cria o layer para receber os graficos |
| 555 | 555 | */ |
| 556 | 556 | inicia: function(){ |
| 557 | - var linha, | |
| 558 | - estilo = i3GEO.desenho.estilos[i3GEO.desenho.estiloPadrao]; | |
| 559 | 557 | i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); |
| 560 | 558 | i3GeoMap.setOptions({disableDoubleClickZoom:true}); |
| 561 | 559 | i3GeoMap.setOptions({draggableCursor:'crosshair'}); |
| 562 | - i3GEO.analise.medeDistancia.pontos = { | |
| 560 | + var evtdblclick = null,evtclick = null,evtmousemove = null, | |
| 561 | + pontos = { | |
| 563 | 562 | xpt: [], |
| 564 | 563 | ypt: [], |
| 565 | 564 | dist: [], |
| ... | ... | @@ -567,10 +566,26 @@ i3GEO.analise = { |
| 567 | 566 | mvcMarkers: new google.maps.MVCArray(), |
| 568 | 567 | line: null, |
| 569 | 568 | polygon: null |
| 570 | - }; | |
| 571 | - var pontos = i3GEO.analise.medeDistancia.pontos; | |
| 572 | - i3GEO.analise.medeDistancia.googlemaps.evtclick = google.maps.event.addListener(i3GeoMap, "click", function(evt) { | |
| 573 | - var x1,x2,y1,y2,raio,trecho,total,n; | |
| 569 | + }, | |
| 570 | + termina = function(){ | |
| 571 | + google.maps.event.removeListener(evtdblclick); | |
| 572 | + google.maps.event.removeListener(evtclick); | |
| 573 | + google.maps.event.removeListener(evtmousemove); | |
| 574 | + pontos.line.setOptions({clickable: true}); | |
| 575 | + google.maps.event.addListener(pontos.line, 'click', function(shape) { | |
| 576 | + if(shape.setEditable){ | |
| 577 | + shape.setEditable(!shape.editable); | |
| 578 | + } | |
| 579 | + }); | |
| 580 | + if(pontos){ | |
| 581 | + i3GEO.desenho.googlemaps.shapes.push(pontos.mvcLine); | |
| 582 | + i3GEO.desenho.googlemaps.shapes.push(pontos.line); | |
| 583 | + pontos = null; | |
| 584 | + } | |
| 585 | + }; | |
| 586 | + evtclick = google.maps.event.addListener(i3GeoMap, "click", function(evt) { | |
| 587 | + var x1,x2,y1,y2,trecho=0,total,n, | |
| 588 | + estilo = i3GEO.desenho.estilos[i3GEO.desenho.estiloPadrao]; | |
| 574 | 589 | // When the map is clicked, pass the LatLng obect to the measureAdd function |
| 575 | 590 | pontos.mvcLine.push(evt.latLng); |
| 576 | 591 | pontos.xpt.push(evt.latLng.lng()); |
| ... | ... | @@ -578,49 +593,63 @@ i3GEO.analise = { |
| 578 | 593 | n = pontos.xpt.length; |
| 579 | 594 | //desenha um circulo |
| 580 | 595 | if (pontos.mvcLine.getLength() > 1) { |
| 581 | - if($i("pararraios") && $i("pararraios").checked === true ){ | |
| 582 | - new google.maps.Circle({ | |
| 583 | - map: i3GeoMap, | |
| 584 | - fillOpacity: 0, | |
| 585 | - clickable: false, | |
| 586 | - strokeColor: estilo.circcolor, | |
| 587 | - strokeOpacity: 1, | |
| 588 | - strokeWeight: estilo.linewidth, | |
| 589 | - center:evt.latLng, | |
| 590 | - radius: 50000 | |
| 591 | - }); | |
| 592 | - } | |
| 593 | - x1 = i3GEO.analise.medeDistancia.pontos.xpt[n-2]; | |
| 594 | - y1 = i3GEO.analise.medeDistancia.pontos.ypt[n-2]; | |
| 596 | + x1 = pontos.xpt[n-2]; | |
| 597 | + y1 = pontos.ypt[n-2]; | |
| 595 | 598 | x2 = evt.latLng.lng(); |
| 596 | 599 | y2 = evt.latLng.lat(); |
| 597 | - raio = google.maps.geometry.spherical.computeDistanceBetween(evt.latLng,new google.maps.LatLng(y1,x1)) | |
| 600 | + //raio = google.maps.geometry.spherical.computeDistanceBetween(evt.latLng,new google.maps.LatLng(y1,x1)) | |
| 598 | 601 | trecho = i3GEO.calculo.distancia(x1,y1,x2,y2); |
| 599 | - i3GEO.analise.medeDistancia.pontos.dist.push(trecho); | |
| 600 | - total = i3GEO.analise.medeDistancia.googlemaps.somaDist(); | |
| 602 | + pontos.dist.push(trecho); | |
| 603 | + total = i3GEO.analise.medeDistancia.googlemaps.somaDist(pontos); | |
| 601 | 604 | i3GEO.analise.medeDistancia.googlemaps.mostraTotal(trecho,total); |
| 605 | + if($i("pararraios") && $i("pararraios").checked === true ){ | |
| 606 | + i3GEO.desenho.googlemaps.shapes.push( | |
| 607 | + new google.maps.Circle({ | |
| 608 | + map: i3GeoMap, | |
| 609 | + fillOpacity: 0, | |
| 610 | + clickable: false, | |
| 611 | + strokeColor: estilo.circcolor, | |
| 612 | + strokeOpacity: 1, | |
| 613 | + strokeWeight: estilo.linewidth, | |
| 614 | + center: new google.maps.LatLng(y1,x1), | |
| 615 | + radius: trecho*1000, | |
| 616 | + origem: "medeDistanciaExcluir" | |
| 617 | + }) | |
| 618 | + ); | |
| 619 | + } | |
| 602 | 620 | } |
| 603 | 621 | //desenha uma marca no ponto |
| 604 | 622 | if($i("parartextos") && $i("parartextos").checked === true ){ |
| 605 | - new google.maps.Marker({ | |
| 606 | - map: i3GeoMap, | |
| 607 | - fillOpacity: 0, | |
| 608 | - clickable: false, | |
| 609 | - position:evt.latLng, | |
| 610 | - icon: { | |
| 611 | - path: google.maps.SymbolPath.CIRCLE, | |
| 612 | - scale: 2.5, | |
| 613 | - strokeColor: "#ffffff" | |
| 614 | - } | |
| 615 | - }); | |
| 623 | + i3GEO.desenho.googlemaps.shapes.push( | |
| 624 | + new google.maps.Marker({ | |
| 625 | + map: i3GeoMap, | |
| 626 | + fillOpacity: 0, | |
| 627 | + clickable: false, | |
| 628 | + position:evt.latLng, | |
| 629 | + icon: { | |
| 630 | + path: google.maps.SymbolPath.CIRCLE, | |
| 631 | + scale: 2.5, | |
| 632 | + strokeColor: "#ffffff", | |
| 633 | + title: trecho.toFixed(0)+" km" | |
| 634 | + }, | |
| 635 | + origem: "medeDistanciaExcluir" | |
| 636 | + }) | |
| 637 | + ); | |
| 616 | 638 | } |
| 617 | - pontos.ypt.push(evt.latLng.lat()); | |
| 618 | 639 | //mais um ponto para criar uma linha movel |
| 619 | 640 | pontos.mvcLine.push(evt.latLng); |
| 620 | 641 | }); |
| 621 | - i3GEO.analise.medeDistancia.googlemaps.evtmousemove = google.maps.event.addListener(i3GeoMap, "mousemove", function(evt) { | |
| 642 | + evtmousemove = google.maps.event.addListener(i3GeoMap, "mousemove", function(evt) { | |
| 643 | + if(!$i("mostradistancia_calculo")){ | |
| 644 | + termina.call(); | |
| 645 | + return; | |
| 646 | + } | |
| 647 | + var x1,y1,x2,y2,direcao,parcial, | |
| 648 | + estilo = i3GEO.desenho.estilos[i3GEO.desenho.estiloPadrao], | |
| 649 | + n = pontos.xpt.length; | |
| 650 | + | |
| 622 | 651 | // If there is more than one vertex on the line |
| 623 | - if (pontos.mvcLine.getLength() > 1) { | |
| 652 | + if (pontos.mvcLine.getLength() > 0) { | |
| 624 | 653 | // If the line hasn't been created yet |
| 625 | 654 | if (!pontos.line) { |
| 626 | 655 | // Create the line (google.maps.Polyline) |
| ... | ... | @@ -630,29 +659,36 @@ i3GEO.analise = { |
| 630 | 659 | strokeColor: estilo.linecolor, |
| 631 | 660 | strokeOpacity: 1, |
| 632 | 661 | strokeWeight: estilo.linewidth, |
| 633 | - path:pontos.mvcLine | |
| 662 | + path:pontos.mvcLine, | |
| 663 | + origem: "medeDistancia" | |
| 634 | 664 | }); |
| 635 | 665 | } |
| 636 | 666 | pontos.mvcLine.pop(); |
| 637 | 667 | pontos.mvcLine.push(evt.latLng); |
| 668 | + parcial = i3GEO.analise.medeDistancia.googlemaps.somaDist(pontos); | |
| 669 | + x1 = pontos.xpt[n-1]; | |
| 670 | + y1 = pontos.ypt[n-1]; | |
| 671 | + x2 = evt.latLng.lng(); | |
| 672 | + y2 = evt.latLng.lat(); | |
| 673 | + //raio = google.maps.geometry.spherical.computeDistanceBetween(evt.latLng,new google.maps.LatLng(y1,x1)) | |
| 674 | + trecho = i3GEO.calculo.distancia(x1,y1,x2,y2); | |
| 675 | + direcao = i3GEO.calculo.direcao(x1,y1,x2,y2); | |
| 676 | + i3GEO.analise.medeDistancia.googlemaps.mostraParcial(trecho,parcial,direcao); | |
| 638 | 677 | } |
| 639 | 678 | }); |
| 640 | - i3GEO.analise.medeDistancia.googlemaps.dblclick = google.maps.event.addListener(i3GeoMap, "dblclick", function(evt) { | |
| 641 | - //google.maps.event.removeListener(i3GEO.analise.medeDistancia.googlemaps.evtclick); | |
| 642 | - //google.maps.event.removeListener(i3GEO.analise.medeDistancia.googlemaps.evtmousemove); | |
| 643 | - i3GEO.analise.medeDistancia.googlemaps.inicia(); | |
| 679 | + evtdblclick = google.maps.event.addListener(i3GeoMap, "dblclick", function(evt) { | |
| 680 | + termina.call(); | |
| 644 | 681 | }); |
| 645 | - | |
| 646 | 682 | }, |
| 647 | 683 | /** |
| 648 | 684 | * Soma os valores de distancia guardados em pontos.dist |
| 649 | 685 | */ |
| 650 | - somaDist: function(){ | |
| 686 | + somaDist: function(pontos){ | |
| 651 | 687 | var n,i, |
| 652 | 688 | total = 0; |
| 653 | - n = i3GEO.analise.medeDistancia.pontos.dist.length; | |
| 689 | + n = pontos.dist.length; | |
| 654 | 690 | for(i=0;i<n;i++){ |
| 655 | - total += i3GEO.analise.medeDistancia.pontos.dist[i]; | |
| 691 | + total += pontos.dist[i]; | |
| 656 | 692 | } |
| 657 | 693 | return total; |
| 658 | 694 | }, |
| ... | ... | @@ -663,31 +699,19 @@ i3GEO.analise = { |
| 663 | 699 | * Os raios e pontos sao sempre removidos |
| 664 | 700 | */ |
| 665 | 701 | fechaJanela: function(){ |
| 666 | - //google.maps.event.removeListener(i3GEO.analise.medeDistancia.googlemaps.evtclick); | |
| 667 | - //google.maps.event.removeListener(i3GEO.analise.medeDistancia.googlemaps.evtmousemove); | |
| 668 | - //google.maps.event.removeListener(i3GEO.analise.medeDistancia.googlemaps.dblclick); | |
| 669 | 702 | i3GeoMap.setOptions({disableDoubleClickZoom:false}); |
| 670 | - i3GeoMap.setOptions({draggableCursor:""}); | |
| 671 | - /* | |
| 672 | - var temp, | |
| 673 | - controle = i3geoOL.getControlsBy("id","i3GeoMedeDistancia"), | |
| 674 | - f = i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem","medeDistancia"); | |
| 675 | - | |
| 676 | - if(controle.length > 0){ | |
| 677 | - controle[0].deactivate(); | |
| 678 | - i3geoOL.removeControl(controle[0]); | |
| 679 | - } | |
| 703 | + i3GeoMap.setOptions({draggableCursor:undefined}); | |
| 704 | + var f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem","medeDistancia"); | |
| 680 | 705 | if(f && f.length > 0){ |
| 681 | 706 | temp = window.confirm($trad("x94")); |
| 682 | 707 | if(temp){ |
| 683 | - i3GEO.desenho.layergrafico.destroyFeatures(f); | |
| 708 | + i3GEO.desenho.googlemaps.destroyFeatures(f); | |
| 684 | 709 | } |
| 685 | 710 | } |
| 686 | - f = i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem","medeDistanciaExcluir"); | |
| 711 | + f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem","medeDistanciaExcluir"); | |
| 687 | 712 | if(f && f.length > 0){ |
| 688 | - i3GEO.desenho.layergrafico.destroyFeatures(f); | |
| 713 | + i3GEO.desenho.googlemaps.destroyFeatures(f); | |
| 689 | 714 | } |
| 690 | - */ | |
| 691 | 715 | }, |
| 692 | 716 | /** |
| 693 | 717 | * Mostra a totalizacao das linhas ja digitalizadas |
| ... | ... | @@ -937,7 +961,7 @@ i3GEO.analise = { |
| 937 | 961 | var janela; |
| 938 | 962 | i3GEO.eventos.cliquePerm.ativa(); |
| 939 | 963 | //@TODO remover |
| 940 | - if(i3GEO.Interface.ATUAL !== "openlayers"){ | |
| 964 | + if(i3GEO.Interface.ATUAL == "googleearth"){ | |
| 941 | 965 | i3GEO.desenho.richdraw.fecha(); |
| 942 | 966 | i3GEO.util.removeChild("pontosArea",document.body); |
| 943 | 967 | i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()"); |
| ... | ... | @@ -1186,45 +1210,177 @@ i3GEO.analise = { |
| 1186 | 1210 | } |
| 1187 | 1211 | }, |
| 1188 | 1212 | googlemaps: { |
| 1213 | + /** | |
| 1214 | + * Inicializa o processo | |
| 1215 | + * Cria a variavel para guardar os pontos | |
| 1216 | + * Executa a funcao de inicializacao do desenho, que cria o layer para receber os graficos | |
| 1217 | + */ | |
| 1189 | 1218 | inicia: function(){ |
| 1190 | - var x,y,ll1,ll2,d, | |
| 1191 | - calculo = i3GEO.calculo, | |
| 1192 | - montacontainer = function(){ | |
| 1193 | - var desenho = i3GEO.desenho; | |
| 1194 | - $i("mostraarea_calculo").innerHTML = "Clique no mapa para desenhar o poligono. Clique duas vezes para concluir"; | |
| 1195 | - i3GEO.barraDeBotoes.ativaIcone("area"); | |
| 1196 | - g_tipoacao = "area"; | |
| 1197 | - desenho.criaContainerRichdraw(); | |
| 1198 | - desenho.richdraw.lineColor = "green"; | |
| 1199 | - desenho.richdraw.lineWidth = "2px"; | |
| 1200 | - }; | |
| 1201 | - i3GEO.analise.medeArea.criaJanela(); | |
| 1202 | - if (g_tipoacao !== "area"){ | |
| 1203 | - $i("mostraarea_calculo").innerHTML = ""; | |
| 1204 | - if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()") < 0) | |
| 1205 | - {i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()");} | |
| 1206 | - if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()") < 0) | |
| 1207 | - {i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()");} | |
| 1208 | - if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()") < 0) | |
| 1209 | - {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()");} | |
| 1210 | - // | |
| 1211 | - //a API do Openlayers e GoogleMaps tem uma funcao propria de obtencao da resolucao de cada pixel | |
| 1212 | - //essa funcao e embutida em i3GEO.calculo.tela2dd | |
| 1213 | - // | |
| 1214 | - if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){ | |
| 1215 | - x = parseInt(i3GEO.parametros.w / 2,10); | |
| 1216 | - y = parseInt(i3GEO.parametros.h / 2,10); | |
| 1217 | - ll1 = calculo.tela2dd(x,y,"",""); | |
| 1218 | - ll2 = calculo.tela2dd(x + 1,y,"",""); | |
| 1219 | - d = calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]); | |
| 1220 | - d = d * 1000; | |
| 1221 | - g_areapixel = d * d; | |
| 1222 | - g_areapixel < 0 ? i3GEO.janela.tempoMsg("Nao e possivel calcular a area. Entre em contato com o administrador do sistema.") : montacontainer(); | |
| 1219 | + if(!google.maps.geometry){ | |
| 1220 | + alert($trad("x99")); | |
| 1221 | + return; | |
| 1222 | + } | |
| 1223 | + i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); | |
| 1224 | + i3GeoMap.setOptions({disableDoubleClickZoom:true}); | |
| 1225 | + i3GeoMap.setOptions({draggableCursor:'crosshair'}); | |
| 1226 | + var evtdblclick = null,evtclick = null,evtmousemove = null, | |
| 1227 | + pontos = { | |
| 1228 | + xpt: [], | |
| 1229 | + ypt: [], | |
| 1230 | + dist: [], | |
| 1231 | + mvcLine: new google.maps.MVCArray(), | |
| 1232 | + mvcMarkers: new google.maps.MVCArray(), | |
| 1233 | + line: null, | |
| 1234 | + polygon: null | |
| 1235 | + }, | |
| 1236 | + termina = function(){ | |
| 1237 | + google.maps.event.removeListener(evtdblclick); | |
| 1238 | + google.maps.event.removeListener(evtclick); | |
| 1239 | + google.maps.event.removeListener(evtmousemove); | |
| 1240 | + pontos.line.setOptions({clickable: true}); | |
| 1241 | + google.maps.event.addListener(pontos.line, 'click', function(shape) { | |
| 1242 | + if(shape.setEditable){ | |
| 1243 | + shape.setEditable(!shape.editable); | |
| 1244 | + } | |
| 1245 | + }); | |
| 1246 | + if(pontos){ | |
| 1247 | + i3GEO.desenho.googlemaps.shapes.push(pontos.mvcLine); | |
| 1248 | + i3GEO.desenho.googlemaps.shapes.push(pontos.line); | |
| 1249 | + pontos = null; | |
| 1250 | + } | |
| 1251 | + }; | |
| 1252 | + evtclick = google.maps.event.addListener(i3GeoMap, "click", function(evt) { | |
| 1253 | + var area=0,per; | |
| 1254 | + // When the map is clicked, pass the LatLng obect to the measureAdd function | |
| 1255 | + pontos.mvcLine.push(evt.latLng); | |
| 1256 | + pontos.xpt.push(evt.latLng.lng()); | |
| 1257 | + pontos.ypt.push(evt.latLng.lat()); | |
| 1258 | + //desenha um circulo | |
| 1259 | + if (pontos.mvcLine.getLength() > 0) { | |
| 1260 | + per = google.maps.geometry.spherical.computeLength(pontos.mvcLine); | |
| 1261 | + area = google.maps.geometry.spherical.computeArea(pontos.mvcLine); | |
| 1262 | + i3GEO.analise.medeArea.googlemaps.mostraTotal(per,area); | |
| 1263 | + } | |
| 1264 | + //desenha uma marca no ponto | |
| 1265 | + i3GEO.desenho.googlemaps.shapes.push( | |
| 1266 | + new google.maps.Marker({ | |
| 1267 | + map: i3GeoMap, | |
| 1268 | + fillOpacity: 0, | |
| 1269 | + clickable: false, | |
| 1270 | + position:evt.latLng, | |
| 1271 | + icon: { | |
| 1272 | + path: google.maps.SymbolPath.CIRCLE, | |
| 1273 | + scale: 2.5, | |
| 1274 | + strokeColor: "#ffffff" | |
| 1275 | + }, | |
| 1276 | + origem: "medeAreaExcluir" | |
| 1277 | + }) | |
| 1278 | + ); | |
| 1279 | + //mais um ponto para criar uma linha movel | |
| 1280 | + pontos.mvcLine.push(evt.latLng); | |
| 1281 | + }); | |
| 1282 | + evtmousemove = google.maps.event.addListener(i3GeoMap, "mousemove", function(evt) { | |
| 1283 | + if(!$i("mostraarea_calculo")){ | |
| 1284 | + termina.call(); | |
| 1285 | + return; | |
| 1223 | 1286 | } |
| 1287 | + var x1,y1,x2,y2,direcao,per,area, | |
| 1288 | + estilo = i3GEO.desenho.estilos[i3GEO.desenho.estiloPadrao], | |
| 1289 | + n = pontos.xpt.length; | |
| 1290 | + | |
| 1291 | + // If there is more than one vertex on the line | |
| 1292 | + if (pontos.mvcLine.getLength() > 0) { | |
| 1293 | + // If the line hasn't been created yet | |
| 1294 | + if (!pontos.line) { | |
| 1295 | + // Create the line (google.maps.Polyline) | |
| 1296 | + pontos.line = new google.maps.Polygon({ | |
| 1297 | + map: i3GeoMap, | |
| 1298 | + clickable: false, | |
| 1299 | + strokeColor: estilo.linecolor, | |
| 1300 | + strokeOpacity: 1, | |
| 1301 | + strokeWeight: estilo.linewidth, | |
| 1302 | + path:pontos.mvcLine, | |
| 1303 | + origem: "medeArea" | |
| 1304 | + }); | |
| 1305 | + } | |
| 1306 | + pontos.mvcLine.pop(); | |
| 1307 | + pontos.mvcLine.push(evt.latLng); | |
| 1308 | + per = google.maps.geometry.spherical.computeLength(pontos.mvcLine); | |
| 1309 | + x1 = pontos.xpt[n-1]; | |
| 1310 | + y1 = pontos.ypt[n-1]; | |
| 1311 | + x2 = evt.latLng.lng(); | |
| 1312 | + y2 = evt.latLng.lat(); | |
| 1313 | + trecho = i3GEO.calculo.distancia(x1,y1,x2,y2); | |
| 1314 | + direcao = i3GEO.calculo.direcao(x1,y1,x2,y2); | |
| 1315 | + area = google.maps.geometry.spherical.computeArea(pontos.mvcLine); | |
| 1316 | + i3GEO.analise.medeArea.googlemaps.mostraParcial(trecho,per,area,direcao); | |
| 1317 | + } | |
| 1318 | + }); | |
| 1319 | + evtdblclick = google.maps.event.addListener(i3GeoMap, "dblclick", function(evt) { | |
| 1320 | + termina.call(); | |
| 1321 | + }); | |
| 1322 | + }, | |
| 1323 | + /** | |
| 1324 | + * Soma os valores de distancia guardados em pontos.dist | |
| 1325 | + */ | |
| 1326 | + somaDist: function(pontos){ | |
| 1327 | + var n,i, | |
| 1328 | + total = 0; | |
| 1329 | + n = pontos.dist.length; | |
| 1330 | + for(i=0;i<n;i++){ | |
| 1331 | + total += pontos.dist[i]; | |
| 1224 | 1332 | } |
| 1225 | - else{i3GEO.desenho.richdraw.fecha();} | |
| 1333 | + return total; | |
| 1226 | 1334 | }, |
| 1335 | + /** | |
| 1336 | + * Fecha a janela que mostra os dados | |
| 1337 | + * Pergunta ao usuario se os graficos devem ser removidos | |
| 1338 | + * Os graficos sao marcados com o atributo "origem" | |
| 1339 | + * Os raios e pontos sao sempre removidos | |
| 1340 | + */ | |
| 1227 | 1341 | fechaJanela: function(){ |
| 1342 | + i3GeoMap.setOptions({disableDoubleClickZoom:false}); | |
| 1343 | + i3GeoMap.setOptions({draggableCursor:undefined}); | |
| 1344 | + var f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem","medeArea"); | |
| 1345 | + if(f && f.length > 0){ | |
| 1346 | + temp = window.confirm($trad("x94")); | |
| 1347 | + if(temp){ | |
| 1348 | + i3GEO.desenho.googlemaps.destroyFeatures(f); | |
| 1349 | + } | |
| 1350 | + } | |
| 1351 | + f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem","medeAreaExcluir"); | |
| 1352 | + if(f && f.length > 0){ | |
| 1353 | + i3GEO.desenho.googlemaps.destroyFeatures(f); | |
| 1354 | + } | |
| 1355 | + }, | |
| 1356 | + /** | |
| 1357 | + * Mostra a totalizacao das linhas ja digitalizadas | |
| 1358 | + */ | |
| 1359 | + mostraTotal: function(per,area){ | |
| 1360 | + var mostra = $i("mostraarea_calculo"), | |
| 1361 | + texto; | |
| 1362 | + if (mostra){ | |
| 1363 | + texto = "<b>"+$trad("d21at")+":</b> "+(area/1000000).toFixed(3)+" km2"+ | |
| 1364 | + "<br><b>"+$trad("d21at")+":</b> "+(area/10000).toFixed(2)+" ha"+ | |
| 1365 | + "<br><b>"+$trad("x98")+":</b> "+(per).toFixed(2)+" km"+ | |
| 1366 | + "<br>"+$trad("x25")+": "+i3GEO.calculo.metododistancia; | |
| 1367 | + mostra.innerHTML = texto; | |
| 1368 | + } | |
| 1369 | + }, | |
| 1370 | + /** | |
| 1371 | + * Mostra o valor do trecho entre o ultimo ponto clicado e a posicao do mouse | |
| 1372 | + */ | |
| 1373 | + mostraParcial: function(trecho,per,area,direcao){ | |
| 1374 | + var mostra = $i("mostraarea_calculo_parcial"), | |
| 1375 | + texto; | |
| 1376 | + if (mostra){ | |
| 1377 | + texto = "<b>"+$trad("d21at")+":</b> "+(area/1000000).toFixed(3)+" km2"+ | |
| 1378 | + "<br><b>"+$trad("d21at")+":</b> "+(area/10000).toFixed(2)+" ha"+ | |
| 1379 | + "<br><b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+ | |
| 1380 | + "<br><b>"+$trad("x98")+":</b> "+(per).toFixed(3)+" km" + | |
| 1381 | + "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao.toFixed(4); | |
| 1382 | + mostra.innerHTML = texto; | |
| 1383 | + } | |
| 1228 | 1384 | } |
| 1229 | 1385 | }, |
| 1230 | 1386 | googleearth: { | ... | ... |
classesjs/classe_calculo.js
classesjs/classe_desenho.js
| ... | ... | @@ -214,7 +214,31 @@ i3GEO.desenho = { |
| 214 | 214 | } |
| 215 | 215 | }, |
| 216 | 216 | googlemaps: { |
| 217 | + /** | |
| 218 | + * Array que guarda todos os objetos que estao atualmente no mapa | |
| 219 | + * E atualizado toda vez que uma figura e acrescentada ou removida | |
| 220 | + */ | |
| 221 | + shapes: [], | |
| 217 | 222 | inicia: function(){ |
| 223 | + }, | |
| 224 | + getFeaturesByAttribute: function(atributo,valor){ | |
| 225 | + var i,s = [], | |
| 226 | + n = i3GEO.desenho.googlemaps.shapes.length; | |
| 227 | + for(i=0;i<n;i++){ | |
| 228 | + if(i3GEO.desenho.googlemaps.shapes[i] && i3GEO.desenho.googlemaps.shapes[i] != ""){ | |
| 229 | + if(i3GEO.desenho.googlemaps.shapes[i][atributo] == valor){ | |
| 230 | + s.push(i3GEO.desenho.googlemaps.shapes[i]); | |
| 231 | + } | |
| 232 | + } | |
| 233 | + } | |
| 234 | + return s; | |
| 235 | + }, | |
| 236 | + destroyFeatures: function(f){ | |
| 237 | + var i,n = f.length; | |
| 238 | + for(i=0;i<n;i++){ | |
| 239 | + f[i].setMap(null); | |
| 240 | + f[i] = ""; | |
| 241 | + } | |
| 218 | 242 | } |
| 219 | 243 | }, |
| 220 | 244 | /* | ... | ... |
classesjs/classe_editorgm.js
| ... | ... | @@ -63,11 +63,6 @@ i3GEO.editorGM = { |
| 63 | 63 | drawingManager: "", |
| 64 | 64 | selectedShape: null, |
| 65 | 65 | /** |
| 66 | - * Array que guarda todos os objetos que estao atualmente no mapa | |
| 67 | - * E atualizado toda vez que uma figura e acrescentada ou removida | |
| 68 | - */ | |
| 69 | - shapes: [], | |
| 70 | - /** | |
| 71 | 66 | * guarda o mapeamento entre o codigo da regiao e o codigo do layer adicionado ao mapa |
| 72 | 67 | */ |
| 73 | 68 | regioestemas:{}, |
| ... | ... | @@ -159,7 +154,7 @@ i3GEO.editorGM = { |
| 159 | 154 | i3GEO.editorGM.setSelection(newShape); |
| 160 | 155 | }); |
| 161 | 156 | i3GEO.editorGM.setSelection(newShape); |
| 162 | - i3GEO.editorGM.shapes.push(newShape); | |
| 157 | + i3GEO.desenho.googlemaps.shapes.push(newShape); | |
| 163 | 158 | //} |
| 164 | 159 | }); |
| 165 | 160 | google.maps.event.addListener( |
| ... | ... | @@ -230,35 +225,37 @@ i3GEO.editorGM = { |
| 230 | 225 | }, |
| 231 | 226 | /** |
| 232 | 227 | * Marca todas as figuras como nao selecionadas |
| 233 | - * As figuras existentes no mapa sao mantidas na variavel i3GEO.editorGM.shapes | |
| 228 | + * As figuras existentes no mapa sao mantidas na variavel i3GEO.desenho.googlemaps.shapes | |
| 234 | 229 | */ |
| 235 | 230 | clearSelection: function(){ |
| 236 | 231 | var i, |
| 237 | - n = i3GEO.editorGM.shapes.length; | |
| 232 | + n = i3GEO.desenho.googlemaps.shapes.length; | |
| 238 | 233 | for(i=0;i<n;i++){ |
| 239 | - if(i3GEO.editorGM.shapes[i] != "" && i3GEO.editorGM.shapes[i].setEditable){ | |
| 240 | - i3GEO.editorGM.shapes[i].setEditable(false); | |
| 234 | + if(i3GEO.desenho.googlemaps.shapes[i] != "" && i3GEO.desenho.googlemaps.shapes[i].setEditable){ | |
| 235 | + i3GEO.desenho.googlemaps.shapes[i].setEditable(false); | |
| 241 | 236 | } |
| 242 | - else if(i3GEO.editorGM.shapes[i] != ""){//caso for ponto | |
| 243 | - i3GEO.editorGM.shapes[i].editable = false; | |
| 244 | - i3GEO.editorGM.shapes[i].setIcon({url: i3GEO.editorGM.iconePonto(false)}); | |
| 237 | + else if(i3GEO.desenho.googlemaps.shapes[i] != ""){//caso for ponto | |
| 238 | + i3GEO.desenho.googlemaps.shapes[i].editable = false; | |
| 239 | + if(i3GEO.desenho.googlemaps.shapes[i].setIcon){ | |
| 240 | + i3GEO.desenho.googlemaps.shapes[i].setIcon({url: i3GEO.editorGM.iconePonto(false)}); | |
| 241 | + } | |
| 245 | 242 | } |
| 246 | 243 | } |
| 247 | 244 | }, |
| 248 | 245 | /** |
| 249 | 246 | * Marca todas as figuras como selecionadas |
| 250 | - * As figuras existentes no mapa sao mantidas na variavel i3GEO.editorGM.shapes | |
| 247 | + * As figuras existentes no mapa sao mantidas na variavel i3GEO.desenho.googlemaps.shapes | |
| 251 | 248 | */ |
| 252 | 249 | selectAll: function(){ |
| 253 | 250 | var i, |
| 254 | - n = i3GEO.editorGM.shapes.length; | |
| 251 | + n = i3GEO.desenho.googlemaps.shapes.length; | |
| 255 | 252 | for(i=0;i<n;i++){ |
| 256 | - if(i3GEO.editorGM.shapes[i] != "" && i3GEO.editorGM.shapes[i].setEditable){ | |
| 257 | - i3GEO.editorGM.shapes[i].setEditable(true); | |
| 253 | + if(i3GEO.desenho.googlemaps.shapes[i] != "" && i3GEO.desenho.googlemaps.shapes[i].setEditable){ | |
| 254 | + i3GEO.desenho.googlemaps.shapes[i].setEditable(true); | |
| 258 | 255 | } |
| 259 | - else if(i3GEO.editorGM.shapes[i] != ""){//caso for ponto | |
| 260 | - i3GEO.editorGM.shapes[i].editable = true; | |
| 261 | - i3GEO.editorGM.shapes[i].setIcon({url: i3GEO.editorGM.iconePonto(true)}); | |
| 256 | + else if(i3GEO.desenho.googlemaps.shapes[i] != ""){//caso for ponto | |
| 257 | + i3GEO.desenho.googlemaps.shapes[i].editable = true; | |
| 258 | + i3GEO.desenho.googlemaps.shapes[i].setIcon({url: i3GEO.editorGM.iconePonto(true)}); | |
| 262 | 259 | } |
| 263 | 260 | } |
| 264 | 261 | }, |
| ... | ... | @@ -271,7 +268,7 @@ i3GEO.editorGM = { |
| 271 | 268 | naoconfirma = false; |
| 272 | 269 | } |
| 273 | 270 | var i, |
| 274 | - n = i3GEO.editorGM.shapes.length; | |
| 271 | + n = i3GEO.desenho.googlemaps.shapes.length; | |
| 275 | 272 | if(n > 0){ |
| 276 | 273 | if(naoconfirma === false){ |
| 277 | 274 | var x = window.confirm("Remove as figuras selecionadas?"); |
| ... | ... | @@ -281,15 +278,9 @@ i3GEO.editorGM = { |
| 281 | 278 | } |
| 282 | 279 | if(x){ |
| 283 | 280 | for(i=0;i<n;i++){ |
| 284 | - if(i3GEO.editorGM.shapes[i] != "" && i3GEO.editorGM.shapes[i].editable && i3GEO.editorGM.shapes[i].editable === true){ | |
| 285 | - i3GEO.editorGM.shapes[i].setMap(null); | |
| 286 | - i3GEO.editorGM.shapes[i] = ""; | |
| 287 | - } | |
| 288 | - else{ //caso for ponto | |
| 289 | - if(i3GEO.editorGM.shapes[i] != ""){ | |
| 290 | - i3GEO.editorGM.shapes[i].setMap(null); | |
| 291 | - i3GEO.editorGM.shapes[i] = ""; | |
| 292 | - } | |
| 281 | + if(i3GEO.desenho.googlemaps.shapes[i] != "" && i3GEO.desenho.googlemaps.shapes[i].editable && i3GEO.desenho.googlemaps.shapes[i].editable === true){ | |
| 282 | + i3GEO.desenho.googlemaps.shapes[i].setMap(null); | |
| 283 | + i3GEO.desenho.googlemaps.shapes[i] = ""; | |
| 293 | 284 | } |
| 294 | 285 | } |
| 295 | 286 | } |
| ... | ... | @@ -304,10 +295,10 @@ i3GEO.editorGM = { |
| 304 | 295 | */ |
| 305 | 296 | selectedShapes: function() { |
| 306 | 297 | var i,s = [], |
| 307 | - n = i3GEO.editorGM.shapes.length; | |
| 298 | + n = i3GEO.desenho.googlemaps.shapes.length; | |
| 308 | 299 | for(i=0;i<n;i++){ |
| 309 | - if(i3GEO.editorGM.shapes[i] != "" && i3GEO.editorGM.shapes[i].editable === true){ | |
| 310 | - s.push(i3GEO.editorGM.shapes[i]); | |
| 300 | + if(i3GEO.desenho.googlemaps.shapes[i] != "" && i3GEO.desenho.googlemaps.shapes[i].editable === true){ | |
| 301 | + s.push(i3GEO.desenho.googlemaps.shapes[i]); | |
| 311 | 302 | } |
| 312 | 303 | } |
| 313 | 304 | return s; |
| ... | ... | @@ -319,17 +310,17 @@ i3GEO.editorGM = { |
| 319 | 310 | getCoordenadas: function(){ |
| 320 | 311 | var coordenadas = [], |
| 321 | 312 | lista = [], |
| 322 | - n = i3GEO.editorGM.shapes.length, | |
| 313 | + n = i3GEO.desenho.googlemaps.shapes.length, | |
| 323 | 314 | tipo = "", |
| 324 | 315 | ps,nps,j,p,i,r = {}; |
| 325 | 316 | |
| 326 | 317 | for(i=0;i<n;i++){ |
| 327 | 318 | coordenadas = []; |
| 328 | - if(i3GEO.editorGM.shapes[i] != "" && i3GEO.editorGM.shapes[i].editable === true){ | |
| 319 | + if(i3GEO.desenho.googlemaps.shapes[i] != "" && i3GEO.desenho.googlemaps.shapes[i].editable === true){ | |
| 329 | 320 | if(tipo == ""){ |
| 330 | - tipo = i3GEO.editorGM.shapes[i].type; | |
| 321 | + tipo = i3GEO.desenho.googlemaps.shapes[i].type; | |
| 331 | 322 | } |
| 332 | - ps = i3GEO.editorGM.shapes[i].getPath(); | |
| 323 | + ps = i3GEO.desenho.googlemaps.shapes[i].getPath(); | |
| 333 | 324 | nps = ps.getLength(); |
| 334 | 325 | for(j=0;j<nps;j++){ |
| 335 | 326 | p = ps.getAt(j); |
| ... | ... | @@ -427,7 +418,7 @@ i3GEO.editorGM = { |
| 427 | 418 | } |
| 428 | 419 | obj = WicketWkt.toObject(i3GeoMap.defaults); |
| 429 | 420 | //obj.setMap(i3GeoMap); // Add it to the map |
| 430 | - //i3GEO.editorGM.shapes.push(obj); | |
| 421 | + //i3GEO.desenho.googlemaps.shapes.push(obj); | |
| 431 | 422 | i3GEO.editorGM.adicionaPoligonos(obj,tema,colunaid,valorid,colunanome,valornome); |
| 432 | 423 | i3GEO.eventos.MOUSECLIQUE = []; |
| 433 | 424 | }; |
| ... | ... | @@ -595,7 +586,7 @@ i3GEO.editorGM = { |
| 595 | 586 | google.maps.event.addListener(pol, 'click', function() { |
| 596 | 587 | i3GEO.editorGM.setSelection(pol); |
| 597 | 588 | }); |
| 598 | - i3GEO.editorGM.shapes.push(pol); | |
| 589 | + i3GEO.desenho.googlemaps.shapes.push(pol); | |
| 599 | 590 | } |
| 600 | 591 | } |
| 601 | 592 | return; |
| ... | ... | @@ -619,12 +610,12 @@ i3GEO.editorGM = { |
| 619 | 610 | google.maps.event.addListener(pol, 'click', function() { |
| 620 | 611 | i3GEO.editorGM.setSelection(pol); |
| 621 | 612 | }); |
| 622 | - i3GEO.editorGM.shapes.push(pol); | |
| 613 | + i3GEO.desenho.googlemaps.shapes.push(pol); | |
| 623 | 614 | return; |
| 624 | 615 | } |
| 625 | 616 | if (obj.type === 'marker'){ |
| 626 | 617 | i3GEO.editorGM.selectAll(); |
| 627 | - if(i3GEO.editorGM.shapes.length > 0){ | |
| 618 | + if(i3GEO.desenho.googlemaps.shapes.length > 0){ | |
| 628 | 619 | i3GEO.editorGM.deleteSelectedShape(true); |
| 629 | 620 | } |
| 630 | 621 | pol = new google.maps.Marker({ |
| ... | ... | @@ -646,7 +637,7 @@ i3GEO.editorGM = { |
| 646 | 637 | google.maps.event.addListener(pol, 'click', function() { |
| 647 | 638 | i3GEO.editorGM.setSelection(pol); |
| 648 | 639 | }); |
| 649 | - i3GEO.editorGM.shapes.push(pol); | |
| 640 | + i3GEO.desenho.googlemaps.shapes.push(pol); | |
| 650 | 641 | return; |
| 651 | 642 | } |
| 652 | 643 | }, | ... | ... |
classesjs/dicionario.js
| ... | ... | @@ -2228,6 +2228,13 @@ pt:"per&iacute;metro", |
| 2228 | 2228 | en:"", |
| 2229 | 2229 | es:"", |
| 2230 | 2230 | it:"" |
| 2231 | +}], | |
| 2232 | +"x99":[ | |
| 2233 | +{ | |
| 2234 | +pt:"Cálculo não pode ser realizado. Falta carregar a API de geometria do GM", | |
| 2235 | +en:"", | |
| 2236 | +es:"", | |
| 2237 | +it:"" | |
| 2231 | 2238 | }] |
| 2232 | 2239 | }; |
| 2233 | 2240 | //YAHOO.log("carregou dicionario", "Classes i3geo"); | ... | ... |
guia_de_migracao.txt
| ... | ... | @@ -3,6 +3,9 @@ GUIA DE UPDATES e UPGRADES |
| 3 | 3 | ------------------------------------------------------------------------------------------------- |
| 4 | 4 | Para a versão 6.0 |
| 5 | 5 | |
| 6 | +- nas interfaces que utilizam a API do google maps agora é necessário carregar a biblioteca geometry com o seguinte código: | |
| 7 | +<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing,geometry"></script> | |
| 8 | + | |
| 6 | 9 | - os links para a árvore hiperbólica foram removidos. |
| 7 | 10 | |
| 8 | 11 | - a biblioteca pacotes/wicket/wicket.js agora é carregada com i3geo.js | ... | ... |
interface/black_gm.phtml
| ... | ... | @@ -103,7 +103,7 @@ include_once("../ms_configura.php"); |
| 103 | 103 | </div> |
| 104 | 104 | </div> |
| 105 | 105 | |
| 106 | - <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing"></script> | |
| 106 | + <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing,geometry"></script> | |
| 107 | 107 | <script type="text/javascript" src="../classesjs/i3geo6.js"></script> |
| 108 | 108 | <link rel="stylesheet" type="text/css" href="../css/black.css"> |
| 109 | 109 | <script type="text/javascript"> | ... | ... |
interface/googlemaps_noite.phtml
| ... | ... | @@ -105,7 +105,7 @@ include_once("../ms_configura.php"); |
| 105 | 105 | </div> |
| 106 | 106 | </div> |
| 107 | 107 | |
| 108 | -<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
| 108 | +<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing,geometry"></script> | |
| 109 | 109 | <script type="text/javascript" src="../classesjs/i3geo6.js"></script> |
| 110 | 110 | <script type="text/javascript"> |
| 111 | 111 | /* | ... | ... |
interface/googlemapsdebug.phtml
| 1 | -<?php | |
| 2 | -//@TODO atualizar a interface para black | |
| 3 | -include_once("../ms_configura.php"); | |
| 4 | -?> | |
| 5 | -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
| 6 | -<html> | |
| 7 | -<head> | |
| 8 | -<meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile"> | |
| 9 | -<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | |
| 10 | -<title>i3GEO - Google Maps</title> | |
| 11 | - | |
| 12 | -</head> | |
| 13 | -<body id="i3geo" style="background-color:white"> | |
| 14 | -<!-- inclui o nome do usuario logado --> | |
| 15 | -<div id="i3GEONomeLogin" style="position:absolute;left:10px;top:12px;font-size:11px;z-index:50000"></div> | |
| 16 | -<table id='mst' summary="" style='display:none;' width=100% cellspacing='0'> | |
| 17 | - <tr style="border:0px"> | |
| 18 | - <td id="barraSuperior" style="background-image:url('../imagens/visual/default/cabeca.png');height:10px"></td> | |
| 19 | - </tr> | |
| 20 | - <tr> | |
| 21 | - <td id="contemMenu" style="text-align:right;border-width:0pt 0pt 1px;border-color:rgb(240,240,240)"> | |
| 22 | - <!--menu suspenso--> | |
| 23 | - <div id="menus" ></div> | |
| 24 | - </td> | |
| 25 | - </tr> | |
| 26 | - <tr> | |
| 27 | - <td style="vertical-align:top;border-width:0px;"> | |
| 28 | - <table width="100%" style="vertical-align:top;border-width:0px"> | |
| 29 | - <tr> | |
| 30 | - <td class=verdeclaro id=contemImg > | |
| 31 | - <div id=googlemapsdiv style="position:relative;background-image:url('../imagens/i3geo1bw.jpg');"></div> | |
| 32 | - </td> | |
| 33 | - </tr> | |
| 34 | - </table> | |
| 35 | - </td> | |
| 36 | - </tr> | |
| 37 | - <tr> | |
| 38 | - <td> | |
| 39 | - <table width=100% > | |
| 40 | - <tr> | |
| 41 | - <td class=tdbranca > | |
| 42 | - <!-- | |
| 43 | - Nesse div são incluídos os ícones que permitem ao usuário modificar o visual de cores dos ícones | |
| 44 | - <div id=visual ></div> | |
| 45 | - --> | |
| 46 | - <!-- botão de compartilhamento em redes sociais --> | |
| 47 | - <div id=i3GEOcompartilhar style="text-align:left;border-top:1px solid rgb(250,250,250);padding-top:1px" ></div> | |
| 48 | - <!-- aqui será incluído o contador de tempo quando o temporizador de redesenho do mapa estiver ativo --> | |
| 49 | - <div id=tempoRedesenho style=z-index:100;position:absolute;top:0px;color:green;background-color:black;width:50px;display:none ></div> | |
| 50 | - </td> | |
| 51 | - <td class=tdbranca > | |
| 52 | - <!-- aqui será incluída a escala numérica --> | |
| 53 | - <div id=escala style="text-align:right;" ></div> | |
| 54 | - </td> | |
| 55 | - <td class=tdbranca > | |
| 56 | - <!-- aqui será incluído o gadget que mostra a coordenada geográfica da posição do mouse --> | |
| 57 | - <div id=localizarxy style="text-align:left;font-size:10px;display:inline-table"></div> | |
| 58 | - </td> | |
| 59 | - <!-- aqui serão incluídas as bandeiras que permitem a troca de idioma --> | |
| 60 | - <td class=tdbranca > | |
| 61 | - <div id=seletorIdiomas ></div> | |
| 62 | - </td> | |
| 63 | - </tr> | |
| 64 | - </table> | |
| 65 | - </td> | |
| 66 | - </tr> | |
| 67 | - <tr style="border:0px"> | |
| 68 | - <td id="barraInferior" style="background-image:url('../imagens/visual/default/rodape.png');height:10px"></td> | |
| 69 | - </tr> | |
| 70 | -</table> | |
| 71 | -<table id="i3GEOlogoMarca" style='margin: 0px auto;box-shadow:0 1px 13px gray;border-radius:5px;'> | |
| 72 | - <tr> | |
| 73 | - <td><div id=versaoi3geo ></div><h2 style="font-size:10px;font-family: Verdana, Arial, Helvetica, sans-serif;">i3Geo - Software livre para criação de mapas interativos e geoprocessamento</h2><h3 style="font-size:10px;font-family: Verdana, Arial, Helvetica, sans-serif;">Baseado no Mapserver, é licenciado sob GPL e integra o Portal do Software Público Brasileiro</h3></td> | |
| 74 | - </tr> | |
| 75 | - <tr> | |
| 76 | - <td style="padding:10px;"><img style="width:560px;height:81px" alt="" src='../imagens/logo_inicio.png' ></td> | |
| 77 | - </tr> | |
| 78 | - <tr> | |
| 79 | - <td> | |
| 80 | - <!-- | |
| 81 | - <script id="ohloh" type="text/javascript" src="http://www.ohloh.net/p/150688/widgets/project_users.js?style=red"></script> | |
| 82 | - --> | |
| 83 | - </td> | |
| 84 | - </tr> | |
| 85 | -</table> | |
| 86 | - | |
| 87 | -<div id="i3GEOguiaMovel" style="position:absolute;display:block;border:0px solid white;text-align:left;z-index:1000;background-color:none"> | |
| 88 | - <img id='i3GEOguiaMovelPuxador' onclick='i3GEO.guias.guiaMovel.abreFecha()' style='z-index:2;border:solid 0px white;left:0px;position:absolute;top:0px' width='0px' src='../imagens/openbars.png' > | |
| 89 | - <div id="i3GEOguiaMovelMolde" style="position:absolute;display:none;border:0px solid white;text-align:left;z-index:1000;background-color:gray"> | |
| 90 | - <div id='i3GEOguiaMovelIcones' style='overflow:none;left:0px;display:none;position:absolute;top:0px;text-align:center;height:0px;width:0px;border:solid 0px white;background-color:white' ></div> | |
| 91 | - <div id='i3GEOguiaMovelConteudo' style='overflow:auto;display:none;position:absolute;border-color:gray;border-width:0px 0 0px 0px;left:0px;height:0px;background-color:white'> | |
| 92 | - <div id='guia1obj' style='display:none;' > | |
| 93 | - <!-- Esta div acrescenta a opção de busca rápida, caso vc queira colocá-la em um lugar específico --> | |
| 94 | - <div style='left:5px;top:10px;' id=buscaRapida ></div> | |
| 95 | - <!-- Esta div acrescenta a lista de propriedades do mapa --> | |
| 96 | - <div id=listaPropriedades style='top:15px;' ></div> | |
| 97 | - <!-- Esta div acrescenta a lista de de camadas do tipo 'baselayers' específicas da interface Openlayers. Veja também a opção i3GEO.Interface.openlayers.GADGETS.LayerSwitcher --> | |
| 98 | - <div id=listaLayersBase style='top:15px;'></div> | |
| 99 | - <!-- Esta div acrescenta a lista de de camadas disponíveis no mapa atual --> | |
| 100 | - <div id=listaTemas style='top:15px;'></div> | |
| 101 | - </div> | |
| 102 | - <div id='guia2obj' style='display:none;'>Aguarde...<img alt="" src="../imagens/branco.gif" width=248 /></div> | |
| 103 | - <div id='guia4obj' style='display:none;text-align:left'><div id='legenda' style='text-align:left'></div></div> | |
| 104 | - <div id='guia5obj' style='display:none;text-align:left'><div id='banners' style='overflow:auto;text-align:left'>Aguarde...</div></div> | |
| 105 | - </div> | |
| 106 | - </div> | |
| 107 | -</div> | |
| 108 | - | |
| 109 | -<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing "></script> | |
| 110 | -<script type="text/javascript" src="../classesjs/i3geonaocompacto.js"></script> | |
| 111 | -<script type="text/javascript"> | |
| 112 | -i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 113 | -i3GEO.Interface.ATUAL = "googlemaps"; | |
| 114 | -i3GEO.Interface.IDCORPO = "contemImg"; | |
| 115 | -i3GEO.configura.diminuixN = 20; | |
| 116 | -//ativa ou desativa o balao de info ao clicar no mapa | |
| 117 | -i3GEO.eventos.cliquePerm.ativo = true; | |
| 118 | -// | |
| 119 | -i3GEO.cria(); | |
| 120 | - | |
| 121 | -/* | |
| 122 | - Inicializa o mapa | |
| 123 | -*/ | |
| 124 | -//não mostra o mapa de referência | |
| 125 | -i3GEO.configura.mapaRefDisplay = "none"; | |
| 126 | -//tipo de barra de botões | |
| 127 | -i3GEO.barraDeBotoes.TIPO = "olhodepeixe"; | |
| 128 | -//ajusta o deslocamento da barra de botoes | |
| 129 | -i3GEO.barraDeBotoes.OFFSET = 11; | |
| 130 | -//ajusta a posicao da barra de botoes no IE | |
| 131 | -if(navm){ | |
| 132 | - i3GEO.barraDeBotoes.OFFSET = 5; | |
| 133 | -} | |
| 134 | -//i3GEO.barraDeBotoes.INCLUIBOTAO.barraedicao = false; | |
| 135 | -//ajusta a posição da barra de botões no IE | |
| 136 | -//if(navm) | |
| 137 | -//{i3GEO.barraDeBotoes.OFFSET = -45;} | |
| 138 | - | |
| 139 | -//número máximo de botões na barra de botões inicial | |
| 140 | -//i3GEO.barraDeBotoes.MAXBOTOES = 10; | |
| 141 | -//remove itens dos menus que não são necessários, já que estão como ícones na barra de botões | |
| 142 | -i3GEO.configura.oMenuData["submenus"]["janelas"] = []; | |
| 143 | -i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin = true; | |
| 144 | - | |
| 145 | -//barra de botoes normal. descomente para usar | |
| 146 | -/* | |
| 147 | -i3GEO.barraDeBotoes.TIPO = "yui"; | |
| 148 | -i3GEO.barraDeBotoes.AUTOALTURA = false; | |
| 149 | -i3GEO.barraDeBotoes.ATIVAMENUCONTEXTO = false; | |
| 150 | -i3GEO.barraDeBotoes.PERMITEFECHAR = true; | |
| 151 | -i3GEO.barraDeBotoes.PERMITEDESLOCAR = true; | |
| 152 | -i3GEO.barraDeBotoes.AUTO = true; | |
| 153 | -i3GEO.barraDeBotoes.COMPORTAMENTO = "laranja"; | |
| 154 | -i3GEO.Interface.BARRABOTOESLEFT = 80; | |
| 155 | -i3GEO.Interface.BARRABOTOESTOP = 20; | |
| 156 | -*/ | |
| 157 | -i3GEO.idioma.IDSELETOR = "seletorIdiomas"; | |
| 158 | -i3GEO.Interface.ATIVAMENUCONTEXTO = true; | |
| 159 | -i3GEO.arvoreDeTemas.TIPOBOTAO = "radio"; | |
| 160 | - | |
| 161 | -//para evitar a entrada de comentários na árvore de camadas, modifique a opção de cada tema individualmente no sistema de administração | |
| 162 | -i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentario = true; | |
| 163 | -i3GEO.mapa.AUTORESIZE = true; | |
| 164 | -i3GEO.arvoreDeCamadas.MOSTRALISTAKML = false; | |
| 165 | -i3GEO.guias.TIPO = "movel"; | |
| 166 | -//posição da guia movel em relação ao topo do mapa. Se for igual a 0, o cálculo será feito de forma automática | |
| 167 | -i3GEO.guias.guiaMovel.config.topGuiaMovel = 0; | |
| 168 | - | |
| 169 | -i3GEO.ajuda.ATIVAJANELA = false; | |
| 170 | -// | |
| 171 | -//substitui a janela de alerta normal do navegador por uma janela estilizada. Pode ser comentado sem problemas. | |
| 172 | -// | |
| 173 | -i3GEO.janela.ativaAlerta(); | |
| 174 | -//esconde a logomarca ao finalizar o mapa | |
| 175 | -i3GEO.finaliza = function(){ | |
| 176 | - $i("i3GEOlogoMarca").style.display = "none"; | |
| 177 | - i3GEO.mapa.insereDobraPagina("openlayers","../imagens/dobraopenlayers.png"); | |
| 178 | -}; | |
| 179 | -//i3GEO.Interface.googlemaps.TIPOMAPA = "satellite"; | |
| 180 | -// | |
| 181 | -//define a funcao que sera executada ao clicar no mapa | |
| 182 | -//default (balao do tipo etiqueta) | |
| 183 | -i3GEO.eventos.MOUSECLIQUEPERM = [i3GEO.configura.funcaoTip]; | |
| 184 | -//alternativo (janela de identificacao | |
| 185 | -//i3GEO.eventos.MOUSECLIQUEPERM = [i3GEO.configura.funcaoIdentifica]; | |
| 186 | -// | |
| 187 | -i3GEO.finalizaAPI = function(){ | |
| 188 | -}; | |
| 189 | - | |
| 190 | -i3GEO.inicia(); | |
| 191 | -</script> | |
| 192 | -</body> | |
| 193 | -</html> | |
| 194 | 1 | \ No newline at end of file |
| 2 | +<?php | |
| 3 | +include_once("../ms_configura.php"); | |
| 4 | +?> | |
| 5 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
| 6 | +<html> | |
| 7 | +<head> | |
| 8 | +<meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile"> | |
| 9 | +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | |
| 10 | +<title>i3GEO - Google Maps</title> | |
| 11 | + | |
| 12 | +</head> | |
| 13 | +<body id="i3geo" style='margin-left: 7px; background: white;'> | |
| 14 | + <!-- inclui o nome do usuario logado --> | |
| 15 | + <div id="i3GEONomeLogin" style="position: absolute; left: 10px; top: 12px; font-size: 11px; z-index: 50000"></div> | |
| 16 | + <table id='mst' summary="" style='display: none;' width=100% cellspacing='0'> | |
| 17 | + <tr> | |
| 18 | + <td id="contemMenu" style="background: black; height: 30px; text-align: right; border-width: 0pt 0pt 1px; border-color: rgb(240, 240, 240)"> | |
| 19 | + <!--menu suspenso--> | |
| 20 | + <div id="menus" style="height: 0px;"></div> | |
| 21 | + </td> | |
| 22 | + </tr> | |
| 23 | + <tr> | |
| 24 | + <td style="vertical-align: top; border-width: 0px;"> | |
| 25 | + <table width="100%" style="vertical-align: top; border-width: 0px"> | |
| 26 | + <tr> | |
| 27 | + <td class=verdeclaro id=contemImg> | |
| 28 | + <div id=googlemapsdiv style="position: relative; background-image: url('../imagens/i3geo1bw.jpg');"></div> | |
| 29 | + </td> | |
| 30 | + </tr> | |
| 31 | + </table> | |
| 32 | + </td> | |
| 33 | + </tr> | |
| 34 | + <tr> | |
| 35 | + <td> | |
| 36 | + <table style="width: 100%; height: 28px"> | |
| 37 | + <tr> | |
| 38 | + <td class=fundoRodape style="width: 25%"> | |
| 39 | + <!-- aqui será incluída a escala numérica --> | |
| 40 | + <div id=escala style="margin: auto; text-align: right; left: 15px;"></div> | |
| 41 | + </td> | |
| 42 | + <td class=fundoRodape style="width: 5%"></td> | |
| 43 | + <td class=fundoRodape style="width: 40%"> | |
| 44 | + <!-- aqui será incluído o gadget que mostra a coordenada geográfica da posição do mouse --> | |
| 45 | + <div id=localizarxy style="margin: auto; text-align: left; font-size: 10px; display: inline-table"></div> | |
| 46 | + </td> | |
| 47 | + <td class=fundoRodape style="width: 20%"> | |
| 48 | + <!-- botão de compartilhamento em redes sociais--> | |
| 49 | + <div id=i3GEOcompartilhar style="width: 170px; margin: auto; text-align: left; padding-top: 1px"></div> <!-- aqui será incluído o contador de tempo quando o temporizador de redesenho do mapa estiver ativo --> | |
| 50 | + <div id=tempoRedesenho style="z-index: 100; position: absolute; top: 0px; color: green; background-color: black; width: 50px; display: none"></div> | |
| 51 | + </td> | |
| 52 | + <!-- aqui serão incluídas as bandeiras que permitem a troca de idioma --> | |
| 53 | + <td class=fundoRodape style="width: 10%;"> | |
| 54 | + <div id=seletorIdiomas style="right: 15px;"></div> | |
| 55 | + </td> | |
| 56 | + </tr> | |
| 57 | + </table> | |
| 58 | + </td> | |
| 59 | + </tr> | |
| 60 | + </table> | |
| 61 | + <table id="i3GEOlogoMarca" style='margin: 0px auto; box-shadow: 0 1px 13px gray; border-radius: 5px;'> | |
| 62 | + <tr> | |
| 63 | + <td><div id=versaoi3geo></div> | |
| 64 | + <h2 style="font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;">i3Geo - Software livre para criação de mapas interativos e geoprocessamento</h2> | |
| 65 | + <h3 style="font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;">Baseado no Mapserver, é licenciado sob GPL e integra o Portal do Software Público Brasileiro</h3></td> | |
| 66 | + </tr> | |
| 67 | + <tr> | |
| 68 | + <td style="padding: 10px;"><img style="width: 560px; height: 81px" alt="" src='../imagens/logo_inicio.png'></td> | |
| 69 | + </tr> | |
| 70 | + <tr> | |
| 71 | + <td> | |
| 72 | + <!-- | |
| 73 | + <script id="ohloh" type="text/javascript" src="http://www.ohloh.net/p/150688/widgets/project_users.js?style=red"></script> | |
| 74 | + --> | |
| 75 | + </td> | |
| 76 | + </tr> | |
| 77 | + </table> | |
| 78 | + | |
| 79 | + <div id="i3GEOguiaMovel" style="position: absolute; display: block; border: 0px solid white; text-align: left; z-index: 1000; background-color: none"> | |
| 80 | + <img id='i3GEOguiaMovelPuxador' onclick='i3GEO.guias.guiaMovel.abreFecha()' style='z-index: 2; border: solid 0px white; left: 0px; position: absolute; top: 0px' width='0px' src='../imagens/openbars.png'> | |
| 81 | + <div id="i3GEOguiaMovelMolde" style="position: absolute; display: none; border: 0px solid white; text-align: left; z-index: 1000; background-color: gray"> | |
| 82 | + <div id='i3GEOguiaMovelIcones' style='overflow: none; left: 0px; display: none; position: absolute; top: 0px; text-align: center; height: 0px; width: 0px; border: solid 0px white; background-color: white'></div> | |
| 83 | + <div id='i3GEOguiaMovelConteudo' style='overflow: auto; display: none; position: absolute; border-color: gray; border-width: 0px 0 0px 0px; left: 0px; height: 0px; background-color: white'> | |
| 84 | + <div id='guia1obj' style='display: none;'> | |
| 85 | + <!-- Esta div acrescenta a opção de busca rápida, caso vc queira colocá-la em um lugar específico --> | |
| 86 | + <div style='left: 5px; top: 10px;' id=buscaRapida></div> | |
| 87 | + <!-- Esta div acrescenta a lista de propriedades do mapa --> | |
| 88 | + <div id=listaPropriedades style='top: 15px;'></div> | |
| 89 | + <!-- Esta div acrescenta a lista de de camadas do tipo 'baselayers' específicas da interface Openlayers. Veja também a opção i3GEO.Interface.openlayers.GADGETS.LayerSwitcher --> | |
| 90 | + <div id=listaLayersBase style='top: 15px;'></div> | |
| 91 | + <!-- Esta div acrescenta a lista de de camadas disponíveis no mapa atual --> | |
| 92 | + <div id=listaTemas style='top: 15px;'></div> | |
| 93 | + </div> | |
| 94 | + <div id='guia2obj' style='display: none;'> | |
| 95 | + Aguarde...<img alt="" src="../imagens/branco.gif" width=248 /> | |
| 96 | + </div> | |
| 97 | + <div id='guia4obj' style='display: none; text-align: left'> | |
| 98 | + <div id='legenda' style='text-align: left'></div> | |
| 99 | + </div> | |
| 100 | + <div id='guia5obj' style='display: none; text-align: left'> | |
| 101 | + <div id='banners' style='overflow: auto; text-align: left'>Aguarde...</div> | |
| 102 | + </div> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + </div> | |
| 106 | + | |
| 107 | + <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing,geometry"></script> | |
| 108 | + <script type="text/javascript" src="../classesjs/i3geonaocompacto.js"></script> | |
| 109 | + <link rel="stylesheet" type="text/css" href="../css/black.css"> | |
| 110 | + <script type="text/javascript"> | |
| 111 | +i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 112 | +i3GEO.Interface.ATUAL = "googlemaps"; | |
| 113 | +i3GEO.Interface.IDCORPO = "contemImg"; | |
| 114 | +i3GEO.configura.diminuixN = 20; | |
| 115 | + | |
| 116 | +i3GEO.configura.oMenuData.submenus["interface"] = [ | |
| 117 | + { id:"omenudataInterface0a",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("d27")+'</b></span>',url: "#"}, | |
| 118 | + { id:"omenudataInterface2",text: "OpenLayers", url: "javascript:window.location = i3GEO.configura.locaplic+'/interface/black_ol.htm?'+i3GEO.configura.sid" }, | |
| 119 | + { id:"omenudataInterface2a",text: "OpenLayers OSM", url: "javascript:window.location = i3GEO.configura.locaplic+'/interface/black_osm.htm?'+i3GEO.configura.sid" }, | |
| 120 | + { id:"omenudataInterface4",text: "Google Maps", url: "javascript:window.location = i3GEO.configura.locaplic+'/interface/black_gm.phtml?'+i3GEO.configura.sid" }, | |
| 121 | + { id:"omenudataInterface5",text: "Google Earth", url: "javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid" }, | |
| 122 | + { id:"omenudataInterface0b",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url: "#"}, | |
| 123 | + { id:"omenudataInterface6",text: $trad("u21"), url: "javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')" }, | |
| 124 | + { id:"omenudataInterface7",text: "Serviços WMS", url: "javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')" }, | |
| 125 | + { id:"omenudataInterface9",text: "Download de dados", url: "javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')" }, | |
| 126 | + { id:"omenudataInterface11",text: $trad("p20"), url: "javascript:i3GEO.mapa.dialogo.telaRemota()" } | |
| 127 | +]; | |
| 128 | + | |
| 129 | +i3GEO.configura.autotamanho = false; | |
| 130 | +i3GEO.Interface.openlayers.TILES = true; | |
| 131 | +i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.finaliza = 'if($i("omenudataInterface1")){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("text", " ");}'; | |
| 132 | +i3GEO.cria(); | |
| 133 | +i3GEO.configura.mapaRefDisplay = "none"; | |
| 134 | +i3GEO.barraDeBotoes.TIPO = "olhodepeixe"; | |
| 135 | +//ajusta o deslocamento da barra de botoes | |
| 136 | +i3GEO.barraDeBotoes.OFFSET = 11; | |
| 137 | +//ajusta a posicao da barra de botoes no IE | |
| 138 | +if(navm){ | |
| 139 | + i3GEO.barraDeBotoes.OFFSET = 5; | |
| 140 | +} | |
| 141 | +i3GEO.configura.oMenuData["submenus"]["janelas"] = []; | |
| 142 | +i3GEO.ajuda.ATIVAJANELA = false; | |
| 143 | +i3GEO.idioma.IDSELETOR = "seletorIdiomas"; | |
| 144 | +i3GEO.Interface.ATIVAMENUCONTEXTO = false; | |
| 145 | +i3GEO.arvoreDeTemas.TIPOBOTAO = "radio"; | |
| 146 | +i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios = true; | |
| 147 | +i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS = true; | |
| 148 | +i3GEO.arvoreDeCamadas.MOSTRALISTAKML = false; | |
| 149 | +i3GEO.mapa.AUTORESIZE = true; | |
| 150 | +i3GEO.guias.TIPO = "movel"; | |
| 151 | +i3GEO.guias.guiaMovel.config.topGuiaMovel = 36; | |
| 152 | +i3GEO.janela.ativaAlerta(); | |
| 153 | + | |
| 154 | +//i3GEO.Interface.googlemaps.TIPOMAPA = "satellite"; | |
| 155 | + | |
| 156 | +i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir = true; | |
| 157 | +i3GEO.janela.TRANSICAOSUAVE = true; | |
| 158 | + | |
| 159 | +i3GEO.finaliza = function(){ | |
| 160 | + if($i("i3GEOlogoMarca")){ | |
| 161 | + $i("i3GEOlogoMarca").style.display = "none"; | |
| 162 | + } | |
| 163 | + i3GEO.mapa.insereDobraPagina("openlayers","../imagens/dobraopenlayers.png"); | |
| 164 | +} | |
| 165 | +i3GEO.finalizaAPI = function(){ | |
| 166 | +} | |
| 167 | +i3GEO.inicia(); | |
| 168 | +</script> | |
| 169 | +</body> | |
| 170 | +</html> | ... | ... |