Commit 79cdfce56b57c443dbf041ce622f4b6df8fdd3c4
1 parent
5088b833
Exists in
master
and in
6 other branches
Criação de opção para inclusão de um prefixo no nome do LAYER quando o cache est…
…iver ativo. Dessa forma é possível evitar o uso de cache antigo após alterar as configurações de um layer
Showing
12 changed files
with
158 additions
and
101 deletions
Show diff stats
admin/catalogo/mapfile/renderizacao/exec.php
@@ -37,12 +37,22 @@ $codigo = str_replace ( ".", "", $codigo ); | @@ -37,12 +37,22 @@ $codigo = str_replace ( ".", "", $codigo ); | ||
37 | $codigo = strip_tags ( $codigo ); | 37 | $codigo = strip_tags ( $codigo ); |
38 | $codigo = htmlspecialchars ( $codigo, ENT_QUOTES ); | 38 | $codigo = htmlspecialchars ( $codigo, ENT_QUOTES ); |
39 | 39 | ||
40 | +if(isset($_POST ["cacheprefixo"])){ | ||
41 | + $cacheprefixo = $_POST ["cacheprefixo"]; | ||
42 | + $cacheprefixo = str_replace ( " ", "", \admin\php\funcoesAdmin\removeAcentos ( $cacheprefixo ) ); | ||
43 | + $cacheprefixo = str_replace ( ".", "", $cacheprefixo ); | ||
44 | + $cacheprefixo = strip_tags ( $cacheprefixo ); | ||
45 | + $cacheprefixo = htmlspecialchars ( $cacheprefixo, ENT_QUOTES ); | ||
46 | +} else { | ||
47 | + $cacheprefixo = ""; | ||
48 | +} | ||
49 | + | ||
40 | $id_tema = ( int ) $_POST ["id_tema"]; | 50 | $id_tema = ( int ) $_POST ["id_tema"]; |
41 | 51 | ||
42 | $funcao = strtoupper ( $funcao ); | 52 | $funcao = strtoupper ( $funcao ); |
43 | switch ($funcao) { | 53 | switch ($funcao) { |
44 | case "ALTERAR" : | 54 | case "ALTERAR" : |
45 | - $dados = \admin\catalogo\mapfile\renderizacao\alterar ( $_SESSION["locaplic"], $id_tema, $codigo, $_POST["cache"], $_POST["tiles"], $_POST["maxfeatures"], $_POST["cortepixels"]); | 55 | + $dados = \admin\catalogo\mapfile\renderizacao\alterar ( $_SESSION["locaplic"], $id_tema, $codigo, $_POST["cache"], $_POST["tiles"], $_POST["maxfeatures"], $_POST["cortepixels"], $cacheprefixo); |
46 | if ($dados === false) { | 56 | if ($dados === false) { |
47 | header ( "HTTP/1.1 500 erro ao consultar banco de dados" ); | 57 | header ( "HTTP/1.1 500 erro ao consultar banco de dados" ); |
48 | } | 58 | } |
admin/catalogo/mapfile/renderizacao/funcoes.php
@@ -12,6 +12,7 @@ function listar($locaplic,$codigo){ | @@ -12,6 +12,7 @@ function listar($locaplic,$codigo){ | ||
12 | exit (); | 12 | exit (); |
13 | } | 13 | } |
14 | $dados = array (); | 14 | $dados = array (); |
15 | + $dados["cacheprefixo"] = strtoupper($layer->getmetadata("cacheprefixo")); | ||
15 | $dados["cache"] = strtoupper($layer->getmetadata("cache")); | 16 | $dados["cache"] = strtoupper($layer->getmetadata("cache")); |
16 | if($dados["cache"] == ""){ | 17 | if($dados["cache"] == ""){ |
17 | $dados["cache"] = "NAO"; | 18 | $dados["cache"] = "NAO"; |
@@ -27,8 +28,8 @@ function listar($locaplic,$codigo){ | @@ -27,8 +28,8 @@ function listar($locaplic,$codigo){ | ||
27 | } | 28 | } |
28 | return $dados; | 29 | return $dados; |
29 | } | 30 | } |
30 | -function alterar($locaplic, $id_tema, $codigo, $cache, $tiles, $maxfeatures, $cortepixels) { | ||
31 | - $arq = $locaplic . "/temas/" . $codigo . ".map"; | 31 | +function alterar($locaplic, $id_tema, $codigo, $cache, $tiles, $maxfeatures, $cortepixels, $cacheprefixo) { |
32 | + $arq = $locaplic . "/temas/" . $codigo . ".map"; | ||
32 | if (! file_exists ( $locaplic . "/temas/" . $codigo . ".map" )) { | 33 | if (! file_exists ( $locaplic . "/temas/" . $codigo . ".map" )) { |
33 | return false; | 34 | return false; |
34 | } | 35 | } |
@@ -38,6 +39,7 @@ function alterar($locaplic, $id_tema, $codigo, $cache, $tiles, $maxfeatures, $co | @@ -38,6 +39,7 @@ function alterar($locaplic, $id_tema, $codigo, $cache, $tiles, $maxfeatures, $co | ||
38 | return false; | 39 | return false; |
39 | } | 40 | } |
40 | $layer->setmetadata ( "cache", $cache ); | 41 | $layer->setmetadata ( "cache", $cache ); |
42 | + $layer->setmetadata ( "cacheprefixo", $cacheprefixo ); | ||
41 | $layer->setmetadata ( "tiles", $tiles ); | 43 | $layer->setmetadata ( "tiles", $tiles ); |
42 | $layer->setmetadata ( "cortepixels", $cortepixels ); | 44 | $layer->setmetadata ( "cortepixels", $cortepixels ); |
43 | if(empty($maxfeatures)){ | 45 | if(empty($maxfeatures)){ |
admin/catalogo/mapfile/renderizacao/index.js
@@ -24,84 +24,84 @@ Free Software Foundation, Inc., no endereço | @@ -24,84 +24,84 @@ Free Software Foundation, Inc., no endereço | ||
24 | */ | 24 | */ |
25 | i3GEOadmin.mapfile = {}; | 25 | i3GEOadmin.mapfile = {}; |
26 | i3GEOadmin.renderizacao = { | 26 | i3GEOadmin.renderizacao = { |
27 | - inicia: function(codigo, id_tema){ | ||
28 | - i3GEOadmin.core.modalAguarde(true); | ||
29 | - $.post( | ||
30 | - "exec.php?funcao=lista", | ||
31 | - "codigo="+codigo | ||
32 | - ) | ||
33 | - .done( | ||
34 | - function(data, status){ | ||
35 | - i3GEOadmin.core.modalAguarde(false); | ||
36 | - var json = jQuery.parseJSON(data); | ||
37 | - $("#corpo").html( | ||
38 | - Mustache.to_html( | ||
39 | - $("#templateFormRenderizacao").html(), | ||
40 | - $.extend( | ||
41 | - {}, | ||
42 | - i3GEOadmin.renderizacao.dicionario, | ||
43 | - json.dados, | ||
44 | - { | ||
45 | - "codigo": codigo, | ||
46 | - "id_tema": id_tema, | ||
47 | - "onSalvar": "i3GEOadmin.renderizacao.salvar", | ||
48 | - "cache": function(){ | ||
49 | - var hash = { | ||
50 | - "sim": i3GEOadmin.renderizacao.dicionario.sim, | ||
51 | - "nao": i3GEOadmin.renderizacao.dicionario.nao, | ||
52 | - "NAO-sel" : "", | ||
53 | - "SIM-sel": "" | ||
54 | - }; | ||
55 | - hash[json.dados.cache + "-sel"] = "selected"; | ||
56 | - return Mustache.to_html( | ||
57 | - $("#templateOpcoesPublicado").html(), | ||
58 | - hash | ||
59 | - ); | ||
60 | - }, | ||
61 | - "tiles": function(){ | ||
62 | - var hash = { | ||
63 | - "sim": i3GEOadmin.renderizacao.dicionario.sim, | ||
64 | - "nao": i3GEOadmin.renderizacao.dicionario.nao, | ||
65 | - "NAO-sel" : "", | ||
66 | - "SIM-sel": "" | ||
67 | - }; | ||
68 | - hash[json.dados.tiles + "-sel"] = "selected"; | ||
69 | - return Mustache.to_html( | ||
70 | - $("#templateOpcoesPublicado").html(), | ||
71 | - hash | ||
72 | - ); | ||
73 | - } | ||
74 | - } | ||
75 | - ) | ||
76 | - ) | ||
77 | - ); | ||
78 | - $.material.init(); | ||
79 | - } | ||
80 | - ) | ||
81 | - .fail( | ||
82 | - function(data){ | ||
83 | - i3GEOadmin.core.modalAguarde(false); | ||
84 | - i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); | ||
85 | - } | 27 | + inicia: function(codigo, id_tema){ |
28 | + i3GEOadmin.core.modalAguarde(true); | ||
29 | + $.post( | ||
30 | + "exec.php?funcao=lista", | ||
31 | + "codigo="+codigo | ||
32 | + ) | ||
33 | + .done( | ||
34 | + function(data, status){ | ||
35 | + i3GEOadmin.core.modalAguarde(false); | ||
36 | + var json = jQuery.parseJSON(data); | ||
37 | + $("#corpo").html( | ||
38 | + Mustache.to_html( | ||
39 | + $("#templateFormRenderizacao").html(), | ||
40 | + $.extend( | ||
41 | + {}, | ||
42 | + i3GEOadmin.renderizacao.dicionario, | ||
43 | + json.dados, | ||
44 | + { | ||
45 | + "codigo": codigo, | ||
46 | + "id_tema": id_tema, | ||
47 | + "onSalvar": "i3GEOadmin.renderizacao.salvar", | ||
48 | + "cache": function(){ | ||
49 | + var hash = { | ||
50 | + "sim": i3GEOadmin.renderizacao.dicionario.sim, | ||
51 | + "nao": i3GEOadmin.renderizacao.dicionario.nao, | ||
52 | + "NAO-sel" : "", | ||
53 | + "SIM-sel": "" | ||
54 | + }; | ||
55 | + hash[json.dados.cache + "-sel"] = "selected"; | ||
56 | + return Mustache.to_html( | ||
57 | + $("#templateOpcoesPublicado").html(), | ||
58 | + hash | ||
59 | + ); | ||
60 | + }, | ||
61 | + "tiles": function(){ | ||
62 | + var hash = { | ||
63 | + "sim": i3GEOadmin.renderizacao.dicionario.sim, | ||
64 | + "nao": i3GEOadmin.renderizacao.dicionario.nao, | ||
65 | + "NAO-sel" : "", | ||
66 | + "SIM-sel": "" | ||
67 | + }; | ||
68 | + hash[json.dados.tiles + "-sel"] = "selected"; | ||
69 | + return Mustache.to_html( | ||
70 | + $("#templateOpcoesPublicado").html(), | ||
71 | + hash | ||
72 | + ); | ||
73 | + } | ||
74 | + } | ||
75 | + ) | ||
76 | + ) | ||
86 | ); | 77 | ); |
87 | - }, | ||
88 | - salvar: function(codigo,id_tema){ | ||
89 | - var parametros = $("#form-edicao-renderizacao").serialize(); | ||
90 | - i3GEOadmin.core.modalAguarde(true); | ||
91 | - $.post( | ||
92 | - "exec.php?funcao=alterar", | ||
93 | - "codigo=" + codigo + "&id_tema="+ id_tema+"&"+parametros | ||
94 | - ) | ||
95 | - .done( | ||
96 | - function(data, status){ | ||
97 | - i3GEOadmin.renderizacao.inicia(codigo,id_tema); | ||
98 | - } | ||
99 | - ) | ||
100 | - .fail( | ||
101 | - function(data){ | ||
102 | - i3GEOadmin.core.modalAguarde(false); | ||
103 | - i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); | ||
104 | - } | ||
105 | - ); | ||
106 | - } | 78 | + $.material.init(); |
79 | + } | ||
80 | + ) | ||
81 | + .fail( | ||
82 | + function(data){ | ||
83 | + i3GEOadmin.core.modalAguarde(false); | ||
84 | + i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); | ||
85 | + } | ||
86 | + ); | ||
87 | + }, | ||
88 | + salvar: function(codigo,id_tema){ | ||
89 | + var parametros = $("#form-edicao-renderizacao").serialize(); | ||
90 | + i3GEOadmin.core.modalAguarde(true); | ||
91 | + $.post( | ||
92 | + "exec.php?funcao=alterar", | ||
93 | + "codigo=" + codigo + "&id_tema="+ id_tema+"&"+parametros | ||
94 | + ) | ||
95 | + .done( | ||
96 | + function(data, status){ | ||
97 | + i3GEOadmin.renderizacao.inicia(codigo,id_tema); | ||
98 | + } | ||
99 | + ) | ||
100 | + .fail( | ||
101 | + function(data){ | ||
102 | + i3GEOadmin.core.modalAguarde(false); | ||
103 | + i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); | ||
104 | + } | ||
105 | + ); | ||
106 | + } | ||
107 | }; | 107 | }; |
108 | \ No newline at end of file | 108 | \ No newline at end of file |
admin/catalogo/mapfile/renderizacao/templates/templateFormRenderizacao.php
@@ -21,6 +21,21 @@ | @@ -21,6 +21,21 @@ | ||
21 | <div class="col-md-12"> | 21 | <div class="col-md-12"> |
22 | <div class="form-group form-group-lg"> | 22 | <div class="form-group form-group-lg"> |
23 | <div class="col-md-6"> | 23 | <div class="col-md-6"> |
24 | + <label class="control-label" for="cacheprefixo"> | ||
25 | + {{{cacheprefixoTitulo}}} | ||
26 | + </label> | ||
27 | + <p class="small"> | ||
28 | + {{{Cacheprefixo}}} | ||
29 | + </p> | ||
30 | + </div> | ||
31 | + <div class="col-md-6"> | ||
32 | + <input title="{{{cacheprefixoTitulo}}}" type="text" value="{{{cacheprefixo}}}" class="form-control" name="cacheprefixo" > | ||
33 | + </div> | ||
34 | + </div> | ||
35 | + </div> | ||
36 | + <div class="col-md-12"> | ||
37 | + <div class="form-group form-group-lg"> | ||
38 | + <div class="col-md-6"> | ||
24 | <label class="control-label" for="tiles"> | 39 | <label class="control-label" for="tiles"> |
25 | {{{tilesTitulo}}} | 40 | {{{tilesTitulo}}} |
26 | </label> | 41 | </label> |
admin/dicionario/editormapfile.js
@@ -586,5 +586,15 @@ i3GEOadmin.mapfile.dicionario = { | @@ -586,5 +586,15 @@ i3GEOadmin.mapfile.dicionario = { | ||
586 | pt : "<p><b>Mudanças na versão 7 do Mapserver</b></p><li>Não permite o uso do tipo de layer ANNOTATION. Você deve substituir por um dos tipos permitidos (POINT, LINE, POLYGON...).</li><li>Ao usar CLUSTER substitua Cluster:FeatureCount por Cluster_FeatureCount.</li>", | 586 | pt : "<p><b>Mudanças na versão 7 do Mapserver</b></p><li>Não permite o uso do tipo de layer ANNOTATION. Você deve substituir por um dos tipos permitidos (POINT, LINE, POLYGON...).</li><li>Ao usar CLUSTER substitua Cluster:FeatureCount por Cluster_FeatureCount.</li>", |
587 | en : "<p><b>Changes in Mapserver 7</b></p><li>It does not allow to use ANNOTATION layer type. You must replace it with one of the allowed types (POINT, LINE, POLYGON ...).</li><li>When using CLUSTER replace Cluster: FeatureCount with Cluster_FeatureCount.</li>", | 587 | en : "<p><b>Changes in Mapserver 7</b></p><li>It does not allow to use ANNOTATION layer type. You must replace it with one of the allowed types (POINT, LINE, POLYGON ...).</li><li>When using CLUSTER replace Cluster: FeatureCount with Cluster_FeatureCount.</li>", |
588 | es : "<p><b>Cambios en la versión 7 de Mapserver</b></p><li>No permite el uso del layer del tipo ANNOTATION. Usted debe reemplazarlo por uno de los tipos permitidos (POINT, LINE, POLYGON ...).</li><li>Al utilizar CLUSTER, reemplace Cluster: FeatureCount por Cluster_FeatureCount.</li>" | 588 | es : "<p><b>Cambios en la versión 7 de Mapserver</b></p><li>No permite el uso del layer del tipo ANNOTATION. Usted debe reemplazarlo por uno de los tipos permitidos (POINT, LINE, POLYGON ...).</li><li>Al utilizar CLUSTER, reemplace Cluster: FeatureCount por Cluster_FeatureCount.</li>" |
589 | + } ], | ||
590 | + 'cacheprefixoTitulo' : [ { | ||
591 | + pt : "Prefixo utilizado para o cache", | ||
592 | + en : "", | ||
593 | + es : "" | ||
594 | + } ], | ||
595 | + 'Cacheprefixo' : [ { | ||
596 | + pt : "Prefixo (texto sem caracteres especiais e sem espaços em branco) que será utilizado para dar nome ao arquivo de armazenamento de cache. Você pode alterar esse prefixo quando for necessário utilizar um novo cache, por exemplo, quando for feita alguma alteração na simbologia da camada.", | ||
597 | + en : "", | ||
598 | + es : "" | ||
589 | } ] | 599 | } ] |
590 | }; | 600 | }; |
classesphp/classe_legenda.php
@@ -335,7 +335,7 @@ class Legenda | @@ -335,7 +335,7 @@ class Legenda | ||
335 | $legenda = array(); | 335 | $legenda = array(); |
336 | for ($i = 0; $i < $numlayers; ++ $i) { | 336 | for ($i = 0; $i < $numlayers; ++ $i) { |
337 | $la = $this->mapa->getlayer($i); | 337 | $la = $this->mapa->getlayer($i); |
338 | - if (strtoupper($la->getmetadata("ESCONDIDO")) == "SIM") { | 338 | + if (strtoupper($la->getmetadata("CLASSE")) == "NAO" || strtoupper($la->getmetadata("ESCONDIDO")) == "SIM") { |
339 | $la->set("status", MS_OFF); | 339 | $la->set("status", MS_OFF); |
340 | } | 340 | } |
341 | $desligarLayer = array(); | 341 | $desligarLayer = array(); |
classesphp/classe_mapa.php
@@ -292,7 +292,8 @@ class Mapa | @@ -292,7 +292,8 @@ class Mapa | ||
292 | "utfgrid", | 292 | "utfgrid", |
293 | "maxscaledenom", | 293 | "maxscaledenom", |
294 | "minscaledenom", | 294 | "minscaledenom", |
295 | - "group" | 295 | + "group", |
296 | + "cacheprefixo" | ||
296 | ); | 297 | ); |
297 | foreach ($this->layers as $oLayer) { | 298 | foreach ($this->layers as $oLayer) { |
298 | $sel = "nao"; | 299 | $sel = "nao"; |
@@ -530,7 +531,8 @@ class Mapa | @@ -530,7 +531,8 @@ class Mapa | ||
530 | $utfgrid, | 531 | $utfgrid, |
531 | $oLayer->maxscaledenom, | 532 | $oLayer->maxscaledenom, |
532 | $oLayer->minscaledenom, | 533 | $oLayer->minscaledenom, |
533 | - $oLayer->group | 534 | + $oLayer->group, |
535 | + $oLayer->getmetadata("cacheprefixo") | ||
534 | ); | 536 | ); |
535 | } | 537 | } |
536 | } | 538 | } |
classesphp/mapa_googlemaps.php
@@ -88,6 +88,9 @@ if (@$_SESSION["fingerprint"]) { | @@ -88,6 +88,9 @@ if (@$_SESSION["fingerprint"]) { | ||
88 | if (! isset($_SESSION["map_file"])) { | 88 | if (! isset($_SESSION["map_file"])) { |
89 | exit(); | 89 | exit(); |
90 | } | 90 | } |
91 | +if(!isset($_GET["cacheprefixo"])){ | ||
92 | + $_GET["cacheprefixo"] = ""; | ||
93 | +} | ||
91 | $map_fileX = $_SESSION["map_file"]; | 94 | $map_fileX = $_SESSION["map_file"]; |
92 | $postgis_mapa = $_SESSION["postgis_mapa"]; | 95 | $postgis_mapa = $_SESSION["postgis_mapa"]; |
93 | $cachedir = $_SESSION["cachedir"]; | 96 | $cachedir = $_SESSION["cachedir"]; |
@@ -483,6 +486,7 @@ function salvaCacheImagem() | @@ -483,6 +486,7 @@ function salvaCacheImagem() | ||
483 | if ($layer == "") { | 486 | if ($layer == "") { |
484 | $layer = "fundo"; | 487 | $layer = "fundo"; |
485 | } | 488 | } |
489 | + $layer = $_GET["cacheprefixo"] . $layer; | ||
486 | if ($cachedir == "") { | 490 | if ($cachedir == "") { |
487 | $cachedir = dirname(dirname($map_fileX)) . "/cache"; | 491 | $cachedir = dirname(dirname($map_fileX)) . "/cache"; |
488 | } | 492 | } |
@@ -511,6 +515,7 @@ function carregaCacheImagem() | @@ -511,6 +515,7 @@ function carregaCacheImagem() | ||
511 | if ($layer == "") { | 515 | if ($layer == "") { |
512 | $layer = "fundo"; | 516 | $layer = "fundo"; |
513 | } | 517 | } |
518 | + $layer = $_GET["cacheprefixo"] . $layer; | ||
514 | if ($cachedir == "") { | 519 | if ($cachedir == "") { |
515 | $cachedir = dirname(dirname($map_fileX)) . "/cache"; | 520 | $cachedir = dirname(dirname($map_fileX)) . "/cache"; |
516 | } | 521 | } |
classesphp/mapa_openlayers.php
@@ -61,6 +61,9 @@ if (! function_exists('ms_GetVersion')) { | @@ -61,6 +61,9 @@ if (! function_exists('ms_GetVersion')) { | ||
61 | } | 61 | } |
62 | error_reporting(0); | 62 | error_reporting(0); |
63 | inicializa(); | 63 | inicializa(); |
64 | +if(!isset($_GET["cacheprefixo"])){ | ||
65 | + $_GET["cacheprefixo"] = ""; | ||
66 | +} | ||
64 | // | 67 | // |
65 | // calcula a extensao geografica com base no x,y,z | 68 | // calcula a extensao geografica com base no x,y,z |
66 | // nos casos do modo notile, a requisicao e feita como se fosse um wms | 69 | // nos casos do modo notile, a requisicao e feita como se fosse um wms |
@@ -115,6 +118,10 @@ if (isset($_GET["TileMatrix"])) { | @@ -115,6 +118,10 @@ if (isset($_GET["TileMatrix"])) { | ||
115 | } | 118 | } |
116 | 119 | ||
117 | $_GET["tms"] = "/wmts/" . $_GET["layer"] . "/" . $z . "/" . $x . "/" . $y . ".png"; | 120 | $_GET["tms"] = "/wmts/" . $_GET["layer"] . "/" . $z . "/" . $x . "/" . $y . ".png"; |
121 | + if($_GET["cacheprefixo"] != ""){ | ||
122 | + $_GET["tms"] = "/wmts/" . $_GET["cacheprefixo"] . $_GET["layer"] . "/" . $z . "/" . $x . "/" . $y . ".png"; | ||
123 | + } | ||
124 | + | ||
118 | if ($z . "/" . $x . "/" . $y == "0/0/0" || $x == - 1 || $y == - 1) { | 125 | if ($z . "/" . $x . "/" . $y == "0/0/0" || $x == - 1 || $y == - 1) { |
119 | return; | 126 | return; |
120 | } | 127 | } |
@@ -514,9 +521,13 @@ function salvaCacheImagem($cachedir, $map, $tms) | @@ -514,9 +521,13 @@ function salvaCacheImagem($cachedir, $map, $tms) | ||
514 | { | 521 | { |
515 | global $img, $cortePixels; | 522 | global $img, $cortePixels; |
516 | if ($cachedir == "") { | 523 | if ($cachedir == "") { |
517 | - $nome = dirname(dirname($map)) . "/cache" . $tms; | 524 | + |
525 | + $nome = dirname(dirname($map)) . "/cache" . $tms; | ||
526 | + | ||
518 | } else { | 527 | } else { |
519 | - $nome = $cachedir . $tms; | 528 | + |
529 | + $nome = $cachedir . $tms; | ||
530 | + | ||
520 | } | 531 | } |
521 | $nome = str_replace(".png", "", $nome); | 532 | $nome = str_replace(".png", "", $nome); |
522 | $nome = $nome . ".png"; | 533 | $nome = $nome . ".png"; |
@@ -564,7 +575,6 @@ function carregaCacheImagem($cachedir, $map, $tms, $i3georendermode = 0, $format | @@ -564,7 +575,6 @@ function carregaCacheImagem($cachedir, $map, $tms, $i3georendermode = 0, $format | ||
564 | 575 | ||
565 | exit(); | 576 | exit(); |
566 | } | 577 | } |
567 | - | ||
568 | } | 578 | } |
569 | 579 | ||
570 | function nomeRand($n = 10) | 580 | function nomeRand($n = 10) |
ferramentas/carregamapa/upload.php
@@ -92,6 +92,7 @@ if (isset($_FILES['i3GEOcarregamapafilemap']['name']) && strlen(basename($_FILES | @@ -92,6 +92,7 @@ if (isset($_FILES['i3GEOcarregamapafilemap']['name']) && strlen(basename($_FILES | ||
92 | $numlayers = $mapt->numlayers; | 92 | $numlayers = $mapt->numlayers; |
93 | for ($i=0;$i < $numlayers;$i++){ | 93 | for ($i=0;$i < $numlayers;$i++){ |
94 | $layert = $mapt->getlayer($i); | 94 | $layert = $mapt->getlayer($i); |
95 | + $layert->setmetadata("cache","nao"); | ||
95 | // | 96 | // |
96 | //verifica se existe o tema em i3geo/temas | 97 | //verifica se existe o tema em i3geo/temas |
97 | // | 98 | // |
js/interface.js
@@ -1059,7 +1059,7 @@ i3GEO.Interface = | @@ -1059,7 +1059,7 @@ i3GEO.Interface = | ||
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | if (camada.cache) { | 1061 | if (camada.cache) { |
1062 | - urllayer = url + "&cache=" + camada.cache; | 1062 | + urllayer = url + "&cache=" + camada.cache + "&cacheprefixo=" + camada.cacheprefixo; |
1063 | } else { | 1063 | } else { |
1064 | urllayer = url + "&cache=nao"; | 1064 | urllayer = url + "&cache=nao"; |
1065 | } | 1065 | } |
temas/_lbiomashp.map
@@ -8,37 +8,39 @@ MAP | @@ -8,37 +8,39 @@ MAP | ||
8 | CONNECTION "" | 8 | CONNECTION "" |
9 | DATA "/var/www/i3geo/aplicmap/dados/biomas.shp" | 9 | DATA "/var/www/i3geo/aplicmap/dados/biomas.shp" |
10 | METADATA | 10 | METADATA |
11 | - "cache" "nao" | 11 | + "cache" "SIM" |
12 | + "cacheprefixo" "prefixo" | ||
12 | "CLASSE" "SIM" | 13 | "CLASSE" "SIM" |
13 | "animagif" "" | 14 | "animagif" "" |
14 | "permitekmz" "SIM" | 15 | "permitekmz" "SIM" |
15 | "ITENSDESC" "Teste de acentuação" | 16 | "ITENSDESC" "Teste de acentuação" |
16 | - "editavel" "" | ||
17 | - "ESCALA" "250000" | ||
18 | "TILES" "SIM" | 17 | "TILES" "SIM" |
18 | + "ESCALA" "250000" | ||
19 | + "editavel" "" | ||
19 | "extensao" "-73.990940816816 -33.74827031115 -34.822855820777 5.272224303909" | 20 | "extensao" "-73.990940816816 -33.74827031115 -34.822855820777 5.272224303909" |
20 | "FUNCOESJS" '[{"titulo":"teste fake"},{"titulo":"teste de nome de uma função","script":"../aplicmap/dados/testefuncaojs.js","funcao":"funcao1","parametros":["CD_LEGENDA"]}]' | 21 | "FUNCOESJS" '[{"titulo":"teste fake"},{"titulo":"teste de nome de uma função","script":"../aplicmap/dados/testefuncaojs.js","funcao":"funcao1","parametros":["CD_LEGENDA"]}]' |
21 | "permitedownload" "SIM" | 22 | "permitedownload" "SIM" |
22 | "permitecomentario" "NAO" | 23 | "permitecomentario" "NAO" |
23 | "escondido" "NAO" | 24 | "escondido" "NAO" |
24 | - "esquematabelaeditavel" "" | ||
25 | "download" "SIM" | 25 | "download" "SIM" |
26 | + "esquematabelaeditavel" "" | ||
26 | "UTFDATA" "" | 27 | "UTFDATA" "" |
27 | "itembuscarapida" "CD_LEGENDA" | 28 | "itembuscarapida" "CD_LEGENDA" |
28 | - "tme" "" | ||
29 | "ITENS" "CD_LEGENDA" | 29 | "ITENS" "CD_LEGENDA" |
30 | - "transitioneffect" "NAO" | ||
31 | - "permiteogc" "SIM" | 30 | + "TIP" "CD_LEGENDA" |
31 | + "ITENSDESC" "CD_LEGENDA" | ||
32 | + "tme" "" | ||
32 | "permitekml" "SIM" | 33 | "permitekml" "SIM" |
33 | - "TEMA" "Biomas shapefile (acentuação)" | 34 | + "permiteogc" "SIM" |
35 | + "transitioneffect" "NAO" | ||
34 | "convcaracter" "SIM" | 36 | "convcaracter" "SIM" |
35 | - "colunageometria" "" | 37 | + "TEMA" "Biomas shapefile (acentuação)" |
36 | "colunaidunico" "" | 38 | "colunaidunico" "" |
37 | - "identifica" "sim" | ||
38 | - "storymap" "" | 39 | + "colunageometria" "" |
40 | + "identifica" "nao" | ||
39 | "tabelaeditavel" "" | 41 | "tabelaeditavel" "" |
42 | + "storymap" "" | ||
40 | END # METADATA | 43 | END # METADATA |
41 | - #MAXSCALEDENOM 5000000 | ||
42 | NAME "_lbiomashp" | 44 | NAME "_lbiomashp" |
43 | PROCESSING "ITEMS=CD_LEGENDA" | 45 | PROCESSING "ITEMS=CD_LEGENDA" |
44 | PROCESSING "LABEL_NO_CLIP=True" | 46 | PROCESSING "LABEL_NO_CLIP=True" |