From d118176655a93a13b1d2fd25768de24764c8f48f Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Wed, 8 Sep 2010 15:02:37 +0000 Subject: [PATCH] --- classesjs/classe_interface.js | 15 ++++++++------- classesjs/classe_php.js | 23 ++++++++++++++++------- classesjs/datadownload.js | 3 +++ classesphp/classe_analise.php | 40 ++++++++++++++++++++++++++++++---------- classesphp/classe_atributos.php | 2 ++ classesphp/classe_selecao.php | 2 +- classesphp/classe_temas.php | 2 +- classesphp/graficos.php | 6 ++++++ classesphp/mapa_controle.php | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------- ferramentas/convertemapakml/index.js.php | 2 +- ferramentas/convertews/index.js.php | 2 +- ferramentas/gradepol/index.js.php | 1 + ferramentas/nptpol/index.js.php | 9 +++++++-- ferramentas/salvamapa/index.js.php | 12 +++++++++--- ferramentas/selecao/index.js.php | 2 ++ menutemas/admin.db | Bin 66560 -> 0 bytes 16 files changed, 176 insertions(+), 66 deletions(-) diff --git a/classesjs/classe_interface.js b/classesjs/classe_interface.js index b4641b5..225a692 100644 --- a/classesjs/classe_interface.js +++ b/classesjs/classe_interface.js @@ -1379,15 +1379,16 @@ i3GEO.Interface = { var bounds,sw,ne; g_operacao = ""; g_tipoacao = ""; - //bounds = i3GeoMap.getBounds(); sw = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,i3GEO.parametros.h)); ne = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(i3GEO.parametros.w,0)); - //if(bounds){ - //sw = bounds.getSouthWest(); - //ne = bounds.getNorthEast(); - i3GEO.parametros.mapexten = sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat(); - i3GEO.parametros.mapscale = i3GEO.Interface.googlemaps.calcescala(); - //} + i3GEO.parametros.mapexten = sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat(); + i3GEO.parametros.mapscale = i3GEO.Interface.googlemaps.calcescala(); + sw = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1)); + ne = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0)); + + i3GEO.parametros.pixelsize = sw.lng() - ne.lng(); + if(i3GEO.parametros.pixelsize < 0) + {i3GEO.parametros.pixelsize = i3GEO.parametros.pixelsize * -1;} } catch(e){ i3GEO.parametros.mapexten = "0 0 0 0"; diff --git a/classesjs/classe_php.js b/classesjs/classe_php.js index ff19e3d..b6dfb4b 100644 --- a/classesjs/classe_php.js +++ b/classesjs/classe_php.js @@ -503,37 +503,46 @@ i3GEO.php = { /* Function: mudaext + O parâmetro "atualiza" é do tipo booleano e indica se o redesenho do mapa será feito ou não. + + O parâmetro "geo" é do tipo booleano e indica se as coordenadas deverão ser convertidas para geográficas ao serem salvas no mapfile + */ - mudaext: function(funcao,tipoimagem,ext,locaplic,sid){ + mudaext: function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){ var retorno,p; if(arguments.length === 3){ i3GEO.php.verifica(); locaplic = i3GEO.configura.locaplic; sid = i3GEO.configura.sid; + atualiza = true; + geo = false; } + if(geo === 'undefined') + {geo = false;} + if(atualiza === 'undefined') + {atualiza = true;} if(ext === 'undefined') {alert("extensao nao definida");return;} retorno = function(retorno){ if(i3GEO.Interface.ATUAL === "googlemaps"){ - i3GEO.Interface.googlemaps.zoom2extent(ext); - i3GEO.janela.fechaAguarde(); + if(atualiza === true) + {i3GEO.Interface.googlemaps.zoom2extent(ext);} } if(i3GEO.Interface.ATUAL === "googleearth"){ i3GEO.Interface.googleearth.redesenha(); - i3GEO.janela.fechaAguarde(); } if(i3GEO.Interface.ATUAL === "openlayers"){ - i3GEO.Interface.openlayers.zoom2ext(ext); - i3GEO.janela.fechaAguarde(); + i3GEO.Interface.openlayers.zoom2ext(ext); } + i3GEO.janela.fechaAguarde(); // //o try é necessario para não dar erro // try{funcao.call(retorno);} catch(e){} }; - p = locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid; + p = locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo; cpJSON.call(p,"mudaext",retorno); }, /* diff --git a/classesjs/datadownload.js b/classesjs/datadownload.js index a7bab79..907b173 100644 --- a/classesjs/datadownload.js +++ b/classesjs/datadownload.js @@ -304,6 +304,7 @@ function datadownload_download(tema) YAHOO.datadownloadLista.panel.show(); //document.getElementById("corpo").innerHTML = "Aguarde. Gerando arquivos..." var p = g_locaplic+"/classesphp/mapa_controle.php?map_file=&funcao=download3&tema="+tema; + temaEscolhidoDownload = tema; var cp = new cpaint(); //cp.set_debug(2) cp.set_response_type("JSON"); @@ -330,8 +331,10 @@ function mostraDownload(retorno) { ins += ""+arqs[arq]+"
" } + ins += "
Fonte"; if(retorno.nreg) {ins += "

Número de registros ="+retorno.nreg;} + } } else diff --git a/classesphp/classe_analise.php b/classesphp/classe_analise.php index 93297ac..fe96ec3 100644 --- a/classesphp/classe_analise.php +++ b/classesphp/classe_analise.php @@ -42,7 +42,7 @@ class Analise Objeto mapa */ - protected $mapa; + public $mapa; /* Variavel: $arquivo @@ -966,13 +966,13 @@ $locaplic - Localização do I3geo. if ($layerPt->getNumresults() > 0){$existesel = "sim";} if ($existesel == "nao") { + if($layerPt->getProjection() == "" ) + { + if($layerPt->getProjection() == "" ) + {$layerPt->setProjection("init=epsg:4291");} + $layerPt->setProjection("init=epsg:4291"); + } $layerPt->queryByrect($this->mapa->extent); - //$qstring = "/.*/"; - //if($layerPt->connectiontype == MS_POSTGIS) - //{$layerPt->queryByrect($this->mapa->extent);} - //$qstring = $itemspt[0].' ~* \'^.\' '; - //else - //{$layerPt->queryByAttributes($itemspt[0], $qstring, 1);} } $res_count = $layerPt->getNumresults(); $pontos = array(); @@ -1130,6 +1130,8 @@ function distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorig $layerorigem->close(); $layeroverlay->set("tolerance",0); $layerdestino->set("tolerance",0); + if($layeroverlay->getProjection() == "" ) + {$layeroverlay->setProjection("init=epsg:4291");} $layeroverlay->queryByrect($this->mapa->extent); $layerdestino->queryByFeatures($layeroverlay->index); $sopen = $layerdestino->open(); @@ -1861,22 +1863,36 @@ $locaplic - Localização do I3geo {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} else {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} + + if($layerPo->getProjection() == "" ) + {$layerPo->setProjection("init=epsg:4291");} + if($layerPt->getProjection() == "" ) + {$layerPt->setProjection("init=epsg:4291");} + //acrescenta os pontos no novo shapefile $dbname = $nomeshp.".dbf"; $db=xbase_open($dbname,2); $sopen = $layerPo->open(); if($sopen == MS_FAILURE){return "erro";} - $layerPo->whichShapes($this->mapa->extent); - while ($shape = $layerPo->nextShape()) + + $layerPo->querybyrect($this->mapa->extent); + $sopen = $layerPo->open(); + $res_count = $layerPo->getNumresults(); + for ($i = 0; $i < $res_count; ++$i) { + $result = $layerPo->getResult($i); + $shp_index = $result->shapeindex; + $shape = $layerPo->getfeature($shp_index,-1); $novoreg = array(); foreach($itenspo as $ipo) {$novoreg[] = $shape->values[$ipo];} $layerPt->querybyshape($shape); + //echo $layerPt->getNumresults(); $novoreg[] = $layerPt->getNumresults(); $novoshpf->addShape($shape); xbase_add_record($db,$novoreg); } + $fechou = $layerPo->close(); $novoshpf->free(); xbase_close($db); //adiciona o novo tema no mapa @@ -2424,7 +2440,11 @@ function gravaCoordenadasPt($tema,$limitepontos="TRUE",$extendelimite) {$this->mapa->loadquery($this->qyfile);} if ($layerPt->getNumresults() > 0){$existesel = "sim";} if ($existesel == "nao") - {$layerPt->queryByrect($this->mapa->extent);} + { + if($layerPt->getProjection() == "" ) + {$layerPt->setProjection("init=epsg:4291");} + $layerPt->queryByrect($this->mapa->extent); + } $res_count = $layerPt->getNumresults(); $pontos = array(); //pega um shape especifico diff --git a/classesphp/classe_atributos.php b/classesphp/classe_atributos.php index fc303cf..c1180f4 100644 --- a/classesphp/classe_atributos.php +++ b/classesphp/classe_atributos.php @@ -93,6 +93,8 @@ $ext - (opcional) extensão geográfica que será aplicada ao mapa $this->arquivo = $map_file; if($tema != "" && @$this->mapa->getlayerbyname($tema)) $this->layer = $this->mapa->getlayerbyname($tema); + if($this->layer->getProjection() == "" ) + {$this->layer->setProjection("init=epsg:4291");} $this->nome = $tema; if($ext && $ext != ""){ $e = explode(" ",$ext); diff --git a/classesphp/classe_selecao.php b/classesphp/classe_selecao.php index dbd4227..aa07295 100644 --- a/classesphp/classe_selecao.php +++ b/classesphp/classe_selecao.php @@ -43,7 +43,7 @@ class Selecao Objeto mapa */ - protected $mapa; + public $mapa; /* Variavel: $arquivo diff --git a/classesphp/classe_temas.php b/classesphp/classe_temas.php index 724e95d..4133c30 100644 --- a/classesphp/classe_temas.php +++ b/classesphp/classe_temas.php @@ -43,7 +43,7 @@ class Temas Objeto mapa */ - protected $mapa; + public $mapa; /* Variavel: $arquivo diff --git a/classesphp/graficos.php b/classesphp/graficos.php index 67c11ba..515ec37 100644 --- a/classesphp/graficos.php +++ b/classesphp/graficos.php @@ -373,8 +373,14 @@ function iniciaParGrafico($gw,$gh,$res,$dir_tmp,$gfile_name,$margem,$margemexter } function iniciaDadosGrafico($map_file,$tema,$exclui,$itemclasses,$itemvalores,$tipo,$percentual,$ext="") { + global $interface; //pega os valores $map = ms_newMapObj($map_file); + if($interface == "googlemaps") + { + $projMapa = $map->getProjection(); + $map->setProjection("init=epsg:4291"); + } if($ext && $ext != ""){ $e = explode(" ",$ext); $extatual = $map->extent; diff --git a/classesphp/mapa_controle.php b/classesphp/mapa_controle.php index 73d350a..435a3f4 100644 --- a/classesphp/mapa_controle.php +++ b/classesphp/mapa_controle.php @@ -388,9 +388,16 @@ Salva o mapa acrescentando um novo layer com o resultado. */ case "PONTOEMPOLIGONO": include_once("classe_analise.php"); - copiaSeguranca($map_file); + copiaSeguranca($map_file); $m = new Analise($map_file,$tema,$locaplic,$ext); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + } $retorno = $m->pontoEmPoligono($temaPt,$temasPo,$locaplic); + if($interface == "googlemaps") + {$m->mapa->setProjection($projMapa);} $m->salva(); break; /* @@ -406,7 +413,14 @@ Salva o mapa acrescentando um novo layer com o resultado. include_once("classe_analise.php"); copiaSeguranca($map_file); $m = new Analise($map_file,$tema,$locaplic,$ext); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + } $retorno = $m->nptPol($temaPt,$temaPo,$locaplic); + if($interface == "googlemaps") + {$m->mapa->setProjection($projMapa);} $m->salva(); break; /* @@ -442,8 +456,15 @@ São considerados apenas os pontos próximos definidos por um buffer. include_once("classe_analise.php"); copiaSeguranca($map_file); $m = new Analise($map_file,$temaorigem,$locaplic,$ext); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + } $temaoverlay = $m->criaBuffer($distancia,$locaplic); $retorno = $m->distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorigem,$itemdestino); + if($interface == "googlemaps") + {$m->mapa->setProjection($projMapa);} $m->salva(); break; /* @@ -458,8 +479,15 @@ Salva o mapa acrescentando um novo layer com os pontos. case "CRIACENTROIDE": include_once("classe_analise.php"); copiaSeguranca($map_file); - $m = new Analise($map_file,$tema); + $m = new Analise($map_file,$tema,$locaplic); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + } $retorno = $m->criaCentroide($locaplic); + if($interface == "googlemaps") + {$m->mapa->setProjection($projMapa);} $m->salva(); break; /* @@ -477,9 +505,16 @@ Executa script R para gerar a imagem. if(!isset($tema2)) {$tema2 = "";} if(!isset($limitepontos)) - {$limitepontos = "";} + {$limitepontos = "";} $m = new Analise($map_file,$tema,$locaplic,$ext); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + } $retorno = $m->analiseDistriPt($locaplic,$dir_tmp,$R_path,$numclasses,$tipo,$cori,$corf,$tmpurl,$sigma,$limitepontos,$tema2,$extendelimite); + if($interface == "googlemaps") + {$m->mapa->setProjection($projMapa);} $m->salva(); break; /* @@ -559,7 +594,6 @@ Reinicia um mapa restaurando a cópia de segurança. $qyfile = str_replace(".map",".qy",$map_file); if (file_exists($qyfile)) {unlink ($qyfile);} - unlink($map_file); copy(str_replace(".map","reinc.map",$map_file),$map_file); $retorno = "ok"; @@ -573,13 +607,10 @@ Recupera o mapfile de segurança. $qyfile = str_replace(".map",".qy",$map_file); if (file_exists($qyfile)) {unlink ($qyfile);} - unlink($map_file); $nmf = str_replace(".map","seguranca.map",$map_file); if(file_exists($nmf)) - { - copy($nmf,$map_file); - } + {copy($nmf,$map_file);} else { $nmf = str_replace(".map","reinc.map",$map_file); @@ -948,7 +979,7 @@ Gera a imagem do mapa de referência. $objMapa = ms_newMapObj($map_file); $nomeImagem = nomeRandomico(); if(!isset($ext)) - {$ext = "";} + {$ext = "";} $retorno = retornaReferencia($ext); break; /* @@ -960,7 +991,7 @@ Gera a imagem do mapa de referência de forma dinâmica, variando com a escala do //$objMapa = ms_newMapObj($map_file); $nomeImagem = nomeRandomico(); if(!isset($ext)) - {$ext = "";} + {$ext = "";} $retorno = retornaReferenciaDinamica($ext); break; /* @@ -1051,9 +1082,7 @@ Gera uma imagem que será utilizada para destacar um determinado tema. geraDestaque> */ case "GERADESTAQUE": - include_once("classe_temas.php"); - if(isset($ext) && $ext != "" && $interface == "googlemaps") - {$ext = projetaExt($map_file,$ext);} + include_once("classe_temas.php"); $m = new Temas($map_file,$tema,"",$ext); $retorno = $m->geraDestaque(); break; @@ -1283,8 +1312,15 @@ Gera graficos automaticamente para os elementos de um tema case "GRAFICOTEMA": include_once("classe_temas.php"); copiaSeguranca($map_file); - $m = new Temas($map_file,$tema); + $m = new Temas($map_file,$tema,$locaplic); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + } $m->graficotema($lista,$tamanho,$tipo,$outlinecolor,$offset); + if($interface == "googlemaps") + {$m->mapa->setProjection($projMapa);} $m->salva(); redesenhaMapa(); break; @@ -1303,8 +1339,6 @@ Altera uma classe de um tema, aplicando uma nova classificação ou modificando pa case "ALTERACLASSE": include_once("classe_alteraclasse.php"); copiaSeguranca($map_file); - if(isset($ext) && $ext != "" && $interface == "googlemaps") - {$ext = projetaExt($map_file,$ext);} $m = new Alteraclasse($map_file,$tema,"",$ext); if ($opcao == "adicionaclasse") {$retorno = $m->adicionaclasse();} @@ -1519,8 +1553,6 @@ Pega os dados necessários para a geração dos gráficos da ferramenta seleção */ case "GRAFICOSELECAO": include_once("graficos.php"); - if(isset($ext) && $ext != "" && $interface == "googlemaps") - {$ext = projetaExt($map_file,$ext);} if(!isset($exclui)) {$exclui = "";} if(!isset($tipo)) @@ -1628,8 +1660,6 @@ Pega os dados de um tema para geração do gráfico de linha do tempo. */ case "DADOSLINHADOTEMPO": include_once("graficos.php"); - if(isset($ext) && $ext != "" && $interface == "googlemaps") - {$ext = projetaExt($map_file,$ext);} if(!isset($ext)) {$ext = "";} $retorno = dadosLinhaDoTempo($map_file,$tema,$ext); @@ -1937,8 +1967,6 @@ Procura valores em uma tabela que aderem a uma palavra de busca. case "LISTAVALORESITENS": include_once("classe_atributos.php"); if(!isset($tema)){$tema = "";} - if(isset($ext) && $ext != "" && $interface == "googlemaps") - {$ext = projetaExt($map_file,$ext);} $m = new Atributos($map_file,$tema,"",$ext); $retorno = $m->buscaRegistros($palavra,$lista,$tipo,$onde); break; @@ -2026,9 +2054,9 @@ Pega todos os valores dos itens de uma tabela de um tema. listaRegistros> */ case "LISTAREGISTROS": - if(isset($ext) && $ext != "" && $interface == "googlemaps") - {$ext = projetaExt($map_file,$ext);} include_once("classe_atributos.php"); + if(isset($ext) && $ext != "" && $interface == "googlemaps" && $geo == false) + {$ext = projetaExt($map_file,$ext);} $m = new Atributos($map_file,$tema,"",$ext); if(!isset($tipo)){$tipo = "";} if(!isset($inicio)){$inicio = 0;} @@ -2086,9 +2114,12 @@ Muda a extensão geográfica do mapa. case "MUDAEXT": include_once("classe_navegacao.php"); copiaSeguranca($map_file); - if (!isset($ext) || $ext == "" || $ext == " "){$ext="-76.512593 -39.392568 -29.585185 9.490149";} + if (!isset($ext) || $ext == "" || $ext == " ") + {$ext="-76.512593 -39.392568 -29.585185 9.490149";} + if(!isset($geo)) + {$geo = false;} $m = new Navegacao($map_file); - if(isset($ext) && $ext != "" && $interface == "googlemaps") + if(isset($ext) && $ext != "" && $interface == "googlemaps" && $geo == false) {$ext = projetaExt($map_file,$ext);} $m->mudaExtensao($ext); $m->salva(); @@ -2436,9 +2467,13 @@ Seleciona elementos utilizando um ponto. foreach($temas as $tema) { $m = new Selecao($map_file,$tema,$ext); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + } $ok[] = $m->selecaoPT($xy,$tipo,$tolerancia); } - //$retorno = implode(",",$ok); redesenhaMapa(); break; /* @@ -2454,7 +2489,12 @@ Seleciona elementos utilizando a extensão do mapa. $temas = explode(",",$tema); foreach($temas as $tema) { - $m = new Selecao($map_file,$tema); + $m = new Selecao($map_file,$tema,$ext); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + } $ok[] = $m->selecaoEXT($tipo); } //$retorno = implode(",",$ok); @@ -2474,10 +2514,14 @@ Seleciona elementos utilizando um retângulo. foreach($temas as $tema) { $m = new Selecao($map_file,$tema); - if(isset($ext) && $ext != "" && $interface == "googlemaps") - {$ext = projetaExt($map_file,$ext);} + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + } $ok[] = $m->selecaoBOX($tipo,$ext); } + redesenhaMapa(); break; @@ -2491,7 +2535,7 @@ Seleciona elementos com base nos atributos. case "SELECAOATRIB": include_once("classe_selecao.php"); copiaSeguranca($map_file); - $m = new Selecao($map_file,$tema); + $m = new Selecao($map_file,$tema,$ext); $retorno = $m->selecaoAtributos($tipo,$item,$operador,$valor); redesenhaMapa(); break; @@ -2505,7 +2549,7 @@ Seleciona elementos com base nos atributos utilizando sintaxe complexa. case "SELECAOATRIB2": include_once("classe_selecao.php"); copiaSeguranca($map_file); - $m = new Selecao($map_file,$tema); + $m = new Selecao($map_file,$tema,$ext); $retorno = $m->selecaoAtributos2($filtro,$tipo); redesenhaMapa(); break; @@ -2523,6 +2567,11 @@ Sleciona elementos de um tema com base em outro tema. foreach($temas as $tema) { $m = new Selecao($map_file,$tema); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + } $ok[] = $m->selecaoTema($temao,$tipo); } $retorno = implode(",",$ok); @@ -2745,7 +2794,6 @@ Return: function projetaExt($map_file,$ext,$separador=" ") { $ext = str_replace($separador," ",$ext); - $extA = explode(" ",$ext); $mapa = ms_newMapObj($map_file); $ponto = false; @@ -2802,7 +2850,14 @@ function selecaoPoli($xs,$ys,$tema,$tipo) foreach($temas as $tema) { $m = new Selecao($map_file,$tema); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + } $ok[] = $m->selecaoPorPoligono($tipo,$xs,$ys); + if($interface == "googlemaps") + {$m->mapa->setProjection($projMapa);} $m->salva(); } return implode(",",$ok); diff --git a/ferramentas/convertemapakml/index.js.php b/ferramentas/convertemapakml/index.js.php index e99def5..6d63596 100644 --- a/ferramentas/convertemapakml/index.js.php +++ b/ferramentas/convertemapakml/index.js.php @@ -81,7 +81,7 @@ i3GEOF.converteMapaKml = { titulo = "Kml    "; janela = i3GEO.janela.cria( "440px", - "305px", + "315px", "", "", "", diff --git a/ferramentas/convertews/index.js.php b/ferramentas/convertews/index.js.php index 6f3d90b..a9b7b81 100644 --- a/ferramentas/convertews/index.js.php +++ b/ferramentas/convertews/index.js.php @@ -91,7 +91,7 @@ i3GEOF.converteMapaWS = { titulo = "WMS    "; janela = i3GEO.janela.cria( "440px", - "280px", + "290px", "", "", "", diff --git a/ferramentas/gradepol/index.js.php b/ferramentas/gradepol/index.js.php index 9aa96b3..f4cd00a 100644 --- a/ferramentas/gradepol/index.js.php +++ b/ferramentas/gradepol/index.js.php @@ -147,6 +147,7 @@ i3GEOF.gradeDePoligonos = { ins += "Segundo"; g_tipoacao = "capturaponto"; i3GEO.util.proximoAnterior("i3GEOF.gradeDePoligonos.t1()","i3GEOF.gradeDePoligonos.t3()",ins,"i3GEOF.gradeDePoligonos.t2","i3GEOgradedepoligonosresultado"); + if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEOF.gradeDePoligonos.capturaPonto()") < 0) {i3GEO.eventos.MOUSECLIQUE.push("i3GEOF.gradeDePoligonos.capturaPonto()");} temp = function(){ diff --git a/ferramentas/nptpol/index.js.php b/ferramentas/nptpol/index.js.php index 6320b93..b381bf5 100644 --- a/ferramentas/nptpol/index.js.php +++ b/ferramentas/nptpol/index.js.php @@ -158,8 +158,13 @@ i3GEOF.nptpol = { else {i3GEO.atualiza();} i3GEOF.nptpol.aguarde.visibility = "hidden"; - }; - p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=nptPol&temaPt="+$i("i3GEOnptpolPontos").value+"&temaPo="+$i("i3GEOnptpolPoligonos").value+"&ext="+i3GEO.parametros.mapexten; + }, + ext; + if(i3GEO.Interface.ATUAL === "googlemaps") + {ext = i3GEO.Interface.googlemaps.bbox();} + else + {ext = i3GEO.parametros.mapexten;} + p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=nptPol&temaPt="+$i("i3GEOnptpolPontos").value+"&temaPo="+$i("i3GEOnptpolPoligonos").value+"&ext="+ext; cp = new cpaint(); cp.set_response_type("JSON"); cp.call(p,"nptpol",fim); diff --git a/ferramentas/salvamapa/index.js.php b/ferramentas/salvamapa/index.js.php index 5dddf2f..405dfd8 100644 --- a/ferramentas/salvamapa/index.js.php +++ b/ferramentas/salvamapa/index.js.php @@ -58,12 +58,18 @@ i3GEOF.salvaMapa = { try{ var map_file = i3GEO.parametros.mapfile, local = map_file.split("ms_tmp"); - local = window.location.protocol+"//"+window.location.host+"/ms_tmp"+local[1]; + local = i3GEO.util.protocolo()+"://"+window.location.host+"/ms_tmp"+local[1]; $i(iddiv).innerHTML += i3GEOF.salvaMapa.html()+"Clique aqui para baixar o arquivo"; } catch(erro){alert(erro);} - }; - i3GEO.php.mudaext(temp,"nenhum",i3GEO.parametros.mapexten); + }, + atualiza = true, + geo = false; + if(i3GEO.Interface.ATUAL === "googlemaps"){ + atualiza = false; + geo = true; + } + i3GEO.php.mudaext(temp,"nenhum",i3GEO.parametros.mapexten,i3GEO.configura.locaplic,i3GEO.configura.sid,atualiza,geo); }, /* Function: html diff --git a/ferramentas/selecao/index.js.php b/ferramentas/selecao/index.js.php index 946946c..bfbcb5a 100644 --- a/ferramentas/selecao/index.js.php +++ b/ferramentas/selecao/index.js.php @@ -241,6 +241,8 @@ i3GEOF.selecao = { var i = $i("i3GEOF.selecao_c").style; i3GEO.janela.ULTIMOZINDEX++; i.zIndex = 10000 + i3GEO.janela.ULTIMOZINDEX; + if(i3GEO.Interface.ATUAL == "googlemaps") + {i3GEO.Interface.googlemaps.recalcPar();} }, /* Function: mudaicone diff --git a/menutemas/admin.db b/menutemas/admin.db index 5add1a4..4a441b0 100644 Binary files a/menutemas/admin.db and b/menutemas/admin.db differ -- libgit2 0.21.2