Commit c14c9ecafddd6bc6777fa22ad8296689f49442af
1 parent
81f0202e
Exists in
master
and in
7 other branches
Atualização das ferramentas
Showing
21 changed files
with
113 additions
and
136 deletions
Show diff stats
ferramentas/conectargeorss/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -17,7 +17,7 @@ Adiciona um tema baseado em um RSS. |
17 | 17 | include_once(dirname(__FILE__)."/../../classesphp/classe_mapa.php"); |
18 | 18 | copiaSeguranca($map_file); |
19 | 19 | $m = new Mapa($map_file); |
20 | - $retorno = $m->adicionaTemaGeoRSS($servico,$dir_tmp,$locaplic,$canal); | |
20 | + $retorno = $m->adicionaTemaGeoRSS($_GET["servico"],$dir_tmp,$locaplic,$_GET["canal"]); | |
21 | 21 | if ($retorno != "erro"){ |
22 | 22 | $m->salva(); |
23 | 23 | $_SESSION["contadorsalva"]++; |
... | ... | @@ -28,13 +28,8 @@ Adiciona um tema baseado em um RSS. |
28 | 28 | } |
29 | 29 | break; |
30 | 30 | } |
31 | -if (!connection_aborted()){ | |
32 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
33 | - restauraCon($map_file,$postgis_mapa); | |
34 | - } | |
35 | - cpjson($retorno); | |
36 | -} | |
37 | -else{ | |
38 | - exit; | |
31 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
32 | + restauraCon($map_file,$postgis_mapa); | |
39 | 33 | } |
34 | +cpjson($retorno); | |
40 | 35 | ?> |
41 | 36 | \ No newline at end of file | ... | ... |
ferramentas/congelamapa/openlayers.php
1 | 1 | <?php |
2 | +include (dirname(__FILE__)."/../../classesphp/sani_request.php"); | |
2 | 3 | $g_sid = $_GET["g_sid"]; |
3 | 4 | session_name("i3GeoPHP"); |
4 | 5 | session_id($g_sid); |
... | ... | @@ -11,7 +12,13 @@ if($f[0] != md5('I3GEOSEC' . $_SERVER['HTTP_USER_AGENT'] . session_id())){ |
11 | 12 | } |
12 | 13 | include(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); |
13 | 14 | $map_file = $_SESSION["map_file"]; |
15 | +if(empty($map_file)){ | |
16 | + exit; | |
17 | +} | |
14 | 18 | $map_file = str_replace(".map","",$map_file).".map"; |
19 | + | |
20 | +restauraCon($map_file,$_SESSION["postgis_mapa"]); | |
21 | + | |
15 | 22 | $base = basename($map_file); |
16 | 23 | $dir = dirname($map_file); |
17 | 24 | $novo_mapfile = $dir."/".nomeRandomico(5).$base; | ... | ... |
ferramentas/congelamapa/openlayers3.php
1 | 1 | <?php |
2 | +include (dirname(__FILE__)."/../../classesphp/sani_request.php"); | |
2 | 3 | $g_sid = strip_tags($_GET["g_sid"]); |
3 | 4 | session_name("i3GeoPHP"); |
4 | 5 | session_id($g_sid); |
... | ... | @@ -11,7 +12,12 @@ if($f[0] != md5('I3GEOSEC' . $_SERVER['HTTP_USER_AGENT'] . session_id())){ |
11 | 12 | } |
12 | 13 | include(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); |
13 | 14 | $map_file = $_SESSION["map_file"]; |
15 | +if(empty($map_file)){ | |
16 | + exit; | |
17 | +} | |
14 | 18 | $map_file = str_replace(".map","",$map_file).".map"; |
19 | +restauraCon($map_file,$_SESSION["postgis_mapa"]); | |
20 | + | |
15 | 21 | $base = basename($map_file); |
16 | 22 | $dir = dirname($map_file); |
17 | 23 | $novo_mapfile = $dir."/".nomeRandomico(5).$base; | ... | ... |
ferramentas/convertews/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -16,17 +16,14 @@ Converte o mapa atual em um wms e wmc. |
16 | 16 | case "CONVERTEWMSWMC": |
17 | 17 | include_once(dirname(__FILE__)."/../../classesphp/classe_mapa.php"); |
18 | 18 | $m = new Mapa($map_file); |
19 | - if(!isset($h)){$h = "";} | |
20 | - $wms = $m->converteWS($locmapserv,$h); | |
21 | - $wmc = $m->converteWMC($locmapserv,$h); | |
19 | + if(!isset($_GET["h"])){$_GET["h"] = "";} | |
20 | + $wms = $m->converteWS($locmapserv,$_GET["h"]); | |
21 | + $wmc = $m->converteWMC($locmapserv,$_GET["h"]); | |
22 | 22 | $retorno = array("wms"=>$wms,"wmc"=>$wmc); |
23 | 23 | break; |
24 | 24 | } |
25 | -if (!connection_aborted()){ | |
26 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
25 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
27 | 26 | restauraCon($map_file,$postgis_mapa); |
28 | - cpjson($retorno); | |
29 | 27 | } |
30 | -else | |
31 | -{exit();} | |
28 | +cpjson($retorno); | |
32 | 29 | ?> |
33 | 30 | \ No newline at end of file | ... | ... |
ferramentas/dissolve/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -19,16 +19,13 @@ Salva o mapa acrescentando um novo layer com o resultado. |
19 | 19 | include_once(dirname(__FILE__)."/../../classesphp/classe_analise.php"); |
20 | 20 | copiaSeguranca($map_file); |
21 | 21 | $m = new Analise($map_file,$tema); |
22 | - $retorno = $m->dissolvePoligono($item,$locaplic); | |
22 | + $retorno = $m->dissolvePoligono($_GET["item"],$locaplic); | |
23 | 23 | $m->salva(); |
24 | 24 | $_SESSION["contadorsalva"]++; |
25 | 25 | break; |
26 | 26 | } |
27 | -if (!connection_aborted()){ | |
28 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
27 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
29 | 28 | restauraCon($map_file,$postgis_mapa); |
30 | - cpjson($retorno); | |
31 | 29 | } |
32 | -else | |
33 | -{exit();} | |
30 | +cpjson($retorno); | |
34 | 31 | ?> |
35 | 32 | \ No newline at end of file | ... | ... |
ferramentas/distanciaptpt/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -18,18 +18,15 @@ S&atilde;o considerados apenas os pontos próximos definidos por um buffer. |
18 | 18 | case "DISTANCIAPTPT": |
19 | 19 | include_once(dirname(__FILE__)."/../../classesphp/classe_analise.php"); |
20 | 20 | copiaSeguranca($map_file); |
21 | - $m = new Analise($map_file,$temaorigem,$locaplic,$ext); | |
22 | - $temaoverlay = $m->criaBuffer($distancia,$locaplic); | |
23 | - $retorno = $m->distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorigem,$itemdestino); | |
21 | + $m = new Analise($map_file,$_GET["temaorigem"],$locaplic,$ext); | |
22 | + $temaoverlay = $m->criaBuffer($_GET["distancia"],$locaplic); | |
23 | + $retorno = $m->distanciaptpt($_GET["temaorigem"],$_GET["temadestino"],$temaoverlay,$locaplic,$_GET["itemorigem"],$_GET["itemdestino"]); | |
24 | 24 | $m->salva(); |
25 | 25 | $_SESSION["contadorsalva"]++; |
26 | 26 | break; |
27 | 27 | } |
28 | -if (!connection_aborted()){ | |
29 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
28 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
30 | 29 | restauraCon($map_file,$postgis_mapa); |
31 | - cpjson($retorno); | |
32 | 30 | } |
33 | -else | |
34 | -{exit();} | |
31 | +cpjson($retorno); | |
35 | 32 | ?> |
36 | 33 | \ No newline at end of file | ... | ... |
ferramentas/etiqueta/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -18,13 +18,13 @@ Ativa as etiquetas de um tema. |
18 | 18 | copiaSeguranca($map_file); |
19 | 19 | $m = new Toponimia($map_file,$tema); |
20 | 20 | $m->layer->setmetadata("IDENTIFICA",""); |
21 | - $m->layer->setmetadata("TIP",$tips); | |
22 | - $m->layer->setmetadata("ITENS",$itens); | |
21 | + $m->layer->setmetadata("TIP",$_GET["tips"]); | |
22 | + $m->layer->setmetadata("ITENS",$_GET["itens"]); | |
23 | 23 | //$m->layer->setmetadata("ITENSDESC",base64_decode($itensdesc)); |
24 | 24 | //$m->layer->setmetadata("ITENSLINK",base64_decode($itenslink)); |
25 | - $m->layer->setmetadata("ITENSDESC",$itensdesc); | |
26 | - $m->layer->setmetadata("ITENSLINK",$itenslink); | |
27 | - $m->layer->setmetadata("itembuscarapida",$itembuscarapida); | |
25 | + $m->layer->setmetadata("ITENSDESC",$_GET["itensdesc"]); | |
26 | + $m->layer->setmetadata("ITENSLINK",$_GET["itenslink"]); | |
27 | + $m->layer->setmetadata("itembuscarapida",$_GET["itembuscarapida"]); | |
28 | 28 | $m->salva(); |
29 | 29 | $_SESSION["contadorsalva"]++; |
30 | 30 | $retorno = "ok"; |
... | ... | @@ -57,11 +57,8 @@ Obtém os dados sobre itens, itensdesc, etc |
57 | 57 | $retorno = $m->pegaDadosEtiquetas(); |
58 | 58 | break; |
59 | 59 | } |
60 | -if (!connection_aborted()){ | |
61 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
60 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
62 | 61 | restauraCon($map_file,$postgis_mapa); |
63 | - cpjson($retorno); | |
64 | 62 | } |
65 | -else | |
66 | -{exit();} | |
63 | +cpjson($retorno); | |
67 | 64 | ?> |
68 | 65 | \ No newline at end of file | ... | ... |
ferramentas/geonames/opentouchmaps.php
... | ... | @@ -14,10 +14,11 @@ text-align:left; |
14 | 14 | </head> |
15 | 15 | <body style="background-color:white;margin:10px;text-align:left"> |
16 | 16 | <?php |
17 | +include_once (dirname(__FILE__)."/../../classesphp/sani_request.php"); | |
17 | 18 | $d = "http://www.opentouchmap.org/?lat=".$_GET["y"]."&lon=".$_GET["x"]."&zoom=12%20lat:".$_GET["y"]."%20lon:".$_GET["x"]; |
18 | 19 | echo "<p>O código de barras abaixo pode ser lido por dispositivos móveis, como os celulares ou pdas."; |
19 | 20 | echo "<p>Se o seu dispositivo possuir o software adequado, fotografe o código para abrir o navegador de internet ou clique no link."; |
20 | -echo "<p><a href='$d' >$d</a><br>"; | |
21 | +echo "<p><a href='$d' >$d</a><br>"; | |
21 | 22 | echo "<img src='../../pacotes/qrcode/php/qr_img.php?d=$d' />"; |
22 | 23 | ?> |
23 | 24 | <div id=i3GEOcompartilhar style="text-align:left;border-top:1px solid rgb(250,250,250);padding-top:1px" ></div> | ... | ... |
ferramentas/gradecoord/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -10,16 +10,13 @@ switch (strtoupper($funcao)) |
10 | 10 | include_once("../../classesphp/classe_mapa.php"); |
11 | 11 | copiaSeguranca($map_file); |
12 | 12 | $m = new Mapa($map_file); |
13 | - $m->gradeCoord($intervalo,$corlinha,$larguralinha,$tipolinha,$tamanhotexto,$fonte,$cortexto,$incluitexto,$mascara,$shadowcolor,$shadowsizex,$shadowsizey); | |
13 | + $m->gradeCoord($_GET["intervalo"],$_GET["corlinha"],$_GET["larguralinha"],$_GET["tipolinha"],$_GET["tamanhotexto"],$_GET["fonte"],$_GET["cortexto"],$_GET["incluitexto"],$_GET["mascara"],$_GET["shadowcolor"],$_GET["shadowsizex"],$_GET["shadowsizey"]); | |
14 | 14 | $m->salva(); |
15 | 15 | $retorno = "ok"; |
16 | 16 | break; |
17 | 17 | } |
18 | -if (!connection_aborted()){ | |
19 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
18 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
20 | 19 | restauraCon($map_file,$postgis_mapa); |
21 | - cpjson($retorno); | |
22 | 20 | } |
23 | -else | |
24 | -{exit();} | |
21 | +cpjson($retorno); | |
25 | 22 | ?> |
26 | 23 | \ No newline at end of file | ... | ... |
ferramentas/gradehex/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -21,22 +21,19 @@ Salva o mapa acrescentando um novo layer com a grade. |
21 | 21 | $m = new Analise($map_file,$tema); |
22 | 22 | if(!isset($tema)){$tema = "";} |
23 | 23 | |
24 | - if($proj == "sim"){ | |
25 | - $proj = true; | |
24 | + if($_GET["proj"] == "sim"){ | |
25 | + $_GET["proj"] = true; | |
26 | 26 | } |
27 | 27 | else{ |
28 | - $proj = false; | |
28 | + $_GET["proj"] = false; | |
29 | 29 | } |
30 | - $retorno = $m->gradeDeHex($dd,$px,$py,$locaplic,$nptx,$npty,$proj); | |
30 | + $retorno = $m->gradeDeHex($_GET["dd"],$_GET["px"],$_GET["py"],$locaplic,$_GET["nptx"],$_GET["npty"],$_GET["proj"]); | |
31 | 31 | $m->salva(); |
32 | 32 | $_SESSION["contadorsalva"]++; |
33 | 33 | break; |
34 | 34 | } |
35 | -if (!connection_aborted()){ | |
36 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
35 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
37 | 36 | restauraCon($map_file,$postgis_mapa); |
38 | - cpjson($retorno); | |
39 | 37 | } |
40 | -else | |
41 | -{exit();} | |
38 | +cpjson($retorno); | |
42 | 39 | ?> |
43 | 40 | \ No newline at end of file | ... | ... |
ferramentas/gradepol/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -20,22 +20,20 @@ Salva o mapa acrescentando um novo layer com a grade. |
20 | 20 | copiaSeguranca($map_file); |
21 | 21 | if(!isset($tema)){$tema = "";} |
22 | 22 | $m = new Analise($map_file,$tema); |
23 | - if($proj == "sim"){ | |
24 | - $proj = true; | |
25 | - } | |
26 | - else{ | |
27 | - $proj = false; | |
23 | + if($_GET["proj"] == "sim"){ | |
24 | + $_GET["proj"] = true; | |
28 | 25 | } |
29 | - $retorno = $m->gradeDePol($xdd,$ydd,$px,$py,$locaplic,$nptx,$npty,$proj); | |
26 | + else{ | |
27 | + $_GET["proj"] = false; | |
28 | + } | |
29 | + | |
30 | + $retorno = $m->gradeDePol($_GET["dd"],$_GET["px"],$_GET["py"],$locaplic,$_GET["nptx"],$_GET["npty"],$_GET["proj"]); | |
30 | 31 | $m->salva(); |
31 | 32 | $_SESSION["contadorsalva"]++; |
32 | 33 | break; |
33 | 34 | } |
34 | -if (!connection_aborted()){ | |
35 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
35 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
36 | 36 | restauraCon($map_file,$postgis_mapa); |
37 | - cpjson($retorno); | |
38 | 37 | } |
39 | -else | |
40 | -{exit();} | |
38 | +cpjson($retorno); | |
41 | 39 | ?> |
42 | 40 | \ No newline at end of file | ... | ... |
ferramentas/gradepontos/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -20,22 +20,19 @@ Salva o mapa acrescentando um novo layer com a grade de coordenadas. |
20 | 20 | copiaSeguranca($map_file); |
21 | 21 | if(!isset($tema)){$tema = "";} |
22 | 22 | $m = new Analise($map_file,$tema); |
23 | - if($proj == "sim"){ | |
24 | - $proj = true; | |
25 | - } | |
26 | - else{ | |
27 | - $proj = false; | |
23 | + if($_GET["proj"] == "sim"){ | |
24 | + $_GET["proj"] = true; | |
28 | 25 | } |
29 | - $retorno = $m->gradeDePontos($xdd,$ydd,$px,$py,$locaplic,$nptx,$npty,$proj); | |
26 | + else{ | |
27 | + $_GET["proj"] = false; | |
28 | + } | |
29 | + $retorno = $m->gradeDePontos($_GET["dd"],$_GET["px"],$_GET["py"],$locaplic,$_GET["nptx"],$_GET["npty"],$_GET["proj"]); | |
30 | 30 | $m->salva(); |
31 | 31 | $_SESSION["contadorsalva"]++; |
32 | 32 | break; |
33 | 33 | } |
34 | -if (!connection_aborted()){ | |
35 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
34 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
36 | 35 | restauraCon($map_file,$postgis_mapa); |
37 | - cpjson($retorno); | |
38 | 36 | } |
39 | -else | |
40 | -{exit();} | |
37 | +cpjson($retorno); | |
41 | 38 | ?> |
42 | 39 | \ No newline at end of file | ... | ... |
ferramentas/graficotema/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -24,17 +24,14 @@ Gera graficos automaticamente para os elementos de um tema |
24 | 24 | $mesmoTema = false; |
25 | 25 | } |
26 | 26 | |
27 | - $m->graficotema($lista,$tamanho,$tipo,$outlinecolor,$offset,$mesmoTema); | |
27 | + $m->graficotema($_GET["lista"],$_GET["tamanho"],$_GET["tipo"],$_GET["outlinecolor"],$_GET["offset"],$_GET["mesmoTema"]); | |
28 | 28 | $m->salva(); |
29 | 29 | $_SESSION["contadorsalva"]++; |
30 | 30 | redesenhaMapa(); |
31 | 31 | break; |
32 | 32 | } |
33 | -if (!connection_aborted()){ | |
34 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
33 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
35 | 34 | restauraCon($map_file,$postgis_mapa); |
36 | - cpjson($retorno); | |
37 | 35 | } |
38 | -else | |
39 | -{exit();} | |
36 | +cpjson($retorno); | |
40 | 37 | ?> |
41 | 38 | \ No newline at end of file | ... | ... |
ferramentas/heatmap/.project
... | ... | @@ -1,17 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<projectDescription> | |
3 | - <name>ferramentas heatmap</name> | |
4 | - <comment></comment> | |
5 | - <projects> | |
6 | - </projects> | |
7 | - <buildSpec> | |
8 | - <buildCommand> | |
9 | - <name>org.eclipse.wst.jsdt.core.javascriptValidator</name> | |
10 | - <arguments> | |
11 | - </arguments> | |
12 | - </buildCommand> | |
13 | - </buildSpec> | |
14 | - <natures> | |
15 | - <nature>org.eclipse.wst.jsdt.core.jsNature</nature> | |
16 | - </natures> | |
17 | -</projectDescription> |
ferramentas/heatmap/.settings/.jsdtscope
ferramentas/heatmap/.settings/org.eclipse.wst.jsdt.ui.superType.container
ferramentas/heatmap/.settings/org.eclipse.wst.jsdt.ui.superType.name
ferramentas/heatmap/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -15,23 +15,21 @@ Adiciona ao mapa uma nova camada para calculo do mapa de calor |
15 | 15 | $nameLayer = "heatmap".nomeRandomico(); |
16 | 16 | $map = ms_newMapObj($map_file); |
17 | 17 | $layer = $map->getlayerbyname($tema); |
18 | - $novolayer = ms_newLayerObj($map, $layer); | |
19 | - $novolayer->setmetadata("tema",$titulo); | |
20 | - $parametros = '{"plugin":"heatmap","parametros":{"tipoGradiente":"default","valorPonto":"'.$valorPonto.'","coluna":"'.$coluna.'","radius":"'.$raio.'"}}'; | |
18 | + $novolayer = ms_newLayerObj($map, $_GET["layer"]); | |
19 | + $novolayer->setmetadata("tema",$_GET["titulo"]); | |
20 | + $parametros = '{"plugin":"heatmap","parametros":{"tipoGradiente":"default","valorPonto":"'.$_GET["valorPonto"].'","coluna":"'.$_GET["coluna"].'","radius":"'.$_GET["raio"].'"}}'; | |
21 | 21 | $novolayer->setmetadata("PLUGINI3GEO",$parametros); |
22 | 22 | $novolayer->set("name",$nameLayer); |
23 | 23 | $novolayer->set("group",""); |
24 | - if(!empty($opacidade)){ | |
25 | - $novolayer->set("opacity",$opacidade); | |
24 | + if(!empty($_GET["opacidade_GET["])){ | |
25 | + $novolayer->set("opacity",$_GET["opacidade"]); | |
26 | 26 | } |
27 | 27 | $map->save($map_file); |
28 | 28 | $retorno = $nameLayer; |
29 | 29 | break; |
30 | 30 | } |
31 | -if (!connection_aborted()){ | |
32 | - cpjson($retorno); | |
33 | -} | |
34 | -else{ | |
35 | - exit(); | |
31 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
32 | + restauraCon($map_file,$postgis_mapa); | |
36 | 33 | } |
34 | +cpjson($retorno); | |
37 | 35 | ?> |
38 | 36 | \ No newline at end of file | ... | ... |
ferramentas/heatmap/funcoes.php
... | ... | @@ -23,10 +23,10 @@ function heatmapDados($map_file){ |
23 | 23 | $resultado[] = '{"lat":"'.$r["y"].'","lng":"'.$r["x"].'","count":"'.$r["valores"][0]["valor"].'"}'; |
24 | 24 | } |
25 | 25 | } |
26 | - if (!connection_aborted()){ | |
27 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
28 | - restauraCon($map_file,$postgis_mapa); | |
26 | + if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
27 | + restauraCon($map_file,$postgis_mapa); | |
29 | 28 | } |
29 | + | |
30 | 30 | return $resultado; |
31 | 31 | } |
32 | 32 | function heatmapMapfile(){ |
... | ... | @@ -66,7 +66,7 @@ function heatmapMapfile(){ |
66 | 66 | ms_newLayerObj($mapa, $layern); |
67 | 67 | $mapa->save($map_file); |
68 | 68 | if(!empty($postgis_mapa)){ |
69 | - //substituiCon($map_file,$postgis_mapa); | |
69 | + restauraCon($map_file,$postgis_mapa); | |
70 | 70 | } |
71 | 71 | } |
72 | 72 | return $map_file; | ... | ... |
ferramentas/heatmap/googlemaps_js.php
... | ... | @@ -17,13 +17,23 @@ nomevariavel nome da variavel javascript que sera retornada com os valores |
17 | 17 | */ |
18 | 18 | $dir = dirname(__FILE__); |
19 | 19 | //inicializa o programa verificando seguranca e pegando os parametros enviados pela URL e pela secao |
20 | -include_once($dir."/../inicia.php"); | |
20 | +include_once($dir."/../safe.php"); | |
21 | 21 | include_once($dir."/funcoes.php"); |
22 | 22 | |
23 | +$layer = $_GET["layer"]; | |
24 | +$tipoGradiente = $_GET["tipoGradiente"]; | |
25 | +$coluna = $_GET["coluna"]; | |
26 | +$valorPonto = $_GET["valorPonto"]; | |
27 | + | |
28 | + | |
23 | 29 | $map_file = heatmapMapfile(); |
24 | 30 | $resultado = heatmapDados($map_file); |
25 | 31 | $gradiente = heatmapGradiente($map_file,$layer,$tipoGradiente); |
26 | 32 | |
33 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
34 | + restauraCon($map_file,$postgis_mapa); | |
35 | +} | |
36 | + | |
27 | 37 | echo $nomevariavel.' = ['.implode(",",$resultado).'];'; |
28 | 38 | echo $nomevariavelConfig.' = '.$gradiente.';'; |
29 | 39 | ... | ... |
ferramentas/heatmap/openlayers_js.php
... | ... | @@ -18,12 +18,17 @@ nomevariavel nome da variavel javascript que sera retornada com os valores |
18 | 18 | $dir = dirname(__FILE__); |
19 | 19 | |
20 | 20 | //inicializa o programa verificando seguranca e pegando os parametros enviados pela URL e pela secao |
21 | -include_once($dir."/../inicia.php"); | |
21 | +include_once($dir."/../safe.php"); | |
22 | 22 | include_once($dir."/funcoes.php"); |
23 | 23 | |
24 | +$layer = $_GET["layer"]; | |
25 | +$tipoGradiente = $_GET["tipoGradiente"]; | |
26 | +$coluna = $_GET["coluna"]; | |
27 | +$valorPonto = $_GET["valorPonto"]; | |
28 | + | |
24 | 29 | //o plugin pode ser chamado sem um mapfile criado |
25 | 30 | //usando apenas o mapfile existente em i3geo/temas |
26 | -//nesse caso e necessario cirar um mapfile temporario | |
31 | +//nesse caso e necessario criar um mapfile temporario | |
27 | 32 | if($g_sid != ""){ |
28 | 33 | session_name("i3GeoPHP"); |
29 | 34 | session_id($g_sid); |
... | ... | @@ -50,6 +55,10 @@ if($map_file == ""){ |
50 | 55 | $resultado = heatmapDados($map_file); |
51 | 56 | $gradiente = heatmapGradiente($map_file,$layer,$tipoGradiente); |
52 | 57 | |
58 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
59 | + restauraCon($map_file,$postgis_mapa); | |
60 | +} | |
61 | + | |
53 | 62 | echo $nomevariavel.' = ['.implode(",",$resultado).'];'; |
54 | 63 | echo $nomevariavelConfig.' = '.$gradiente.';'; |
55 | 64 | ... | ... |