Commit 9859e9a581dace77e00b183f948cc6ac6fcea9b7
1 parent
04336c50
Exists in
master
and in
7 other branches
Corrige o posicionamento de ícones sobre o mapa na interface googlemaps
Showing
6 changed files
with
24 additions
and
25 deletions
Show diff stats
classesjs/classe_configura.js
... | ... | @@ -816,6 +816,7 @@ i3GEO.configura = { |
816 | 816 | //$i("i3GEOmarcaIdentifica").style.display = "none"; |
817 | 817 | }, |
818 | 818 | i; |
819 | + //alert(objposicaocursor.telay) | |
819 | 820 | i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp); |
820 | 821 | i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica"); |
821 | 822 | i = $i("i3GEOmarcaIdentifica"); | ... | ... |
classesjs/classe_eventos.js
... | ... | @@ -393,10 +393,8 @@ i3GEO.eventos = { |
393 | 393 | if(typeof(console) !== 'undefined'){console.error(erro);} |
394 | 394 | } |
395 | 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 | 399 | //verifica sob qual objeto o mouse está se movendo |
402 | 400 | // | ... | ... |
classesjs/classe_interface.js
... | ... | @@ -1560,8 +1560,7 @@ i3GEO.Interface = { |
1560 | 1560 | i3GeoMap.overlayMapTypes.insertAt(indice, i); |
1561 | 1561 | }, |
1562 | 1562 | registraEventos: function(){ |
1563 | - var pos, | |
1564 | - modoAtual = ""; | |
1563 | + var modoAtual = ""; | |
1565 | 1564 | google.maps.event.addListener(i3GeoMap, "dragstart", function() { |
1566 | 1565 | g_operacao = ""; |
1567 | 1566 | g_tipoacao = ""; |
... | ... | @@ -1598,9 +1597,9 @@ i3GEO.Interface = { |
1598 | 1597 | xy = i3GEO.navega.centroDoMapa(); |
1599 | 1598 | i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]); |
1600 | 1599 | }); |
1601 | - pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)); | |
1602 | 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 | 1603 | if(modoAtual === "move") |
1605 | 1604 | {return;} |
1606 | 1605 | ponto = ponto.latLng; | ... | ... |
classesjs/classe_util.js
... | ... | @@ -441,10 +441,10 @@ i3GEO.util = { |
441 | 441 | {Array} - array com a posicao [x,y] |
442 | 442 | */ |
443 | 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 | 448 | var curleft = 0,curtop = 0; |
449 | 449 | if(obj){ |
450 | 450 | if (obj.offsetParent) { |
... | ... | @@ -458,8 +458,9 @@ i3GEO.util = { |
458 | 458 | } |
459 | 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 | 466 | Function: pegaElementoPai |
... | ... | @@ -632,10 +633,8 @@ i3GEO.util = { |
632 | 633 | if(arguments.length < 4 || h === ""){ |
633 | 634 | h = 25; |
634 | 635 | } |
635 | - if (!$i(id)) | |
636 | - { | |
636 | + if (!$i(id)){ | |
637 | 637 | var novoel = document.createElement("img"); |
638 | - novoel.id = id; | |
639 | 638 | novoel.style.zIndex=10000; |
640 | 639 | novoel.style.position="absolute"; |
641 | 640 | novoel.style.width=parseInt(w,10)+"px"; |
... | ... | @@ -643,8 +642,12 @@ i3GEO.util = { |
643 | 642 | novoel.style.top="0px"; |
644 | 643 | novoel.style.left="0px"; |
645 | 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 | 651 | else if(mouseover){ |
649 | 652 | novoel.onmouseover = mouseover; |
650 | 653 | } |
... | ... | @@ -680,11 +683,9 @@ i3GEO.util = { |
680 | 683 | i = $i(id); |
681 | 684 | mx = parseInt(i.style.width,10) / 2; |
682 | 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 | 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 | 691 | Function: escondePin |
... | ... | @@ -2374,7 +2375,7 @@ i3GEO.util = { |
2374 | 2375 | |
2375 | 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 | 2380 | Parametros: |
2380 | 2381 | ... | ... |
interface/googlemapsdebug.phtml
1 | 1 | <?php |
2 | 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 | 5 | <html> |
6 | 6 | <head> |
7 | 7 | <meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile"> | ... | ... |
pacotes/google/keydragzoom.js.php
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | /** |
3 | 3 | * @name Key Drag Zoom for V3 |
4 | 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 | 6 | * @fileoverview This library adds a drag zoom capability to a Google map. |
7 | 7 | * When drag zoom is enabled, holding down a user-defined hot key <code>(shift | ctrl | alt)</code> |
8 | 8 | * while dragging a box around an area of interest will zoom the map | ... | ... |