Commit 78da6b83917121b0c61599b127dd97e72488a61f
1 parent
4a0b4de0
Exists in
master
and in
7 other branches
-
Showing
1 changed file
with
16 additions
and
17 deletions
Show diff stats
classesjs/classe_analise.js
| @@ -380,6 +380,8 @@ i3GEO.analise = { | @@ -380,6 +380,8 @@ i3GEO.analise = { | ||
| 380 | trecho = i3GEO.calculo.distancia(x1,y1,x2,y2); | 380 | trecho = i3GEO.calculo.distancia(x1,y1,x2,y2); |
| 381 | parcial = i3GEO.analise.medeDistancia.openlayers.somaDist(); | 381 | parcial = i3GEO.analise.medeDistancia.openlayers.somaDist(); |
| 382 | direcao = i3GEO.calculo.direcao(x1,y1,x2,y2); | 382 | direcao = i3GEO.calculo.direcao(x1,y1,x2,y2); |
| 383 | + direcao = i3GEO.calculo.dd2dms(direcao,direcao); | ||
| 384 | + direcao = direcao[0]; | ||
| 383 | i3GEO.analise.medeDistancia.openlayers.mostraParcial(trecho,parcial,direcao); | 385 | i3GEO.analise.medeDistancia.openlayers.mostraParcial(trecho,parcial,direcao); |
| 384 | } | 386 | } |
| 385 | }, | 387 | }, |
| @@ -518,7 +520,7 @@ i3GEO.analise = { | @@ -518,7 +520,7 @@ i3GEO.analise = { | ||
| 518 | if (mostra){ | 520 | if (mostra){ |
| 519 | texto = "<b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+ | 521 | texto = "<b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+ |
| 520 | "<br><b>"+$trad("x97")+":</b> "+(parcial + trecho).toFixed(3)+" km" + | 522 | "<br><b>"+$trad("x97")+":</b> "+(parcial + trecho).toFixed(3)+" km" + |
| 521 | - "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao.toFixed(4); | 523 | + "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao; |
| 522 | mostra.innerHTML = texto; | 524 | mostra.innerHTML = texto; |
| 523 | } | 525 | } |
| 524 | } | 526 | } |
| @@ -649,6 +651,8 @@ i3GEO.analise = { | @@ -649,6 +651,8 @@ i3GEO.analise = { | ||
| 649 | //raio = google.maps.geometry.spherical.computeDistanceBetween(evt.latLng,new google.maps.LatLng(y1,x1)) | 651 | //raio = google.maps.geometry.spherical.computeDistanceBetween(evt.latLng,new google.maps.LatLng(y1,x1)) |
| 650 | trecho = i3GEO.calculo.distancia(x1,y1,x2,y2); | 652 | trecho = i3GEO.calculo.distancia(x1,y1,x2,y2); |
| 651 | direcao = i3GEO.calculo.direcao(x1,y1,x2,y2); | 653 | direcao = i3GEO.calculo.direcao(x1,y1,x2,y2); |
| 654 | + direcao = i3GEO.calculo.dd2dms(direcao,direcao); | ||
| 655 | + direcao = direcao[0]; | ||
| 652 | i3GEO.analise.medeDistancia.googlemaps.mostraParcial(trecho,parcial,direcao); | 656 | i3GEO.analise.medeDistancia.googlemaps.mostraParcial(trecho,parcial,direcao); |
| 653 | } | 657 | } |
| 654 | }); | 658 | }); |
| @@ -711,7 +715,7 @@ i3GEO.analise = { | @@ -711,7 +715,7 @@ i3GEO.analise = { | ||
| 711 | if (mostra){ | 715 | if (mostra){ |
| 712 | texto = "<b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+ | 716 | texto = "<b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+ |
| 713 | "<br><b>"+$trad("x97")+":</b> "+(parcial + trecho).toFixed(3)+" km" + | 717 | "<br><b>"+$trad("x97")+":</b> "+(parcial + trecho).toFixed(3)+" km" + |
| 714 | - "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao.toFixed(4); | 718 | + "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao; |
| 715 | mostra.innerHTML = texto; | 719 | mostra.innerHTML = texto; |
| 716 | } | 720 | } |
| 717 | } | 721 | } |
| @@ -800,18 +804,9 @@ i3GEO.analise = { | @@ -800,18 +804,9 @@ i3GEO.analise = { | ||
| 800 | * Os raios e pontos sao sempre removidos | 804 | * Os raios e pontos sao sempre removidos |
| 801 | */ | 805 | */ |
| 802 | fechaJanela: function(){ | 806 | fechaJanela: function(){ |
| 803 | - i3GeoMap.setOptions({disableDoubleClickZoom:false}); | ||
| 804 | - i3GeoMap.setOptions({draggableCursor:undefined}); | ||
| 805 | - var f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem","medeDistancia"); | ||
| 806 | - if(f && f.length > 0){ | ||
| 807 | - temp = window.confirm($trad("x94")); | ||
| 808 | - if(temp){ | ||
| 809 | - i3GEO.desenho.googlemaps.destroyFeatures(f); | ||
| 810 | - } | ||
| 811 | - } | ||
| 812 | - f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem","medeDistanciaExcluir"); | ||
| 813 | - if(f && f.length > 0){ | ||
| 814 | - i3GEO.desenho.googlemaps.destroyFeatures(f); | 807 | + temp = window.confirm($trad("x94")); |
| 808 | + if(temp){ | ||
| 809 | + i3GEO.desenho.googleearth.removePlacemark("divGeometriasTemp"); | ||
| 815 | } | 810 | } |
| 816 | i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.googleearth.clique()"); | 811 | i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.googleearth.clique()"); |
| 817 | i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento.googleearth()"); | 812 | i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento.googleearth()"); |
| @@ -839,7 +834,7 @@ i3GEO.analise = { | @@ -839,7 +834,7 @@ i3GEO.analise = { | ||
| 839 | if (mostra){ | 834 | if (mostra){ |
| 840 | texto = "<b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+ | 835 | texto = "<b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+ |
| 841 | "<br><b>"+$trad("x97")+":</b> "+(parcial + trecho).toFixed(3)+" km" + | 836 | "<br><b>"+$trad("x97")+":</b> "+(parcial + trecho).toFixed(3)+" km" + |
| 842 | - "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao.toFixed(4); | 837 | + "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao; |
| 843 | mostra.innerHTML = texto; | 838 | mostra.innerHTML = texto; |
| 844 | } | 839 | } |
| 845 | } | 840 | } |
| @@ -995,6 +990,8 @@ i3GEO.analise = { | @@ -995,6 +990,8 @@ i3GEO.analise = { | ||
| 995 | } | 990 | } |
| 996 | trecho = i3GEO.calculo.distancia(x1,y1,x2,y2); | 991 | trecho = i3GEO.calculo.distancia(x1,y1,x2,y2); |
| 997 | direcao = i3GEO.calculo.direcao(x1,y1,x2,y2); | 992 | direcao = i3GEO.calculo.direcao(x1,y1,x2,y2); |
| 993 | + direcao = i3GEO.calculo.dd2dms(direcao,direcao); | ||
| 994 | + direcao = direcao[0]; | ||
| 998 | per = i3GEO.analise.medeArea.openlayers.somaDist(); | 995 | per = i3GEO.analise.medeArea.openlayers.somaDist(); |
| 999 | //soma ate o primeiro ponto | 996 | //soma ate o primeiro ponto |
| 1000 | x1 = i3GEO.analise.medeArea.pontos.xpt[0]; | 997 | x1 = i3GEO.analise.medeArea.pontos.xpt[0]; |
| @@ -1146,7 +1143,7 @@ i3GEO.analise = { | @@ -1146,7 +1143,7 @@ i3GEO.analise = { | ||
| 1146 | "<br><b>"+$trad("d21at")+":</b> "+(area/10000).toFixed(2)+" ha"+ | 1143 | "<br><b>"+$trad("d21at")+":</b> "+(area/10000).toFixed(2)+" ha"+ |
| 1147 | "<br><b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+ | 1144 | "<br><b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+ |
| 1148 | "<br><b>"+$trad("x98")+":</b> "+(per).toFixed(3)+" km" + | 1145 | "<br><b>"+$trad("x98")+":</b> "+(per).toFixed(3)+" km" + |
| 1149 | - "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao.toFixed(4); | 1146 | + "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao; |
| 1150 | mostra.innerHTML = texto; | 1147 | mostra.innerHTML = texto; |
| 1151 | } | 1148 | } |
| 1152 | } | 1149 | } |
| @@ -1256,6 +1253,8 @@ i3GEO.analise = { | @@ -1256,6 +1253,8 @@ i3GEO.analise = { | ||
| 1256 | y2 = evt.latLng.lat(); | 1253 | y2 = evt.latLng.lat(); |
| 1257 | trecho = i3GEO.calculo.distancia(x1,y1,x2,y2); | 1254 | trecho = i3GEO.calculo.distancia(x1,y1,x2,y2); |
| 1258 | direcao = i3GEO.calculo.direcao(x1,y1,x2,y2); | 1255 | direcao = i3GEO.calculo.direcao(x1,y1,x2,y2); |
| 1256 | + direcao = i3GEO.calculo.dd2dms(direcao,direcao); | ||
| 1257 | + direcao = direcao[0]; | ||
| 1259 | area = google.maps.geometry.spherical.computeArea(pontos.mvcLine); | 1258 | area = google.maps.geometry.spherical.computeArea(pontos.mvcLine); |
| 1260 | i3GEO.analise.medeArea.googlemaps.mostraParcial(trecho,per,area,direcao); | 1259 | i3GEO.analise.medeArea.googlemaps.mostraParcial(trecho,per,area,direcao); |
| 1261 | } | 1260 | } |
| @@ -1326,7 +1325,7 @@ i3GEO.analise = { | @@ -1326,7 +1325,7 @@ i3GEO.analise = { | ||
| 1326 | "<br><b>"+$trad("d21at")+":</b> "+(area/10000).toFixed(2)+" ha"+ | 1325 | "<br><b>"+$trad("d21at")+":</b> "+(area/10000).toFixed(2)+" ha"+ |
| 1327 | "<br><b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+ | 1326 | "<br><b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+ |
| 1328 | "<br><b>"+$trad("x98")+":</b> "+(per).toFixed(3)+" km" + | 1327 | "<br><b>"+$trad("x98")+":</b> "+(per).toFixed(3)+" km" + |
| 1329 | - "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao.toFixed(4); | 1328 | + "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao; |
| 1330 | mostra.innerHTML = texto; | 1329 | mostra.innerHTML = texto; |
| 1331 | } | 1330 | } |
| 1332 | } | 1331 | } |