Commit d118176655a93a13b1d2fd25768de24764c8f48f
1 parent
4c3b171d
Exists in
master
and in
7 other branches
--no commit message
Showing
16 changed files
with
176 additions
and
66 deletions
Show diff stats
classesjs/classe_interface.js
@@ -1379,15 +1379,16 @@ i3GEO.Interface = { | @@ -1379,15 +1379,16 @@ i3GEO.Interface = { | ||
1379 | var bounds,sw,ne; | 1379 | var bounds,sw,ne; |
1380 | g_operacao = ""; | 1380 | g_operacao = ""; |
1381 | g_tipoacao = ""; | 1381 | g_tipoacao = ""; |
1382 | - //bounds = i3GeoMap.getBounds(); | ||
1383 | sw = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,i3GEO.parametros.h)); | 1382 | sw = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,i3GEO.parametros.h)); |
1384 | ne = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(i3GEO.parametros.w,0)); | 1383 | ne = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(i3GEO.parametros.w,0)); |
1385 | - //if(bounds){ | ||
1386 | - //sw = bounds.getSouthWest(); | ||
1387 | - //ne = bounds.getNorthEast(); | ||
1388 | - i3GEO.parametros.mapexten = sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat(); | ||
1389 | - i3GEO.parametros.mapscale = i3GEO.Interface.googlemaps.calcescala(); | ||
1390 | - //} | 1384 | + i3GEO.parametros.mapexten = sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat(); |
1385 | + i3GEO.parametros.mapscale = i3GEO.Interface.googlemaps.calcescala(); | ||
1386 | + sw = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1)); | ||
1387 | + ne = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0)); | ||
1388 | + | ||
1389 | + i3GEO.parametros.pixelsize = sw.lng() - ne.lng(); | ||
1390 | + if(i3GEO.parametros.pixelsize < 0) | ||
1391 | + {i3GEO.parametros.pixelsize = i3GEO.parametros.pixelsize * -1;} | ||
1391 | } | 1392 | } |
1392 | catch(e){ | 1393 | catch(e){ |
1393 | i3GEO.parametros.mapexten = "0 0 0 0"; | 1394 | i3GEO.parametros.mapexten = "0 0 0 0"; |
classesjs/classe_php.js
@@ -503,37 +503,46 @@ i3GEO.php = { | @@ -503,37 +503,46 @@ i3GEO.php = { | ||
503 | /* | 503 | /* |
504 | Function: mudaext | 504 | Function: mudaext |
505 | 505 | ||
506 | + O parâmetro "atualiza" é do tipo booleano e indica se o redesenho do mapa será feito ou não. | ||
507 | + | ||
508 | + O parâmetro "geo" é do tipo booleano e indica se as coordenadas deverão ser convertidas para geográficas ao serem salvas no mapfile | ||
509 | + | ||
506 | <MUDAEXT> | 510 | <MUDAEXT> |
507 | */ | 511 | */ |
508 | - mudaext: function(funcao,tipoimagem,ext,locaplic,sid){ | 512 | + mudaext: function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){ |
509 | var retorno,p; | 513 | var retorno,p; |
510 | if(arguments.length === 3){ | 514 | if(arguments.length === 3){ |
511 | i3GEO.php.verifica(); | 515 | i3GEO.php.verifica(); |
512 | locaplic = i3GEO.configura.locaplic; | 516 | locaplic = i3GEO.configura.locaplic; |
513 | sid = i3GEO.configura.sid; | 517 | sid = i3GEO.configura.sid; |
518 | + atualiza = true; | ||
519 | + geo = false; | ||
514 | } | 520 | } |
521 | + if(geo === 'undefined') | ||
522 | + {geo = false;} | ||
523 | + if(atualiza === 'undefined') | ||
524 | + {atualiza = true;} | ||
515 | if(ext === 'undefined') | 525 | if(ext === 'undefined') |
516 | {alert("extensao nao definida");return;} | 526 | {alert("extensao nao definida");return;} |
517 | retorno = function(retorno){ | 527 | retorno = function(retorno){ |
518 | if(i3GEO.Interface.ATUAL === "googlemaps"){ | 528 | if(i3GEO.Interface.ATUAL === "googlemaps"){ |
519 | - i3GEO.Interface.googlemaps.zoom2extent(ext); | ||
520 | - i3GEO.janela.fechaAguarde(); | 529 | + if(atualiza === true) |
530 | + {i3GEO.Interface.googlemaps.zoom2extent(ext);} | ||
521 | } | 531 | } |
522 | if(i3GEO.Interface.ATUAL === "googleearth"){ | 532 | if(i3GEO.Interface.ATUAL === "googleearth"){ |
523 | i3GEO.Interface.googleearth.redesenha(); | 533 | i3GEO.Interface.googleearth.redesenha(); |
524 | - i3GEO.janela.fechaAguarde(); | ||
525 | } | 534 | } |
526 | if(i3GEO.Interface.ATUAL === "openlayers"){ | 535 | if(i3GEO.Interface.ATUAL === "openlayers"){ |
527 | - i3GEO.Interface.openlayers.zoom2ext(ext); | ||
528 | - i3GEO.janela.fechaAguarde(); | 536 | + i3GEO.Interface.openlayers.zoom2ext(ext); |
529 | } | 537 | } |
538 | + i3GEO.janela.fechaAguarde(); | ||
530 | // | 539 | // |
531 | //o try é necessario para não dar erro | 540 | //o try é necessario para não dar erro |
532 | // | 541 | // |
533 | try{funcao.call(retorno);} | 542 | try{funcao.call(retorno);} |
534 | catch(e){} | 543 | catch(e){} |
535 | }; | 544 | }; |
536 | - p = locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid; | 545 | + p = locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo; |
537 | cpJSON.call(p,"mudaext",retorno); | 546 | cpJSON.call(p,"mudaext",retorno); |
538 | }, | 547 | }, |
539 | /* | 548 | /* |
classesjs/datadownload.js
@@ -304,6 +304,7 @@ function datadownload_download(tema) | @@ -304,6 +304,7 @@ function datadownload_download(tema) | ||
304 | YAHOO.datadownloadLista.panel.show(); | 304 | YAHOO.datadownloadLista.panel.show(); |
305 | //document.getElementById("corpo").innerHTML = "Aguarde. Gerando arquivos..." | 305 | //document.getElementById("corpo").innerHTML = "Aguarde. Gerando arquivos..." |
306 | var p = g_locaplic+"/classesphp/mapa_controle.php?map_file=&funcao=download3&tema="+tema; | 306 | var p = g_locaplic+"/classesphp/mapa_controle.php?map_file=&funcao=download3&tema="+tema; |
307 | + temaEscolhidoDownload = tema; | ||
307 | var cp = new cpaint(); | 308 | var cp = new cpaint(); |
308 | //cp.set_debug(2) | 309 | //cp.set_debug(2) |
309 | cp.set_response_type("JSON"); | 310 | cp.set_response_type("JSON"); |
@@ -330,8 +331,10 @@ function mostraDownload(retorno) | @@ -330,8 +331,10 @@ function mostraDownload(retorno) | ||
330 | { | 331 | { |
331 | ins += "<a href='"+window.location.protocol+"//"+window.location.host+"/"+arqs[arq]+"'>"+arqs[arq]+"</a><br>" | 332 | ins += "<a href='"+window.location.protocol+"//"+window.location.host+"/"+arqs[arq]+"'>"+arqs[arq]+"</a><br>" |
332 | } | 333 | } |
334 | + ins += "<br><a href='"+g_locaplic+"/fontetema.php?tema="+temaEscolhidoDownload+"' target=blank >Fonte</a>"; | ||
333 | if(retorno.nreg) | 335 | if(retorno.nreg) |
334 | {ins += "<br><br>Número de registros ="+retorno.nreg;} | 336 | {ins += "<br><br>Número de registros ="+retorno.nreg;} |
337 | + | ||
335 | } | 338 | } |
336 | } | 339 | } |
337 | else | 340 | else |
classesphp/classe_analise.php
@@ -42,7 +42,7 @@ class Analise | @@ -42,7 +42,7 @@ class Analise | ||
42 | 42 | ||
43 | Objeto mapa | 43 | Objeto mapa |
44 | */ | 44 | */ |
45 | - protected $mapa; | 45 | + public $mapa; |
46 | /* | 46 | /* |
47 | Variavel: $arquivo | 47 | Variavel: $arquivo |
48 | 48 | ||
@@ -966,13 +966,13 @@ $locaplic - Localização do I3geo. | @@ -966,13 +966,13 @@ $locaplic - Localização do I3geo. | ||
966 | if ($layerPt->getNumresults() > 0){$existesel = "sim";} | 966 | if ($layerPt->getNumresults() > 0){$existesel = "sim";} |
967 | if ($existesel == "nao") | 967 | if ($existesel == "nao") |
968 | { | 968 | { |
969 | + if($layerPt->getProjection() == "" ) | ||
970 | + { | ||
971 | + if($layerPt->getProjection() == "" ) | ||
972 | + {$layerPt->setProjection("init=epsg:4291");} | ||
973 | + $layerPt->setProjection("init=epsg:4291"); | ||
974 | + } | ||
969 | $layerPt->queryByrect($this->mapa->extent); | 975 | $layerPt->queryByrect($this->mapa->extent); |
970 | - //$qstring = "/.*/"; | ||
971 | - //if($layerPt->connectiontype == MS_POSTGIS) | ||
972 | - //{$layerPt->queryByrect($this->mapa->extent);} | ||
973 | - //$qstring = $itemspt[0].' ~* \'^.\' '; | ||
974 | - //else | ||
975 | - //{$layerPt->queryByAttributes($itemspt[0], $qstring, 1);} | ||
976 | } | 976 | } |
977 | $res_count = $layerPt->getNumresults(); | 977 | $res_count = $layerPt->getNumresults(); |
978 | $pontos = array(); | 978 | $pontos = array(); |
@@ -1130,6 +1130,8 @@ function distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorig | @@ -1130,6 +1130,8 @@ function distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorig | ||
1130 | $layerorigem->close(); | 1130 | $layerorigem->close(); |
1131 | $layeroverlay->set("tolerance",0); | 1131 | $layeroverlay->set("tolerance",0); |
1132 | $layerdestino->set("tolerance",0); | 1132 | $layerdestino->set("tolerance",0); |
1133 | + if($layeroverlay->getProjection() == "" ) | ||
1134 | + {$layeroverlay->setProjection("init=epsg:4291");} | ||
1133 | $layeroverlay->queryByrect($this->mapa->extent); | 1135 | $layeroverlay->queryByrect($this->mapa->extent); |
1134 | $layerdestino->queryByFeatures($layeroverlay->index); | 1136 | $layerdestino->queryByFeatures($layeroverlay->index); |
1135 | $sopen = $layerdestino->open(); | 1137 | $sopen = $layerdestino->open(); |
@@ -1861,22 +1863,36 @@ $locaplic - Localização do I3geo | @@ -1861,22 +1863,36 @@ $locaplic - Localização do I3geo | ||
1861 | {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | 1863 | {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} |
1862 | else | 1864 | else |
1863 | {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | 1865 | {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} |
1866 | + | ||
1867 | + if($layerPo->getProjection() == "" ) | ||
1868 | + {$layerPo->setProjection("init=epsg:4291");} | ||
1869 | + if($layerPt->getProjection() == "" ) | ||
1870 | + {$layerPt->setProjection("init=epsg:4291");} | ||
1871 | + | ||
1864 | //acrescenta os pontos no novo shapefile | 1872 | //acrescenta os pontos no novo shapefile |
1865 | $dbname = $nomeshp.".dbf"; | 1873 | $dbname = $nomeshp.".dbf"; |
1866 | $db=xbase_open($dbname,2); | 1874 | $db=xbase_open($dbname,2); |
1867 | $sopen = $layerPo->open(); | 1875 | $sopen = $layerPo->open(); |
1868 | if($sopen == MS_FAILURE){return "erro";} | 1876 | if($sopen == MS_FAILURE){return "erro";} |
1869 | - $layerPo->whichShapes($this->mapa->extent); | ||
1870 | - while ($shape = $layerPo->nextShape()) | 1877 | + |
1878 | + $layerPo->querybyrect($this->mapa->extent); | ||
1879 | + $sopen = $layerPo->open(); | ||
1880 | + $res_count = $layerPo->getNumresults(); | ||
1881 | + for ($i = 0; $i < $res_count; ++$i) | ||
1871 | { | 1882 | { |
1883 | + $result = $layerPo->getResult($i); | ||
1884 | + $shp_index = $result->shapeindex; | ||
1885 | + $shape = $layerPo->getfeature($shp_index,-1); | ||
1872 | $novoreg = array(); | 1886 | $novoreg = array(); |
1873 | foreach($itenspo as $ipo) | 1887 | foreach($itenspo as $ipo) |
1874 | {$novoreg[] = $shape->values[$ipo];} | 1888 | {$novoreg[] = $shape->values[$ipo];} |
1875 | $layerPt->querybyshape($shape); | 1889 | $layerPt->querybyshape($shape); |
1890 | + //echo $layerPt->getNumresults(); | ||
1876 | $novoreg[] = $layerPt->getNumresults(); | 1891 | $novoreg[] = $layerPt->getNumresults(); |
1877 | $novoshpf->addShape($shape); | 1892 | $novoshpf->addShape($shape); |
1878 | xbase_add_record($db,$novoreg); | 1893 | xbase_add_record($db,$novoreg); |
1879 | } | 1894 | } |
1895 | + $fechou = $layerPo->close(); | ||
1880 | $novoshpf->free(); | 1896 | $novoshpf->free(); |
1881 | xbase_close($db); | 1897 | xbase_close($db); |
1882 | //adiciona o novo tema no mapa | 1898 | //adiciona o novo tema no mapa |
@@ -2424,7 +2440,11 @@ function gravaCoordenadasPt($tema,$limitepontos="TRUE",$extendelimite) | @@ -2424,7 +2440,11 @@ function gravaCoordenadasPt($tema,$limitepontos="TRUE",$extendelimite) | ||
2424 | {$this->mapa->loadquery($this->qyfile);} | 2440 | {$this->mapa->loadquery($this->qyfile);} |
2425 | if ($layerPt->getNumresults() > 0){$existesel = "sim";} | 2441 | if ($layerPt->getNumresults() > 0){$existesel = "sim";} |
2426 | if ($existesel == "nao") | 2442 | if ($existesel == "nao") |
2427 | - {$layerPt->queryByrect($this->mapa->extent);} | 2443 | + { |
2444 | + if($layerPt->getProjection() == "" ) | ||
2445 | + {$layerPt->setProjection("init=epsg:4291");} | ||
2446 | + $layerPt->queryByrect($this->mapa->extent); | ||
2447 | + } | ||
2428 | $res_count = $layerPt->getNumresults(); | 2448 | $res_count = $layerPt->getNumresults(); |
2429 | $pontos = array(); | 2449 | $pontos = array(); |
2430 | //pega um shape especifico | 2450 | //pega um shape especifico |
classesphp/classe_atributos.php
@@ -93,6 +93,8 @@ $ext - (opcional) extensão geográfica que será aplicada ao mapa | @@ -93,6 +93,8 @@ $ext - (opcional) extensão geográfica que será aplicada ao mapa | ||
93 | $this->arquivo = $map_file; | 93 | $this->arquivo = $map_file; |
94 | if($tema != "" && @$this->mapa->getlayerbyname($tema)) | 94 | if($tema != "" && @$this->mapa->getlayerbyname($tema)) |
95 | $this->layer = $this->mapa->getlayerbyname($tema); | 95 | $this->layer = $this->mapa->getlayerbyname($tema); |
96 | + if($this->layer->getProjection() == "" ) | ||
97 | + {$this->layer->setProjection("init=epsg:4291");} | ||
96 | $this->nome = $tema; | 98 | $this->nome = $tema; |
97 | if($ext && $ext != ""){ | 99 | if($ext && $ext != ""){ |
98 | $e = explode(" ",$ext); | 100 | $e = explode(" ",$ext); |
classesphp/classe_selecao.php
classesphp/classe_temas.php
classesphp/graficos.php
@@ -373,8 +373,14 @@ function iniciaParGrafico($gw,$gh,$res,$dir_tmp,$gfile_name,$margem,$margemexter | @@ -373,8 +373,14 @@ function iniciaParGrafico($gw,$gh,$res,$dir_tmp,$gfile_name,$margem,$margemexter | ||
373 | } | 373 | } |
374 | function iniciaDadosGrafico($map_file,$tema,$exclui,$itemclasses,$itemvalores,$tipo,$percentual,$ext="") | 374 | function iniciaDadosGrafico($map_file,$tema,$exclui,$itemclasses,$itemvalores,$tipo,$percentual,$ext="") |
375 | { | 375 | { |
376 | + global $interface; | ||
376 | //pega os valores | 377 | //pega os valores |
377 | $map = ms_newMapObj($map_file); | 378 | $map = ms_newMapObj($map_file); |
379 | + if($interface == "googlemaps") | ||
380 | + { | ||
381 | + $projMapa = $map->getProjection(); | ||
382 | + $map->setProjection("init=epsg:4291"); | ||
383 | + } | ||
378 | if($ext && $ext != ""){ | 384 | if($ext && $ext != ""){ |
379 | $e = explode(" ",$ext); | 385 | $e = explode(" ",$ext); |
380 | $extatual = $map->extent; | 386 | $extatual = $map->extent; |
classesphp/mapa_controle.php
@@ -388,9 +388,16 @@ Salva o mapa acrescentando um novo layer com o resultado. | @@ -388,9 +388,16 @@ Salva o mapa acrescentando um novo layer com o resultado. | ||
388 | */ | 388 | */ |
389 | case "PONTOEMPOLIGONO": | 389 | case "PONTOEMPOLIGONO": |
390 | include_once("classe_analise.php"); | 390 | include_once("classe_analise.php"); |
391 | - copiaSeguranca($map_file); | 391 | + copiaSeguranca($map_file); |
392 | $m = new Analise($map_file,$tema,$locaplic,$ext); | 392 | $m = new Analise($map_file,$tema,$locaplic,$ext); |
393 | + if($interface == "googlemaps") | ||
394 | + { | ||
395 | + $projMapa = $m->mapa->getProjection(); | ||
396 | + $m->mapa->setProjection("init=epsg:4291"); | ||
397 | + } | ||
393 | $retorno = $m->pontoEmPoligono($temaPt,$temasPo,$locaplic); | 398 | $retorno = $m->pontoEmPoligono($temaPt,$temasPo,$locaplic); |
399 | + if($interface == "googlemaps") | ||
400 | + {$m->mapa->setProjection($projMapa);} | ||
394 | $m->salva(); | 401 | $m->salva(); |
395 | break; | 402 | break; |
396 | /* | 403 | /* |
@@ -406,7 +413,14 @@ Salva o mapa acrescentando um novo layer com o resultado. | @@ -406,7 +413,14 @@ Salva o mapa acrescentando um novo layer com o resultado. | ||
406 | include_once("classe_analise.php"); | 413 | include_once("classe_analise.php"); |
407 | copiaSeguranca($map_file); | 414 | copiaSeguranca($map_file); |
408 | $m = new Analise($map_file,$tema,$locaplic,$ext); | 415 | $m = new Analise($map_file,$tema,$locaplic,$ext); |
416 | + if($interface == "googlemaps") | ||
417 | + { | ||
418 | + $projMapa = $m->mapa->getProjection(); | ||
419 | + $m->mapa->setProjection("init=epsg:4291"); | ||
420 | + } | ||
409 | $retorno = $m->nptPol($temaPt,$temaPo,$locaplic); | 421 | $retorno = $m->nptPol($temaPt,$temaPo,$locaplic); |
422 | + if($interface == "googlemaps") | ||
423 | + {$m->mapa->setProjection($projMapa);} | ||
410 | $m->salva(); | 424 | $m->salva(); |
411 | break; | 425 | break; |
412 | /* | 426 | /* |
@@ -442,8 +456,15 @@ São considerados apenas os pontos próximos definidos por um buffer. | @@ -442,8 +456,15 @@ São considerados apenas os pontos próximos definidos por um buffer. | ||
442 | include_once("classe_analise.php"); | 456 | include_once("classe_analise.php"); |
443 | copiaSeguranca($map_file); | 457 | copiaSeguranca($map_file); |
444 | $m = new Analise($map_file,$temaorigem,$locaplic,$ext); | 458 | $m = new Analise($map_file,$temaorigem,$locaplic,$ext); |
459 | + if($interface == "googlemaps") | ||
460 | + { | ||
461 | + $projMapa = $m->mapa->getProjection(); | ||
462 | + $m->mapa->setProjection("init=epsg:4291"); | ||
463 | + } | ||
445 | $temaoverlay = $m->criaBuffer($distancia,$locaplic); | 464 | $temaoverlay = $m->criaBuffer($distancia,$locaplic); |
446 | $retorno = $m->distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorigem,$itemdestino); | 465 | $retorno = $m->distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorigem,$itemdestino); |
466 | + if($interface == "googlemaps") | ||
467 | + {$m->mapa->setProjection($projMapa);} | ||
447 | $m->salva(); | 468 | $m->salva(); |
448 | break; | 469 | break; |
449 | /* | 470 | /* |
@@ -458,8 +479,15 @@ Salva o mapa acrescentando um novo layer com os pontos. | @@ -458,8 +479,15 @@ Salva o mapa acrescentando um novo layer com os pontos. | ||
458 | case "CRIACENTROIDE": | 479 | case "CRIACENTROIDE": |
459 | include_once("classe_analise.php"); | 480 | include_once("classe_analise.php"); |
460 | copiaSeguranca($map_file); | 481 | copiaSeguranca($map_file); |
461 | - $m = new Analise($map_file,$tema); | 482 | + $m = new Analise($map_file,$tema,$locaplic); |
483 | + if($interface == "googlemaps") | ||
484 | + { | ||
485 | + $projMapa = $m->mapa->getProjection(); | ||
486 | + $m->mapa->setProjection("init=epsg:4291"); | ||
487 | + } | ||
462 | $retorno = $m->criaCentroide($locaplic); | 488 | $retorno = $m->criaCentroide($locaplic); |
489 | + if($interface == "googlemaps") | ||
490 | + {$m->mapa->setProjection($projMapa);} | ||
463 | $m->salva(); | 491 | $m->salva(); |
464 | break; | 492 | break; |
465 | /* | 493 | /* |
@@ -477,9 +505,16 @@ Executa script R para gerar a imagem. | @@ -477,9 +505,16 @@ Executa script R para gerar a imagem. | ||
477 | if(!isset($tema2)) | 505 | if(!isset($tema2)) |
478 | {$tema2 = "";} | 506 | {$tema2 = "";} |
479 | if(!isset($limitepontos)) | 507 | if(!isset($limitepontos)) |
480 | - {$limitepontos = "";} | 508 | + {$limitepontos = "";} |
481 | $m = new Analise($map_file,$tema,$locaplic,$ext); | 509 | $m = new Analise($map_file,$tema,$locaplic,$ext); |
510 | + if($interface == "googlemaps") | ||
511 | + { | ||
512 | + $projMapa = $m->mapa->getProjection(); | ||
513 | + $m->mapa->setProjection("init=epsg:4291"); | ||
514 | + } | ||
482 | $retorno = $m->analiseDistriPt($locaplic,$dir_tmp,$R_path,$numclasses,$tipo,$cori,$corf,$tmpurl,$sigma,$limitepontos,$tema2,$extendelimite); | 515 | $retorno = $m->analiseDistriPt($locaplic,$dir_tmp,$R_path,$numclasses,$tipo,$cori,$corf,$tmpurl,$sigma,$limitepontos,$tema2,$extendelimite); |
516 | + if($interface == "googlemaps") | ||
517 | + {$m->mapa->setProjection($projMapa);} | ||
483 | $m->salva(); | 518 | $m->salva(); |
484 | break; | 519 | break; |
485 | /* | 520 | /* |
@@ -559,7 +594,6 @@ Reinicia um mapa restaurando a cópia de segurança. | @@ -559,7 +594,6 @@ Reinicia um mapa restaurando a cópia de segurança. | ||
559 | $qyfile = str_replace(".map",".qy",$map_file); | 594 | $qyfile = str_replace(".map",".qy",$map_file); |
560 | if (file_exists($qyfile)) | 595 | if (file_exists($qyfile)) |
561 | {unlink ($qyfile);} | 596 | {unlink ($qyfile);} |
562 | - | ||
563 | unlink($map_file); | 597 | unlink($map_file); |
564 | copy(str_replace(".map","reinc.map",$map_file),$map_file); | 598 | copy(str_replace(".map","reinc.map",$map_file),$map_file); |
565 | $retorno = "ok"; | 599 | $retorno = "ok"; |
@@ -573,13 +607,10 @@ Recupera o mapfile de segurança. | @@ -573,13 +607,10 @@ Recupera o mapfile de segurança. | ||
573 | $qyfile = str_replace(".map",".qy",$map_file); | 607 | $qyfile = str_replace(".map",".qy",$map_file); |
574 | if (file_exists($qyfile)) | 608 | if (file_exists($qyfile)) |
575 | {unlink ($qyfile);} | 609 | {unlink ($qyfile);} |
576 | - | ||
577 | unlink($map_file); | 610 | unlink($map_file); |
578 | $nmf = str_replace(".map","seguranca.map",$map_file); | 611 | $nmf = str_replace(".map","seguranca.map",$map_file); |
579 | if(file_exists($nmf)) | 612 | if(file_exists($nmf)) |
580 | - { | ||
581 | - copy($nmf,$map_file); | ||
582 | - } | 613 | + {copy($nmf,$map_file);} |
583 | else | 614 | else |
584 | { | 615 | { |
585 | $nmf = str_replace(".map","reinc.map",$map_file); | 616 | $nmf = str_replace(".map","reinc.map",$map_file); |
@@ -948,7 +979,7 @@ Gera a imagem do mapa de referência. | @@ -948,7 +979,7 @@ Gera a imagem do mapa de referência. | ||
948 | $objMapa = ms_newMapObj($map_file); | 979 | $objMapa = ms_newMapObj($map_file); |
949 | $nomeImagem = nomeRandomico(); | 980 | $nomeImagem = nomeRandomico(); |
950 | if(!isset($ext)) | 981 | if(!isset($ext)) |
951 | - {$ext = "";} | 982 | + {$ext = "";} |
952 | $retorno = retornaReferencia($ext); | 983 | $retorno = retornaReferencia($ext); |
953 | break; | 984 | break; |
954 | /* | 985 | /* |
@@ -960,7 +991,7 @@ Gera a imagem do mapa de referência de forma dinâmica, variando com a escala do | @@ -960,7 +991,7 @@ Gera a imagem do mapa de referência de forma dinâmica, variando com a escala do | ||
960 | //$objMapa = ms_newMapObj($map_file); | 991 | //$objMapa = ms_newMapObj($map_file); |
961 | $nomeImagem = nomeRandomico(); | 992 | $nomeImagem = nomeRandomico(); |
962 | if(!isset($ext)) | 993 | if(!isset($ext)) |
963 | - {$ext = "";} | 994 | + {$ext = "";} |
964 | $retorno = retornaReferenciaDinamica($ext); | 995 | $retorno = retornaReferenciaDinamica($ext); |
965 | break; | 996 | break; |
966 | /* | 997 | /* |
@@ -1051,9 +1082,7 @@ Gera uma imagem que será utilizada para destacar um determinado tema. | @@ -1051,9 +1082,7 @@ Gera uma imagem que será utilizada para destacar um determinado tema. | ||
1051 | <Temas->geraDestaque> | 1082 | <Temas->geraDestaque> |
1052 | */ | 1083 | */ |
1053 | case "GERADESTAQUE": | 1084 | case "GERADESTAQUE": |
1054 | - include_once("classe_temas.php"); | ||
1055 | - if(isset($ext) && $ext != "" && $interface == "googlemaps") | ||
1056 | - {$ext = projetaExt($map_file,$ext);} | 1085 | + include_once("classe_temas.php"); |
1057 | $m = new Temas($map_file,$tema,"",$ext); | 1086 | $m = new Temas($map_file,$tema,"",$ext); |
1058 | $retorno = $m->geraDestaque(); | 1087 | $retorno = $m->geraDestaque(); |
1059 | break; | 1088 | break; |
@@ -1283,8 +1312,15 @@ Gera graficos automaticamente para os elementos de um tema | @@ -1283,8 +1312,15 @@ Gera graficos automaticamente para os elementos de um tema | ||
1283 | case "GRAFICOTEMA": | 1312 | case "GRAFICOTEMA": |
1284 | include_once("classe_temas.php"); | 1313 | include_once("classe_temas.php"); |
1285 | copiaSeguranca($map_file); | 1314 | copiaSeguranca($map_file); |
1286 | - $m = new Temas($map_file,$tema); | 1315 | + $m = new Temas($map_file,$tema,$locaplic); |
1316 | + if($interface == "googlemaps") | ||
1317 | + { | ||
1318 | + $projMapa = $m->mapa->getProjection(); | ||
1319 | + $m->mapa->setProjection("init=epsg:4291"); | ||
1320 | + } | ||
1287 | $m->graficotema($lista,$tamanho,$tipo,$outlinecolor,$offset); | 1321 | $m->graficotema($lista,$tamanho,$tipo,$outlinecolor,$offset); |
1322 | + if($interface == "googlemaps") | ||
1323 | + {$m->mapa->setProjection($projMapa);} | ||
1288 | $m->salva(); | 1324 | $m->salva(); |
1289 | redesenhaMapa(); | 1325 | redesenhaMapa(); |
1290 | break; | 1326 | break; |
@@ -1303,8 +1339,6 @@ Altera uma classe de um tema, aplicando uma nova classificação ou modificando pa | @@ -1303,8 +1339,6 @@ Altera uma classe de um tema, aplicando uma nova classificação ou modificando pa | ||
1303 | case "ALTERACLASSE": | 1339 | case "ALTERACLASSE": |
1304 | include_once("classe_alteraclasse.php"); | 1340 | include_once("classe_alteraclasse.php"); |
1305 | copiaSeguranca($map_file); | 1341 | copiaSeguranca($map_file); |
1306 | - if(isset($ext) && $ext != "" && $interface == "googlemaps") | ||
1307 | - {$ext = projetaExt($map_file,$ext);} | ||
1308 | $m = new Alteraclasse($map_file,$tema,"",$ext); | 1342 | $m = new Alteraclasse($map_file,$tema,"",$ext); |
1309 | if ($opcao == "adicionaclasse") | 1343 | if ($opcao == "adicionaclasse") |
1310 | {$retorno = $m->adicionaclasse();} | 1344 | {$retorno = $m->adicionaclasse();} |
@@ -1519,8 +1553,6 @@ Pega os dados necessários para a geração dos gráficos da ferramenta seleção | @@ -1519,8 +1553,6 @@ Pega os dados necessários para a geração dos gráficos da ferramenta seleção | ||
1519 | */ | 1553 | */ |
1520 | case "GRAFICOSELECAO": | 1554 | case "GRAFICOSELECAO": |
1521 | include_once("graficos.php"); | 1555 | include_once("graficos.php"); |
1522 | - if(isset($ext) && $ext != "" && $interface == "googlemaps") | ||
1523 | - {$ext = projetaExt($map_file,$ext);} | ||
1524 | if(!isset($exclui)) | 1556 | if(!isset($exclui)) |
1525 | {$exclui = "";} | 1557 | {$exclui = "";} |
1526 | if(!isset($tipo)) | 1558 | if(!isset($tipo)) |
@@ -1628,8 +1660,6 @@ Pega os dados de um tema para geração do gráfico de linha do tempo. | @@ -1628,8 +1660,6 @@ Pega os dados de um tema para geração do gráfico de linha do tempo. | ||
1628 | */ | 1660 | */ |
1629 | case "DADOSLINHADOTEMPO": | 1661 | case "DADOSLINHADOTEMPO": |
1630 | include_once("graficos.php"); | 1662 | include_once("graficos.php"); |
1631 | - if(isset($ext) && $ext != "" && $interface == "googlemaps") | ||
1632 | - {$ext = projetaExt($map_file,$ext);} | ||
1633 | if(!isset($ext)) | 1663 | if(!isset($ext)) |
1634 | {$ext = "";} | 1664 | {$ext = "";} |
1635 | $retorno = dadosLinhaDoTempo($map_file,$tema,$ext); | 1665 | $retorno = dadosLinhaDoTempo($map_file,$tema,$ext); |
@@ -1937,8 +1967,6 @@ Procura valores em uma tabela que aderem a uma palavra de busca. | @@ -1937,8 +1967,6 @@ Procura valores em uma tabela que aderem a uma palavra de busca. | ||
1937 | case "LISTAVALORESITENS": | 1967 | case "LISTAVALORESITENS": |
1938 | include_once("classe_atributos.php"); | 1968 | include_once("classe_atributos.php"); |
1939 | if(!isset($tema)){$tema = "";} | 1969 | if(!isset($tema)){$tema = "";} |
1940 | - if(isset($ext) && $ext != "" && $interface == "googlemaps") | ||
1941 | - {$ext = projetaExt($map_file,$ext);} | ||
1942 | $m = new Atributos($map_file,$tema,"",$ext); | 1970 | $m = new Atributos($map_file,$tema,"",$ext); |
1943 | $retorno = $m->buscaRegistros($palavra,$lista,$tipo,$onde); | 1971 | $retorno = $m->buscaRegistros($palavra,$lista,$tipo,$onde); |
1944 | break; | 1972 | break; |
@@ -2026,9 +2054,9 @@ Pega todos os valores dos itens de uma tabela de um tema. | @@ -2026,9 +2054,9 @@ Pega todos os valores dos itens de uma tabela de um tema. | ||
2026 | <Atributos->listaRegistros> | 2054 | <Atributos->listaRegistros> |
2027 | */ | 2055 | */ |
2028 | case "LISTAREGISTROS": | 2056 | case "LISTAREGISTROS": |
2029 | - if(isset($ext) && $ext != "" && $interface == "googlemaps") | ||
2030 | - {$ext = projetaExt($map_file,$ext);} | ||
2031 | include_once("classe_atributos.php"); | 2057 | include_once("classe_atributos.php"); |
2058 | + if(isset($ext) && $ext != "" && $interface == "googlemaps" && $geo == false) | ||
2059 | + {$ext = projetaExt($map_file,$ext);} | ||
2032 | $m = new Atributos($map_file,$tema,"",$ext); | 2060 | $m = new Atributos($map_file,$tema,"",$ext); |
2033 | if(!isset($tipo)){$tipo = "";} | 2061 | if(!isset($tipo)){$tipo = "";} |
2034 | if(!isset($inicio)){$inicio = 0;} | 2062 | if(!isset($inicio)){$inicio = 0;} |
@@ -2086,9 +2114,12 @@ Muda a extensão geográfica do mapa. | @@ -2086,9 +2114,12 @@ Muda a extensão geográfica do mapa. | ||
2086 | case "MUDAEXT": | 2114 | case "MUDAEXT": |
2087 | include_once("classe_navegacao.php"); | 2115 | include_once("classe_navegacao.php"); |
2088 | copiaSeguranca($map_file); | 2116 | copiaSeguranca($map_file); |
2089 | - if (!isset($ext) || $ext == "" || $ext == " "){$ext="-76.512593 -39.392568 -29.585185 9.490149";} | 2117 | + if (!isset($ext) || $ext == "" || $ext == " ") |
2118 | + {$ext="-76.512593 -39.392568 -29.585185 9.490149";} | ||
2119 | + if(!isset($geo)) | ||
2120 | + {$geo = false;} | ||
2090 | $m = new Navegacao($map_file); | 2121 | $m = new Navegacao($map_file); |
2091 | - if(isset($ext) && $ext != "" && $interface == "googlemaps") | 2122 | + if(isset($ext) && $ext != "" && $interface == "googlemaps" && $geo == false) |
2092 | {$ext = projetaExt($map_file,$ext);} | 2123 | {$ext = projetaExt($map_file,$ext);} |
2093 | $m->mudaExtensao($ext); | 2124 | $m->mudaExtensao($ext); |
2094 | $m->salva(); | 2125 | $m->salva(); |
@@ -2436,9 +2467,13 @@ Seleciona elementos utilizando um ponto. | @@ -2436,9 +2467,13 @@ Seleciona elementos utilizando um ponto. | ||
2436 | foreach($temas as $tema) | 2467 | foreach($temas as $tema) |
2437 | { | 2468 | { |
2438 | $m = new Selecao($map_file,$tema,$ext); | 2469 | $m = new Selecao($map_file,$tema,$ext); |
2470 | + if($interface == "googlemaps") | ||
2471 | + { | ||
2472 | + $projMapa = $m->mapa->getProjection(); | ||
2473 | + $m->mapa->setProjection("init=epsg:4291"); | ||
2474 | + } | ||
2439 | $ok[] = $m->selecaoPT($xy,$tipo,$tolerancia); | 2475 | $ok[] = $m->selecaoPT($xy,$tipo,$tolerancia); |
2440 | } | 2476 | } |
2441 | - //$retorno = implode(",",$ok); | ||
2442 | redesenhaMapa(); | 2477 | redesenhaMapa(); |
2443 | break; | 2478 | break; |
2444 | /* | 2479 | /* |
@@ -2454,7 +2489,12 @@ Seleciona elementos utilizando a extensão do mapa. | @@ -2454,7 +2489,12 @@ Seleciona elementos utilizando a extensão do mapa. | ||
2454 | $temas = explode(",",$tema); | 2489 | $temas = explode(",",$tema); |
2455 | foreach($temas as $tema) | 2490 | foreach($temas as $tema) |
2456 | { | 2491 | { |
2457 | - $m = new Selecao($map_file,$tema); | 2492 | + $m = new Selecao($map_file,$tema,$ext); |
2493 | + if($interface == "googlemaps") | ||
2494 | + { | ||
2495 | + $projMapa = $m->mapa->getProjection(); | ||
2496 | + $m->mapa->setProjection("init=epsg:4291"); | ||
2497 | + } | ||
2458 | $ok[] = $m->selecaoEXT($tipo); | 2498 | $ok[] = $m->selecaoEXT($tipo); |
2459 | } | 2499 | } |
2460 | //$retorno = implode(",",$ok); | 2500 | //$retorno = implode(",",$ok); |
@@ -2474,10 +2514,14 @@ Seleciona elementos utilizando um retângulo. | @@ -2474,10 +2514,14 @@ Seleciona elementos utilizando um retângulo. | ||
2474 | foreach($temas as $tema) | 2514 | foreach($temas as $tema) |
2475 | { | 2515 | { |
2476 | $m = new Selecao($map_file,$tema); | 2516 | $m = new Selecao($map_file,$tema); |
2477 | - if(isset($ext) && $ext != "" && $interface == "googlemaps") | ||
2478 | - {$ext = projetaExt($map_file,$ext);} | 2517 | + if($interface == "googlemaps") |
2518 | + { | ||
2519 | + $projMapa = $m->mapa->getProjection(); | ||
2520 | + $m->mapa->setProjection("init=epsg:4291"); | ||
2521 | + } | ||
2479 | $ok[] = $m->selecaoBOX($tipo,$ext); | 2522 | $ok[] = $m->selecaoBOX($tipo,$ext); |
2480 | } | 2523 | } |
2524 | + | ||
2481 | redesenhaMapa(); | 2525 | redesenhaMapa(); |
2482 | break; | 2526 | break; |
2483 | 2527 | ||
@@ -2491,7 +2535,7 @@ Seleciona elementos com base nos atributos. | @@ -2491,7 +2535,7 @@ Seleciona elementos com base nos atributos. | ||
2491 | case "SELECAOATRIB": | 2535 | case "SELECAOATRIB": |
2492 | include_once("classe_selecao.php"); | 2536 | include_once("classe_selecao.php"); |
2493 | copiaSeguranca($map_file); | 2537 | copiaSeguranca($map_file); |
2494 | - $m = new Selecao($map_file,$tema); | 2538 | + $m = new Selecao($map_file,$tema,$ext); |
2495 | $retorno = $m->selecaoAtributos($tipo,$item,$operador,$valor); | 2539 | $retorno = $m->selecaoAtributos($tipo,$item,$operador,$valor); |
2496 | redesenhaMapa(); | 2540 | redesenhaMapa(); |
2497 | break; | 2541 | break; |
@@ -2505,7 +2549,7 @@ Seleciona elementos com base nos atributos utilizando sintaxe complexa. | @@ -2505,7 +2549,7 @@ Seleciona elementos com base nos atributos utilizando sintaxe complexa. | ||
2505 | case "SELECAOATRIB2": | 2549 | case "SELECAOATRIB2": |
2506 | include_once("classe_selecao.php"); | 2550 | include_once("classe_selecao.php"); |
2507 | copiaSeguranca($map_file); | 2551 | copiaSeguranca($map_file); |
2508 | - $m = new Selecao($map_file,$tema); | 2552 | + $m = new Selecao($map_file,$tema,$ext); |
2509 | $retorno = $m->selecaoAtributos2($filtro,$tipo); | 2553 | $retorno = $m->selecaoAtributos2($filtro,$tipo); |
2510 | redesenhaMapa(); | 2554 | redesenhaMapa(); |
2511 | break; | 2555 | break; |
@@ -2523,6 +2567,11 @@ Sleciona elementos de um tema com base em outro tema. | @@ -2523,6 +2567,11 @@ Sleciona elementos de um tema com base em outro tema. | ||
2523 | foreach($temas as $tema) | 2567 | foreach($temas as $tema) |
2524 | { | 2568 | { |
2525 | $m = new Selecao($map_file,$tema); | 2569 | $m = new Selecao($map_file,$tema); |
2570 | + if($interface == "googlemaps") | ||
2571 | + { | ||
2572 | + $projMapa = $m->mapa->getProjection(); | ||
2573 | + $m->mapa->setProjection("init=epsg:4291"); | ||
2574 | + } | ||
2526 | $ok[] = $m->selecaoTema($temao,$tipo); | 2575 | $ok[] = $m->selecaoTema($temao,$tipo); |
2527 | } | 2576 | } |
2528 | $retorno = implode(",",$ok); | 2577 | $retorno = implode(",",$ok); |
@@ -2745,7 +2794,6 @@ Return: | @@ -2745,7 +2794,6 @@ Return: | ||
2745 | function projetaExt($map_file,$ext,$separador=" ") | 2794 | function projetaExt($map_file,$ext,$separador=" ") |
2746 | { | 2795 | { |
2747 | $ext = str_replace($separador," ",$ext); | 2796 | $ext = str_replace($separador," ",$ext); |
2748 | - | ||
2749 | $extA = explode(" ",$ext); | 2797 | $extA = explode(" ",$ext); |
2750 | $mapa = ms_newMapObj($map_file); | 2798 | $mapa = ms_newMapObj($map_file); |
2751 | $ponto = false; | 2799 | $ponto = false; |
@@ -2802,7 +2850,14 @@ function selecaoPoli($xs,$ys,$tema,$tipo) | @@ -2802,7 +2850,14 @@ function selecaoPoli($xs,$ys,$tema,$tipo) | ||
2802 | foreach($temas as $tema) | 2850 | foreach($temas as $tema) |
2803 | { | 2851 | { |
2804 | $m = new Selecao($map_file,$tema); | 2852 | $m = new Selecao($map_file,$tema); |
2853 | + if($interface == "googlemaps") | ||
2854 | + { | ||
2855 | + $projMapa = $m->mapa->getProjection(); | ||
2856 | + $m->mapa->setProjection("init=epsg:4291"); | ||
2857 | + } | ||
2805 | $ok[] = $m->selecaoPorPoligono($tipo,$xs,$ys); | 2858 | $ok[] = $m->selecaoPorPoligono($tipo,$xs,$ys); |
2859 | + if($interface == "googlemaps") | ||
2860 | + {$m->mapa->setProjection($projMapa);} | ||
2806 | $m->salva(); | 2861 | $m->salva(); |
2807 | } | 2862 | } |
2808 | return implode(",",$ok); | 2863 | return implode(",",$ok); |
ferramentas/convertemapakml/index.js.php
@@ -81,7 +81,7 @@ i3GEOF.converteMapaKml = { | @@ -81,7 +81,7 @@ i3GEOF.converteMapaKml = { | ||
81 | titulo = "Kml <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=2&idajuda=13' > </a>"; | 81 | titulo = "Kml <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=2&idajuda=13' > </a>"; |
82 | janela = i3GEO.janela.cria( | 82 | janela = i3GEO.janela.cria( |
83 | "440px", | 83 | "440px", |
84 | - "305px", | 84 | + "315px", |
85 | "", | 85 | "", |
86 | "", | 86 | "", |
87 | "", | 87 | "", |
ferramentas/convertews/index.js.php
@@ -91,7 +91,7 @@ i3GEOF.converteMapaWS = { | @@ -91,7 +91,7 @@ i3GEOF.converteMapaWS = { | ||
91 | titulo = "WMS <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=2&idajuda=12' > </a>"; | 91 | titulo = "WMS <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=2&idajuda=12' > </a>"; |
92 | janela = i3GEO.janela.cria( | 92 | janela = i3GEO.janela.cria( |
93 | "440px", | 93 | "440px", |
94 | - "280px", | 94 | + "290px", |
95 | "", | 95 | "", |
96 | "", | 96 | "", |
97 | "", | 97 | "", |
ferramentas/gradepol/index.js.php
@@ -147,6 +147,7 @@ i3GEOF.gradeDePoligonos = { | @@ -147,6 +147,7 @@ i3GEOF.gradeDePoligonos = { | ||
147 | ins += "Segundo<input onclick='javascript:this.select();' class=digitar id='i3GEOgradedepoligonosiys' title='segundo' type=text size=5 value='00.00'/>"; | 147 | ins += "Segundo<input onclick='javascript:this.select();' class=digitar id='i3GEOgradedepoligonosiys' title='segundo' type=text size=5 value='00.00'/>"; |
148 | g_tipoacao = "capturaponto"; | 148 | g_tipoacao = "capturaponto"; |
149 | i3GEO.util.proximoAnterior("i3GEOF.gradeDePoligonos.t1()","i3GEOF.gradeDePoligonos.t3()",ins,"i3GEOF.gradeDePoligonos.t2","i3GEOgradedepoligonosresultado"); | 149 | i3GEO.util.proximoAnterior("i3GEOF.gradeDePoligonos.t1()","i3GEOF.gradeDePoligonos.t3()",ins,"i3GEOF.gradeDePoligonos.t2","i3GEOgradedepoligonosresultado"); |
150 | + | ||
150 | if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEOF.gradeDePoligonos.capturaPonto()") < 0) | 151 | if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEOF.gradeDePoligonos.capturaPonto()") < 0) |
151 | {i3GEO.eventos.MOUSECLIQUE.push("i3GEOF.gradeDePoligonos.capturaPonto()");} | 152 | {i3GEO.eventos.MOUSECLIQUE.push("i3GEOF.gradeDePoligonos.capturaPonto()");} |
152 | temp = function(){ | 153 | temp = function(){ |
ferramentas/nptpol/index.js.php
@@ -158,8 +158,13 @@ i3GEOF.nptpol = { | @@ -158,8 +158,13 @@ i3GEOF.nptpol = { | ||
158 | else | 158 | else |
159 | {i3GEO.atualiza();} | 159 | {i3GEO.atualiza();} |
160 | i3GEOF.nptpol.aguarde.visibility = "hidden"; | 160 | i3GEOF.nptpol.aguarde.visibility = "hidden"; |
161 | - }; | ||
162 | - 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; | 161 | + }, |
162 | + ext; | ||
163 | + if(i3GEO.Interface.ATUAL === "googlemaps") | ||
164 | + {ext = i3GEO.Interface.googlemaps.bbox();} | ||
165 | + else | ||
166 | + {ext = i3GEO.parametros.mapexten;} | ||
167 | + 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; | ||
163 | cp = new cpaint(); | 168 | cp = new cpaint(); |
164 | cp.set_response_type("JSON"); | 169 | cp.set_response_type("JSON"); |
165 | cp.call(p,"nptpol",fim); | 170 | cp.call(p,"nptpol",fim); |
ferramentas/salvamapa/index.js.php
@@ -58,12 +58,18 @@ i3GEOF.salvaMapa = { | @@ -58,12 +58,18 @@ i3GEOF.salvaMapa = { | ||
58 | try{ | 58 | try{ |
59 | var map_file = i3GEO.parametros.mapfile, | 59 | var map_file = i3GEO.parametros.mapfile, |
60 | local = map_file.split("ms_tmp"); | 60 | local = map_file.split("ms_tmp"); |
61 | - local = window.location.protocol+"//"+window.location.host+"/ms_tmp"+local[1]; | 61 | + local = i3GEO.util.protocolo()+"://"+window.location.host+"/ms_tmp"+local[1]; |
62 | $i(iddiv).innerHTML += i3GEOF.salvaMapa.html()+"<a href='"+local+"' target='_blank' >Clique aqui para baixar o arquivo</a>"; | 62 | $i(iddiv).innerHTML += i3GEOF.salvaMapa.html()+"<a href='"+local+"' target='_blank' >Clique aqui para baixar o arquivo</a>"; |
63 | } | 63 | } |
64 | catch(erro){alert(erro);} | 64 | catch(erro){alert(erro);} |
65 | - }; | ||
66 | - i3GEO.php.mudaext(temp,"nenhum",i3GEO.parametros.mapexten); | 65 | + }, |
66 | + atualiza = true, | ||
67 | + geo = false; | ||
68 | + if(i3GEO.Interface.ATUAL === "googlemaps"){ | ||
69 | + atualiza = false; | ||
70 | + geo = true; | ||
71 | + } | ||
72 | + i3GEO.php.mudaext(temp,"nenhum",i3GEO.parametros.mapexten,i3GEO.configura.locaplic,i3GEO.configura.sid,atualiza,geo); | ||
67 | }, | 73 | }, |
68 | /* | 74 | /* |
69 | Function: html | 75 | Function: html |
ferramentas/selecao/index.js.php
@@ -241,6 +241,8 @@ i3GEOF.selecao = { | @@ -241,6 +241,8 @@ i3GEOF.selecao = { | ||
241 | var i = $i("i3GEOF.selecao_c").style; | 241 | var i = $i("i3GEOF.selecao_c").style; |
242 | i3GEO.janela.ULTIMOZINDEX++; | 242 | i3GEO.janela.ULTIMOZINDEX++; |
243 | i.zIndex = 10000 + i3GEO.janela.ULTIMOZINDEX; | 243 | i.zIndex = 10000 + i3GEO.janela.ULTIMOZINDEX; |
244 | + if(i3GEO.Interface.ATUAL == "googlemaps") | ||
245 | + {i3GEO.Interface.googlemaps.recalcPar();} | ||
244 | }, | 246 | }, |
245 | /* | 247 | /* |
246 | Function: mudaicone | 248 | Function: mudaicone |
menutemas/admin.db
No preview for this file type