Commit f726638f5fac073a68704e62b99e41c4f5fb88d3

Authored by Edmar Moretti
1 parent 82d8ce32

-

classesjs/classe_eventos.js
@@ -278,6 +278,18 @@ i3GEO.eventos = @@ -278,6 +278,18 @@ i3GEO.eventos =
278 i3GEO.eventos.executaEventos(this.MOUSEUP); 278 i3GEO.eventos.executaEventos(this.MOUSEUP);
279 } else { 279 } else {
280 if (i3GEO.Interface.ATUAL === "googlemaps" && exy.target && !exy.target.src) { 280 if (i3GEO.Interface.ATUAL === "googlemaps" && exy.target && !exy.target.src) {
  281 + //recalcula a posicao do mouse. Necessario em dispositivos touch
  282 + if(i3GEOtouchesPosMapa === ""){
  283 + i3GEOtouchesPosMapa = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));
  284 + }
  285 + pos = i3GEOtouchesPosMapa;
  286 + p = new google.maps.Point(e.clientX - pos[0],e.clientY - pos[1]);
  287 + e = null;
  288 + lonlat = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(p);
  289 + if(lonlat){
  290 + objposicaocursor.ddx = lonlat.lng();
  291 + objposicaocursor.ddy = lonlat.lat();
  292 + }
281 i3GEO.eventos.executaEventos(this.MOUSEUP); 293 i3GEO.eventos.executaEventos(this.MOUSEUP);
282 } 294 }
283 if (i3GEO.Interface.ATUAL === "openlayers" && exy.target && (i3GEO.desenho.layergrafico || exy.target.style.zIndex == "" || exy.target.style.zIndex == 1)) { 295 if (i3GEO.Interface.ATUAL === "openlayers" && exy.target && (i3GEO.desenho.layergrafico || exy.target.style.zIndex == "" || exy.target.style.zIndex == 1)) {
@@ -528,6 +540,7 @@ i3GEO.eventos = @@ -528,6 +540,7 @@ i3GEO.eventos =
528 }; 540 };
529 docMapa.onmouseup = function(exy) { 541 docMapa.onmouseup = function(exy) {
530 //funciona no googlemaps tbm 542 //funciona no googlemaps tbm
  543 + i3GEO.eventos.cliquePerm.status = true;
531 i3GEO.eventos.mouseupMapa(exy); 544 i3GEO.eventos.mouseupMapa(exy);
532 }; 545 };
533 docMapa.ontouchmove = function(exy) { 546 docMapa.ontouchmove = function(exy) {
classesjs/classe_mapa.js
@@ -1479,7 +1479,6 @@ i3GEO.mapa = @@ -1479,7 +1479,6 @@ i3GEO.mapa =
1479 //evita clicar sobre a barra do googlemaps 1479 //evita clicar sobre a barra do googlemaps
1480 //FIXIT nada elegante 1480 //FIXIT nada elegante
1481 //console.warn(objposicaocursor.imgx) 1481 //console.warn(objposicaocursor.imgx)
1482 - alert(objposicaocursor.ddx)  
1483 if (objposicaocursor.imgx < 70) { 1482 if (objposicaocursor.imgx < 70) {
1484 return; 1483 return;
1485 } 1484 }