Commit 78da6b83917121b0c61599b127dd97e72488a61f

Authored by Edmar Moretti
1 parent 4a0b4de0

-

Showing 1 changed file with 16 additions and 17 deletions   Show diff stats
classesjs/classe_analise.js
... ... @@ -380,6 +380,8 @@ i3GEO.analise = {
380 380 trecho = i3GEO.calculo.distancia(x1,y1,x2,y2);
381 381 parcial = i3GEO.analise.medeDistancia.openlayers.somaDist();
382 382 direcao = i3GEO.calculo.direcao(x1,y1,x2,y2);
  383 + direcao = i3GEO.calculo.dd2dms(direcao,direcao);
  384 + direcao = direcao[0];
383 385 i3GEO.analise.medeDistancia.openlayers.mostraParcial(trecho,parcial,direcao);
384 386 }
385 387 },
... ... @@ -518,7 +520,7 @@ i3GEO.analise = {
518 520 if (mostra){
519 521 texto = "<b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+
520 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 524 mostra.innerHTML = texto;
523 525 }
524 526 }
... ... @@ -649,6 +651,8 @@ i3GEO.analise = {
649 651 //raio = google.maps.geometry.spherical.computeDistanceBetween(evt.latLng,new google.maps.LatLng(y1,x1))
650 652 trecho = i3GEO.calculo.distancia(x1,y1,x2,y2);
651 653 direcao = i3GEO.calculo.direcao(x1,y1,x2,y2);
  654 + direcao = i3GEO.calculo.dd2dms(direcao,direcao);
  655 + direcao = direcao[0];
652 656 i3GEO.analise.medeDistancia.googlemaps.mostraParcial(trecho,parcial,direcao);
653 657 }
654 658 });
... ... @@ -711,7 +715,7 @@ i3GEO.analise = {
711 715 if (mostra){
712 716 texto = "<b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+
713 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 719 mostra.innerHTML = texto;
716 720 }
717 721 }
... ... @@ -800,18 +804,9 @@ i3GEO.analise = {
800 804 * Os raios e pontos sao sempre removidos
801 805 */
802 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 811 i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.googleearth.clique()");
817 812 i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento.googleearth()");
... ... @@ -839,7 +834,7 @@ i3GEO.analise = {
839 834 if (mostra){
840 835 texto = "<b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+
841 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 838 mostra.innerHTML = texto;
844 839 }
845 840 }
... ... @@ -995,6 +990,8 @@ i3GEO.analise = {
995 990 }
996 991 trecho = i3GEO.calculo.distancia(x1,y1,x2,y2);
997 992 direcao = i3GEO.calculo.direcao(x1,y1,x2,y2);
  993 + direcao = i3GEO.calculo.dd2dms(direcao,direcao);
  994 + direcao = direcao[0];
998 995 per = i3GEO.analise.medeArea.openlayers.somaDist();
999 996 //soma ate o primeiro ponto
1000 997 x1 = i3GEO.analise.medeArea.pontos.xpt[0];
... ... @@ -1146,7 +1143,7 @@ i3GEO.analise = {
1146 1143 "<br><b>"+$trad("d21at")+":</b> "+(area/10000).toFixed(2)+" ha"+
1147 1144 "<br><b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+
1148 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 1147 mostra.innerHTML = texto;
1151 1148 }
1152 1149 }
... ... @@ -1256,6 +1253,8 @@ i3GEO.analise = {
1256 1253 y2 = evt.latLng.lat();
1257 1254 trecho = i3GEO.calculo.distancia(x1,y1,x2,y2);
1258 1255 direcao = i3GEO.calculo.direcao(x1,y1,x2,y2);
  1256 + direcao = i3GEO.calculo.dd2dms(direcao,direcao);
  1257 + direcao = direcao[0];
1259 1258 area = google.maps.geometry.spherical.computeArea(pontos.mvcLine);
1260 1259 i3GEO.analise.medeArea.googlemaps.mostraParcial(trecho,per,area,direcao);
1261 1260 }
... ... @@ -1326,7 +1325,7 @@ i3GEO.analise = {
1326 1325 "<br><b>"+$trad("d21at")+":</b> "+(area/10000).toFixed(2)+" ha"+
1327 1326 "<br><b>"+$trad("x95")+":</b> "+trecho.toFixed(3)+" km"+
1328 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 1329 mostra.innerHTML = texto;
1331 1330 }
1332 1331 }
... ...