Commit 9859e9a581dace77e00b183f948cc6ac6fcea9b7

Authored by Edmar Moretti
1 parent 04336c50

Corrige o posicionamento de ícones sobre o mapa na interface googlemaps

classesjs/classe_configura.js
@@ -816,6 +816,7 @@ i3GEO.configura = { @@ -816,6 +816,7 @@ i3GEO.configura = {
816 //$i("i3GEOmarcaIdentifica").style.display = "none"; 816 //$i("i3GEOmarcaIdentifica").style.display = "none";
817 }, 817 },
818 i; 818 i;
  819 + //alert(objposicaocursor.telay)
819 i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp); 820 i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);
820 i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica"); 821 i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");
821 i = $i("i3GEOmarcaIdentifica"); 822 i = $i("i3GEOmarcaIdentifica");
classesjs/classe_eventos.js
@@ -393,10 +393,8 @@ i3GEO.eventos = { @@ -393,10 +393,8 @@ i3GEO.eventos = {
393 if(typeof(console) !== 'undefined'){console.error(erro);} 393 if(typeof(console) !== 'undefined'){console.error(erro);}
394 } 394 }
395 if (container !== "divGeometriasTemp" && container !== "mapaReferencia"){ 395 if (container !== "divGeometriasTemp" && container !== "mapaReferencia"){
396 - if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googlemaps","googleearth","openlayers"]))  
397 - {return;} 396 + return;
398 } 397 }
399 -  
400 // 398 //
401 //verifica sob qual objeto o mouse está se movendo 399 //verifica sob qual objeto o mouse está se movendo
402 // 400 //
classesjs/classe_interface.js
@@ -1560,8 +1560,7 @@ i3GEO.Interface = { @@ -1560,8 +1560,7 @@ i3GEO.Interface = {
1560 i3GeoMap.overlayMapTypes.insertAt(indice, i); 1560 i3GeoMap.overlayMapTypes.insertAt(indice, i);
1561 }, 1561 },
1562 registraEventos: function(){ 1562 registraEventos: function(){
1563 - var pos,  
1564 - modoAtual = ""; 1563 + var modoAtual = "";
1565 google.maps.event.addListener(i3GeoMap, "dragstart", function() { 1564 google.maps.event.addListener(i3GeoMap, "dragstart", function() {
1566 g_operacao = ""; 1565 g_operacao = "";
1567 g_tipoacao = ""; 1566 g_tipoacao = "";
@@ -1598,9 +1597,9 @@ i3GEO.Interface = { @@ -1598,9 +1597,9 @@ i3GEO.Interface = {
1598 xy = i3GEO.navega.centroDoMapa(); 1597 xy = i3GEO.navega.centroDoMapa();
1599 i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]); 1598 i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]);
1600 }); 1599 });
1601 - pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));  
1602 google.maps.event.addListener(i3GeoMap, "mousemove", function(ponto) { 1600 google.maps.event.addListener(i3GeoMap, "mousemove", function(ponto) {
1603 - var teladms,tela; 1601 + var teladms,tela,
  1602 + pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));
1604 if(modoAtual === "move") 1603 if(modoAtual === "move")
1605 {return;} 1604 {return;}
1606 ponto = ponto.latLng; 1605 ponto = ponto.latLng;
classesjs/classe_util.js
@@ -441,10 +441,10 @@ i3GEO.util = { @@ -441,10 +441,10 @@ i3GEO.util = {
441 {Array} - array com a posicao [x,y] 441 {Array} - array com a posicao [x,y]
442 */ 442 */
443 pegaPosicaoObjeto: function(obj){ 443 pegaPosicaoObjeto: function(obj){
444 - if(obj)  
445 - {  
446 - if(!obj.style)  
447 - {return [0,0];} 444 + if(obj){
  445 + if(!obj.style){
  446 + return [0,0];
  447 + }
448 var curleft = 0,curtop = 0; 448 var curleft = 0,curtop = 0;
449 if(obj){ 449 if(obj){
450 if (obj.offsetParent) { 450 if (obj.offsetParent) {
@@ -458,8 +458,9 @@ i3GEO.util = { @@ -458,8 +458,9 @@ i3GEO.util = {
458 } 458 }
459 return [curleft+document.body.scrollLeft,curtop+document.body.scrollTop]; 459 return [curleft+document.body.scrollLeft,curtop+document.body.scrollTop];
460 } 460 }
461 - else  
462 - {return [0,0];} 461 + else{
  462 + return [0,0];
  463 + }
463 }, 464 },
464 /* 465 /*
465 Function: pegaElementoPai 466 Function: pegaElementoPai
@@ -632,10 +633,8 @@ i3GEO.util = { @@ -632,10 +633,8 @@ i3GEO.util = {
632 if(arguments.length < 4 || h === ""){ 633 if(arguments.length < 4 || h === ""){
633 h = 25; 634 h = 25;
634 } 635 }
635 - if (!$i(id))  
636 - { 636 + if (!$i(id)){
637 var novoel = document.createElement("img"); 637 var novoel = document.createElement("img");
638 - novoel.id = id;  
639 novoel.style.zIndex=10000; 638 novoel.style.zIndex=10000;
640 novoel.style.position="absolute"; 639 novoel.style.position="absolute";
641 novoel.style.width=parseInt(w,10)+"px"; 640 novoel.style.width=parseInt(w,10)+"px";
@@ -643,8 +642,12 @@ i3GEO.util = { @@ -643,8 +642,12 @@ i3GEO.util = {
643 novoel.style.top="0px"; 642 novoel.style.top="0px";
644 novoel.style.left="0px"; 643 novoel.style.left="0px";
645 novoel.src = imagem; 644 novoel.src = imagem;
646 - if(id === "boxpin")  
647 - {novoel.onmouseover = function(){$i("boxpin").style.display="none";};} 645 + novoel.id = id;
  646 + if(id === "boxpin"){
  647 + novoel.onmouseover = function(){
  648 + $i("boxpin").style.display="none";
  649 + };
  650 + }
648 else if(mouseover){ 651 else if(mouseover){
649 novoel.onmouseover = mouseover; 652 novoel.onmouseover = mouseover;
650 } 653 }
@@ -680,11 +683,9 @@ i3GEO.util = { @@ -680,11 +683,9 @@ i3GEO.util = {
680 i = $i(id); 683 i = $i(id);
681 mx = parseInt(i.style.width,10) / 2; 684 mx = parseInt(i.style.width,10) / 2;
682 my = parseInt(i.style.height,10) / 2; 685 my = parseInt(i.style.height,10) / 2;
683 - //alert(objposicaocursor.telax+" "+objposicaocursor.telay)  
684 - i.style.position = "absolute";  
685 - i.style.top = objposicaocursor.telay + "px"; 686 + i.style.top = objposicaocursor.telay - my + "px";
686 i.style.left = objposicaocursor.telax - mx + "px"; 687 i.style.left = objposicaocursor.telax - mx + "px";
687 - return [objposicaocursor.telay + my,objposicaocursor.telax - mx]; 688 + return [objposicaocursor.telay - my,objposicaocursor.telax - mx];
688 }, 689 },
689 /* 690 /*
690 Function: escondePin 691 Function: escondePin
@@ -2374,7 +2375,7 @@ i3GEO.util = { @@ -2374,7 +2375,7 @@ i3GEO.util = {
2374 2375
2375 Remove um filho de um elemento DOM 2376 Remove um filho de um elemento DOM
2376 2377
2377 - Pode-se especificar o pai e o filha a ser removido ou simplesmente o ID do no que se quer remover 2378 + Pode-se especificar o pai e o filho a ser removido ou simplesmente o ID do no que se quer remover
2378 2379
2379 Parametros: 2380 Parametros:
2380 2381
interface/googlemapsdebug.phtml
1 <?php 1 <?php
2 include_once("../ms_configura.php"); 2 include_once("../ms_configura.php");
3 ?> 3 ?>
4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 4 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
5 <html> 5 <html>
6 <head> 6 <head>
7 <meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile"> 7 <meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile">
pacotes/google/keydragzoom.js.php
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 /** 2 /**
3 * @name Key Drag Zoom for V3 3 * @name Key Drag Zoom for V3
4 * @version 1.0 4 * @version 1.0
5 - * @author: Nianwei Liu [nianwei at gmail dot com] & Gary Little [gary at luxcentral dot com] 5 + * @author: Nianwei Liu [nianwei at gmail dot com] e Gary Little [gary at luxcentral dot com]
6 * @fileoverview This library adds a drag zoom capability to a Google map. 6 * @fileoverview This library adds a drag zoom capability to a Google map.
7 * When drag zoom is enabled, holding down a user-defined hot key <code>(shift | ctrl | alt)</code> 7 * When drag zoom is enabled, holding down a user-defined hot key <code>(shift | ctrl | alt)</code>
8 * while dragging a box around an area of interest will zoom the map 8 * while dragging a box around an area of interest will zoom the map