Commit 9a0b32e349b25e1b4befda81a6bb3657687be521
1 parent
fa2b0993
Exists in
master
and in
7 other branches
Correção na seleção
Showing
3 changed files
with
26 additions
and
16 deletions
Show diff stats
classesjs/classe_interface.js
| ... | ... | @@ -1565,16 +1565,16 @@ i3GEO.Interface = { |
| 1565 | 1565 | if(!indice){ |
| 1566 | 1566 | //nao utilize !== aqui |
| 1567 | 1567 | if(camada.status != 0){ |
| 1568 | - i3GEO.Interface.googlemaps.insereLayer(camada.name,0); | |
| 1568 | + i3GEO.Interface.googlemaps.insereLayer(camada.name,0,camada.cache); | |
| 1569 | 1569 | } |
| 1570 | 1570 | } |
| 1571 | 1571 | } |
| 1572 | 1572 | }, |
| 1573 | - criaImageMap: function(nomeLayer){ | |
| 1573 | + criaImageMap: function(nomeLayer,cache){ | |
| 1574 | 1574 | var i3GEOTileO = "",s; |
| 1575 | 1575 | s = "i3GEOTileO = new google.maps.ImageMapType({ "+ |
| 1576 | 1576 | "getTileUrl: function(coord, zoom) {" + |
| 1577 | - " var url = '" + i3GEO.configura.locaplic +"/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + | |
| 1577 | + " var url = '" + i3GEO.configura.locaplic +"/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + "&cache=" + cache + | |
| 1578 | 1578 | "&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer=" + nomeLayer + i3GEO.Interface.googlemaps.PARAMETROSLAYER +'&r='+Math.random()+"';" + |
| 1579 | 1579 | " return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; " + |
| 1580 | 1580 | "}, "+ |
| ... | ... | @@ -1585,8 +1585,8 @@ i3GEO.Interface = { |
| 1585 | 1585 | eval(s); |
| 1586 | 1586 | return i3GEOTileO; |
| 1587 | 1587 | }, |
| 1588 | - insereLayer: function(nomeLayer,indice){ | |
| 1589 | - var i = i3GEO.Interface.googlemaps.criaImageMap(nomeLayer); | |
| 1588 | + insereLayer: function(nomeLayer,indice,cache){ | |
| 1589 | + var i = i3GEO.Interface.googlemaps.criaImageMap(nomeLayer,cache); | |
| 1590 | 1590 | i3GeoMap.overlayMapTypes.insertAt(indice, i); |
| 1591 | 1591 | }, |
| 1592 | 1592 | registraEventos: function(){ | ... | ... |
classesphp/mapa_googlemaps.php
| ... | ... | @@ -95,6 +95,14 @@ $cachedir = $_SESSION["cachedir"]; |
| 95 | 95 | $x = $_GET["X"]; |
| 96 | 96 | $y = $_GET["Y"]; |
| 97 | 97 | $z = $_GET["Z"]; |
| 98 | + | |
| 99 | +$qyfile = dirname($map_fileX)."/".$_GET["layer"].".php"; | |
| 100 | +$qy = file_exists($qyfile); | |
| 101 | + | |
| 102 | +if($qy == false && $_GET["cache"] == "sim" && $_GET["DESLIGACACHE"] != "sim"){ | |
| 103 | + carregaCacheImagem($_SESSION["cachedir"],$_SESSION["map_file"],$_GET["tms"]); | |
| 104 | +} | |
| 105 | + | |
| 98 | 106 | $n = pow(2,$z); |
| 99 | 107 | $lon1 = $x / $n * 360.0 - 180.0; |
| 100 | 108 | $lat2 = rad2deg(atan(sinh(pi() * (1 - 2 * $y / $n)))); |
| ... | ... | @@ -119,8 +127,7 @@ $_GET["mapext"] = str_replace(","," ",$_GET["BBOX"]); |
| 119 | 127 | |
| 120 | 128 | $mapa = ms_newMapObj($map_fileX); |
| 121 | 129 | $ret = $mapa->extent; |
| 122 | -$qyfile = dirname($map_fileX)."/".$_GET["layer"].".php"; | |
| 123 | -$qy = file_exists($qyfile); | |
| 130 | + | |
| 124 | 131 | $cache = false; |
| 125 | 132 | if(!isset($_GET["telaR"])){ |
| 126 | 133 | //no caso de projecoes remotas, o mapfile nao´e alterado |
| ... | ... | @@ -216,8 +223,8 @@ else{ |
| 216 | 223 | foreach ($shp as $indx) |
| 217 | 224 | {$mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} |
| 218 | 225 | $qm = $mapa->querymap; |
| 219 | - $qm->set("width",$map_size[0]); | |
| 220 | - $qm->set("height",$map_size[1]); | |
| 226 | + $qm->set("width",255); | |
| 227 | + $qm->set("height",255); | |
| 221 | 228 | $img = $mapa->drawQuery(); |
| 222 | 229 | } |
| 223 | 230 | else{ | ... | ... |
classesphp/mapa_openlayers.php
| ... | ... | @@ -81,12 +81,19 @@ if(isset($_GET["tms"])){ |
| 81 | 81 | $lat2 = ($y+1) / $n * 180.0 - 90.0; |
| 82 | 82 | $_GET["BBOX"] = $lon1." ".$lat1." ".$lon2." ".$lat2; |
| 83 | 83 | } |
| 84 | -if($_GET["cache"] == "sim" && $_GET["DESLIGACACHE"] != "sim"){ | |
| 84 | +$map_fileX = $_SESSION["map_file"]; | |
| 85 | +// | |
| 86 | +//resolve o problema da seleção na versão nova do mapserver | |
| 87 | +// | |
| 88 | +$qyfile = dirname($map_fileX)."/".$_GET["layer"].".php"; | |
| 89 | +$qy = file_exists($qyfile); | |
| 90 | + | |
| 91 | +if($qy == false && $_GET["cache"] == "sim" && $_GET["DESLIGACACHE"] != "sim"){ | |
| 85 | 92 | carregaCacheImagem($_SESSION["cachedir"],$_SESSION["map_file"],$_GET["tms"]); |
| 86 | 93 | } |
| 87 | 94 | // |
| 88 | 95 | //map_fileX e para o caso register_globals = On no PHP.INI |
| 89 | -$map_fileX = $_SESSION["map_file"]; | |
| 96 | + | |
| 90 | 97 | if(isset($_GET["tipolayer"]) && $_GET["tipolayer"] == "fundo"){ |
| 91 | 98 | $map_fileX = str_replace(".map","fundo.map",$map_fileX); |
| 92 | 99 | } |
| ... | ... | @@ -98,11 +105,7 @@ if(isset($_GET["BBOX"])){ |
| 98 | 105 | } |
| 99 | 106 | $_GET["TIPOIMAGEM"] = trim($_GET["TIPOIMAGEM"]); |
| 100 | 107 | $mapa = ms_newMapObj($map_fileX); |
| 101 | -// | |
| 102 | -//resolve o problema da seleção na versão nova do mapserver | |
| 103 | -// | |
| 104 | -$qyfile = dirname($map_fileX)."/".$_GET["layer"].".php"; | |
| 105 | -$qy = file_exists($qyfile); | |
| 108 | + | |
| 106 | 109 | // |
| 107 | 110 | //processa os layers do mapfile |
| 108 | 111 | // | ... | ... |