Commit ace988ee58b5c2607c85d347def1e5f74a27b260
1 parent
bd257c54
Exists in
master
and in
7 other branches
Atualização do código
Showing
16 changed files
with
131 additions
and
80 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesphp/classe_alteraclasse.php
@@ -75,10 +75,16 @@ class Alteraclasse | @@ -75,10 +75,16 @@ class Alteraclasse | ||
75 | */ | 75 | */ |
76 | function __construct($map_file,$tema="",$locaplic="",$ext="") | 76 | function __construct($map_file,$tema="",$locaplic="",$ext="") |
77 | { | 77 | { |
78 | - //error_reporting(0); | 78 | + include(dirname(__FILE__)."/../ms_configura.php"); |
79 | + $this->postgis_mapa = $postgis_mapa; | ||
80 | + | ||
79 | include_once(dirname(__FILE__)."/funcoes_gerais.php"); | 81 | include_once(dirname(__FILE__)."/funcoes_gerais.php"); |
82 | + | ||
80 | $this->locaplic = $locaplic; | 83 | $this->locaplic = $locaplic; |
84 | + | ||
81 | $this->mapa = ms_newMapObj($map_file); | 85 | $this->mapa = ms_newMapObj($map_file); |
86 | + substituiConObj($this->mapa,$postgis_mapa); | ||
87 | + | ||
82 | $this->arquivo = str_replace(".map","",$map_file).".map"; | 88 | $this->arquivo = str_replace(".map","",$map_file).".map"; |
83 | $this->layer = ""; | 89 | $this->layer = ""; |
84 | if($tema != "" && @$this->mapa->getlayerbyname($tema)){ | 90 | if($tema != "" && @$this->mapa->getlayerbyname($tema)){ |
@@ -99,12 +105,8 @@ class Alteraclasse | @@ -99,12 +105,8 @@ class Alteraclasse | ||
99 | */ | 105 | */ |
100 | function salva() | 106 | function salva() |
101 | { | 107 | { |
102 | - if (connection_aborted()){ | ||
103 | - exit(); | ||
104 | - } | 108 | + restauraConObj($this->mapa,$this->postgis_mapa); |
105 | $this->mapa->save($this->arquivo); | 109 | $this->mapa->save($this->arquivo); |
106 | - include(dirname(__FILE__)."/../ms_configura.php"); | ||
107 | - restauraCon($this->arquivo,$postgis_mapa); | ||
108 | } | 110 | } |
109 | /* | 111 | /* |
110 | Function: aplicacoresrgb | 112 | Function: aplicacoresrgb |
classesphp/classe_analise.php
@@ -100,7 +100,9 @@ class Analise | @@ -100,7 +100,9 @@ class Analise | ||
100 | */ | 100 | */ |
101 | function __construct($map_file,$tema="",$locaplic="",$ext="") | 101 | function __construct($map_file,$tema="",$locaplic="",$ext="") |
102 | { | 102 | { |
103 | - //error_reporting(0); | 103 | + include(dirname(__FILE__)."/../ms_configura.php"); |
104 | + $this->postgis_mapa = $postgis_mapa; | ||
105 | + | ||
104 | $this->qyfile = str_replace(".map",".qy",$map_file); | 106 | $this->qyfile = str_replace(".map",".qy",$map_file); |
105 | include_once(dirname(__FILE__)."/funcoes_gerais.php"); | 107 | include_once(dirname(__FILE__)."/funcoes_gerais.php"); |
106 | if(empty($locaplic)){ | 108 | if(empty($locaplic)){ |
@@ -115,6 +117,8 @@ class Analise | @@ -115,6 +117,8 @@ class Analise | ||
115 | } | 117 | } |
116 | $this->locaplic = $locaplic; | 118 | $this->locaplic = $locaplic; |
117 | $this->mapa = ms_newMapObj($map_file); | 119 | $this->mapa = ms_newMapObj($map_file); |
120 | + substituiConObj($this->mapa,$postgis_mapa); | ||
121 | + | ||
118 | $this->arquivo = str_replace(".map","",$map_file).".map"; | 122 | $this->arquivo = str_replace(".map","",$map_file).".map"; |
119 | if($tema != "" && @$this->mapa->getlayerbyname($tema)) | 123 | if($tema != "" && @$this->mapa->getlayerbyname($tema)) |
120 | { | 124 | { |
@@ -180,12 +184,8 @@ class Analise | @@ -180,12 +184,8 @@ class Analise | ||
180 | */ | 184 | */ |
181 | function salva() | 185 | function salva() |
182 | { | 186 | { |
183 | - if (connection_aborted()){ | ||
184 | - exit(); | ||
185 | - } | ||
186 | - $this->mapa->save($this->arquivo); | ||
187 | - include(dirname(__FILE__)."/../ms_configura.php"); | ||
188 | - restauraCon($this->arquivo,$postgis_mapa); | 187 | + restauraConObj($this->mapa,$this->postgis_mapa); |
188 | + $this->mapa->save($this->arquivo); | ||
189 | } | 189 | } |
190 | 190 | ||
191 | /* | 191 | /* |
classesphp/classe_atributos.php
@@ -100,7 +100,9 @@ class Atributos | @@ -100,7 +100,9 @@ class Atributos | ||
100 | */ | 100 | */ |
101 | function __construct($map_file="",$tema="",$locaplic="",$ext="") | 101 | function __construct($map_file="",$tema="",$locaplic="",$ext="") |
102 | { | 102 | { |
103 | - error_reporting(0); | 103 | + include(dirname(__FILE__)."/../ms_configura.php"); |
104 | + $this->postgis_mapa = $postgis_mapa; | ||
105 | + | ||
104 | if (!function_exists('ms_newMapObj')) { | 106 | if (!function_exists('ms_newMapObj')) { |
105 | return false; | 107 | return false; |
106 | } | 108 | } |
@@ -114,6 +116,8 @@ class Atributos | @@ -114,6 +116,8 @@ class Atributos | ||
114 | $this->qyfile = str_replace(".map",".qy",$map_file); | 116 | $this->qyfile = str_replace(".map",".qy",$map_file); |
115 | $this->locaplic = $locaplic; | 117 | $this->locaplic = $locaplic; |
116 | $this->mapa = ms_newMapObj($map_file); | 118 | $this->mapa = ms_newMapObj($map_file); |
119 | + substituiConObj($this->mapa,$postgis_mapa); | ||
120 | + | ||
117 | $this->arquivo = str_replace(".map","",$map_file).".map"; | 121 | $this->arquivo = str_replace(".map","",$map_file).".map"; |
118 | if($tema != "" && @$this->mapa->getlayerbyname($tema)) | 122 | if($tema != "" && @$this->mapa->getlayerbyname($tema)) |
119 | { | 123 | { |
@@ -139,16 +143,11 @@ class Atributos | @@ -139,16 +143,11 @@ class Atributos | ||
139 | */ | 143 | */ |
140 | function salva() | 144 | function salva() |
141 | { | 145 | { |
142 | - if (connection_aborted()){ | ||
143 | - exit(); | ||
144 | - } | ||
145 | - if($this->mapa->getmetadata("interface") == "googlemaps") | ||
146 | - { | 146 | + if($this->mapa->getmetadata("interface") == "googlemaps"){ |
147 | $this->mapa->setProjection($this->projO); | 147 | $this->mapa->setProjection($this->projO); |
148 | } | 148 | } |
149 | + restauraConObj($this->mapa,$this->postgis_mapa); | ||
149 | $this->mapa->save($this->arquivo); | 150 | $this->mapa->save($this->arquivo); |
150 | - include(dirname(__FILE__)."/../ms_configura.php"); | ||
151 | - restauraCon($this->arquivo,$postgis_mapa); | ||
152 | } | 151 | } |
153 | 152 | ||
154 | /* | 153 | /* |
classesphp/classe_escala.php
@@ -24,7 +24,7 @@ Este programa é distribuído na expectativa de que seja útil | @@ -24,7 +24,7 @@ Este programa é distribuído na expectativa de que seja útil | ||
24 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | 24 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita |
25 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | 25 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. |
26 | Consulte a Licença Pública Geral do GNU para mais detalhes. | 26 | Consulte a Licença Pública Geral do GNU para mais detalhes. |
27 | -Você deve ter recebido uma cópia da Licença Pública Geral do | 27 | +Você deve ter recebido uma c�pia da Licença Pública Geral do |
28 | GNU junto com este programa; se não, escreva para a | 28 | GNU junto com este programa; se não, escreva para a |
29 | Free Software Foundation, Inc., no endereço | 29 | Free Software Foundation, Inc., no endereço |
30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
@@ -68,16 +68,20 @@ $map_file - Endereço do mapfile no servidor. | @@ -68,16 +68,20 @@ $map_file - Endereço do mapfile no servidor. | ||
68 | */ | 68 | */ |
69 | function __construct($map_file,$nomeImagem="",$locaplic="") | 69 | function __construct($map_file,$nomeImagem="",$locaplic="") |
70 | { | 70 | { |
71 | - //error_reporting(0); | ||
72 | - if(file_exists($locaplic."/funcoes_gerais.php")) | ||
73 | - include_once($locaplic."/funcoes_gerais.php"); | ||
74 | - else | ||
75 | - include_once("funcoes_gerais.php"); | ||
76 | - $this->locaplic = $locaplic; | ||
77 | - $this->mapa = ms_newMapObj($map_file); | ||
78 | - $this->arquivo = str_replace(".map","",$map_file).".map"; | ||
79 | - if ($nomeImagem == "") | ||
80 | - {$this->nomeImagem = nomeRandomico();} | 71 | + include(dirname(__FILE__)."/../ms_configura.php"); |
72 | + $this->postgis_mapa = $postgis_mapa; | ||
73 | + | ||
74 | + if(file_exists($locaplic."/funcoes_gerais.php")) | ||
75 | + include_once($locaplic."/funcoes_gerais.php"); | ||
76 | + else | ||
77 | + include_once("funcoes_gerais.php"); | ||
78 | + | ||
79 | + $this->locaplic = $locaplic; | ||
80 | + $this->mapa = ms_newMapObj($map_file); | ||
81 | + substituiConObj($this->mapa,$postgis_mapa); | ||
82 | + $this->arquivo = str_replace(".map","",$map_file).".map"; | ||
83 | + if ($nomeImagem == "") | ||
84 | + {$this->nomeImagem = nomeRandomico();} | ||
81 | } | 85 | } |
82 | /* | 86 | /* |
83 | function: salva | 87 | function: salva |
@@ -87,9 +91,8 @@ Salva o mapfile atual | @@ -87,9 +91,8 @@ Salva o mapfile atual | ||
87 | */ | 91 | */ |
88 | function salva() | 92 | function salva() |
89 | { | 93 | { |
94 | + restauraConObj($this->mapa,$this->postgis_mapa); | ||
90 | $this->mapa->save($this->arquivo); | 95 | $this->mapa->save($this->arquivo); |
91 | - include(dirname(__FILE__)."/../ms_configura.php"); | ||
92 | - restauraCon($this->arquivo,$postgis_mapa); | ||
93 | } | 96 | } |
94 | 97 | ||
95 | /* | 98 | /* |
classesphp/classe_legenda.php
@@ -117,7 +117,9 @@ class Legenda | @@ -117,7 +117,9 @@ class Legenda | ||
117 | 117 | ||
118 | function __construct($map_file="",$locaplic="",$tema="",$template="") | 118 | function __construct($map_file="",$locaplic="",$tema="",$template="") |
119 | { | 119 | { |
120 | - //error_reporting(0); | 120 | + include(dirname(__FILE__)."/../ms_configura.php"); |
121 | + $this->postgis_mapa = $postgis_mapa; | ||
122 | + | ||
121 | include_once(dirname(__FILE__)."/funcoes_gerais.php"); | 123 | include_once(dirname(__FILE__)."/funcoes_gerais.php"); |
122 | $this->v = versao(); | 124 | $this->v = versao(); |
123 | $this->v = $this->v["principal"]; | 125 | $this->v = $this->v["principal"]; |
@@ -127,6 +129,8 @@ class Legenda | @@ -127,6 +129,8 @@ class Legenda | ||
127 | return; | 129 | return; |
128 | } | 130 | } |
129 | $this->mapa = ms_newMapObj($map_file); | 131 | $this->mapa = ms_newMapObj($map_file); |
132 | + substituiConObj($this->mapa,$postgis_mapa); | ||
133 | + | ||
130 | $this->arquivo = str_replace(".map","",$map_file).".map"; | 134 | $this->arquivo = str_replace(".map","",$map_file).".map"; |
131 | if($tema != "" && @$this->mapa->getlayerbyname($tema)) | 135 | if($tema != "" && @$this->mapa->getlayerbyname($tema)) |
132 | { | 136 | { |
@@ -175,9 +179,8 @@ class Legenda | @@ -175,9 +179,8 @@ class Legenda | ||
175 | function salva() | 179 | function salva() |
176 | { | 180 | { |
177 | $this->recalculaSLD(); | 181 | $this->recalculaSLD(); |
182 | + restauraConObj($this->mapa,$this->postgis_mapa); | ||
178 | $this->mapa->save($this->arquivo); | 183 | $this->mapa->save($this->arquivo); |
179 | - include(dirname(__FILE__)."/../ms_configura.php"); | ||
180 | - restauraCon($this->arquivo,$postgis_mapa); | ||
181 | } | 184 | } |
182 | /* | 185 | /* |
183 | function: recalculaSLD | 186 | function: recalculaSLD |
classesphp/classe_mapa.php
@@ -84,7 +84,9 @@ class Mapa | @@ -84,7 +84,9 @@ class Mapa | ||
84 | */ | 84 | */ |
85 | function __construct($map_file,$locaplic="") | 85 | function __construct($map_file,$locaplic="") |
86 | { | 86 | { |
87 | - error_reporting(0); | 87 | + include(dirname(__FILE__)."/../ms_configura.php"); |
88 | + $this->postgis_mapa = $postgis_mapa; | ||
89 | + | ||
88 | if (!function_exists('ms_newMapObj')) { | 90 | if (!function_exists('ms_newMapObj')) { |
89 | return false; | 91 | return false; |
90 | } | 92 | } |
@@ -106,6 +108,8 @@ class Mapa | @@ -106,6 +108,8 @@ class Mapa | ||
106 | return $this->mapa = false; | 108 | return $this->mapa = false; |
107 | } | 109 | } |
108 | $this->mapa = @ms_newMapObj($map_file); | 110 | $this->mapa = @ms_newMapObj($map_file); |
111 | + substituiConObj($this->mapa,$postgis_mapa); | ||
112 | + | ||
109 | $this->arquivo = str_replace(".map","",$map_file).".map"; | 113 | $this->arquivo = str_replace(".map","",$map_file).".map"; |
110 | $c = $this->mapa->numlayers; | 114 | $c = $this->mapa->numlayers; |
111 | for ($i=0;$i < $c;++$i){ | 115 | for ($i=0;$i < $c;++$i){ |
@@ -121,9 +125,8 @@ class Mapa | @@ -121,9 +125,8 @@ class Mapa | ||
121 | */ | 125 | */ |
122 | function salva() | 126 | function salva() |
123 | { | 127 | { |
128 | + restauraConObj($this->mapa,$this->postgis_mapa); | ||
124 | $this->mapa->save($this->arquivo); | 129 | $this->mapa->save($this->arquivo); |
125 | - include(dirname(__FILE__)."/../ms_configura.php"); | ||
126 | - restauraCon($this->arquivo,$postgis_mapa); | ||
127 | } | 130 | } |
128 | /* | 131 | /* |
129 | Method: listaTemasBuscaRapida | 132 | Method: listaTemasBuscaRapida |
classesphp/classe_menutemas.php
@@ -63,9 +63,9 @@ $idioma - (opcional) pt|en|es|it | @@ -63,9 +63,9 @@ $idioma - (opcional) pt|en|es|it | ||
63 | */ | 63 | */ |
64 | function __construct($map_file="",$perfil="",$locaplic="",$urli3geo="",$editores="",$idioma="pt", $filtro="") | 64 | function __construct($map_file="",$perfil="",$locaplic="",$urli3geo="",$editores="",$idioma="pt", $filtro="") |
65 | { | 65 | { |
66 | - if($locaplic == ""){ | ||
67 | - include(dirname(__FILE__)."/../ms_configura.php"); | ||
68 | - } | 66 | + include(dirname(__FILE__)."/../ms_configura.php"); |
67 | + $this->postgis_mapa = $postgis_mapa; | ||
68 | + | ||
69 | $perfil = str_replace(" ",",",$perfil); | 69 | $perfil = str_replace(" ",",",$perfil); |
70 | $this->perfil = explode(",",$perfil); | 70 | $this->perfil = explode(",",$perfil); |
71 | $this->locaplic = $locaplic; | 71 | $this->locaplic = $locaplic; |
@@ -75,6 +75,8 @@ $idioma - (opcional) pt|en|es|it | @@ -75,6 +75,8 @@ $idioma - (opcional) pt|en|es|it | ||
75 | if (($map_file != "") && (file_exists($map_file))) | 75 | if (($map_file != "") && (file_exists($map_file))) |
76 | { | 76 | { |
77 | $this->mapa = ms_newMapObj($map_file); | 77 | $this->mapa = ms_newMapObj($map_file); |
78 | + substituiConObj($this->mapa,$postgis_mapa); | ||
79 | + | ||
78 | $this->arquivo = $map_file; | 80 | $this->arquivo = $map_file; |
79 | if ($this->mapa) | 81 | if ($this->mapa) |
80 | { | 82 | { |
@@ -681,16 +683,16 @@ nrss - (opcional) n&uacute;mero de registros no rss que ser&atilde;o considerado | @@ -681,16 +683,16 @@ nrss - (opcional) n&uacute;mero de registros no rss que ser&atilde;o considerado | ||
681 | //TODO verificar a acentuacao das palavras nessa funcao | 683 | //TODO verificar a acentuacao das palavras nessa funcao |
682 | function removeAcentos($s) | 684 | function removeAcentos($s) |
683 | { | 685 | { |
684 | - $s = ereg_replace("[áàâã]","a",$s); | ||
685 | - $s = ereg_replace("[ÁÀÂÃ]","A",$s); | ||
686 | - $s = ereg_replace("[éèê]","e",$s); | 686 | + $s = ereg_replace("[á�âã]","a",$s); |
687 | + $s = ereg_replace("[Á�ÂÃ]","A",$s); | ||
688 | + $s = ereg_replace("[é�ê]","e",$s); | ||
687 | $s = ereg_replace("[í]","i",$s); | 689 | $s = ereg_replace("[í]","i",$s); |
688 | $s = ereg_replace("[Í]","I",$s); | 690 | $s = ereg_replace("[Í]","I",$s); |
689 | - $s = ereg_replace("[ÉÈÊ]","E",$s); | ||
690 | - $s = ereg_replace("[óòôõ]","o",$s); | ||
691 | - $s = ereg_replace("[ÓÒÔÕ]","O",$s); | ||
692 | - $s = ereg_replace("[úùû]","u",$s); | ||
693 | - $s = ereg_replace("[ÚÙÛ]","U",$s); | 691 | + $s = ereg_replace("[É�Ê]","E",$s); |
692 | + $s = ereg_replace("[��ôõ]","o",$s); | ||
693 | + $s = ereg_replace("[��ÔÕ]","O",$s); | ||
694 | + $s = ereg_replace("[ú��]","u",$s); | ||
695 | + $s = ereg_replace("[��]","U",$s); | ||
694 | $s = str_replace("ç","c",$s); | 696 | $s = str_replace("ç","c",$s); |
695 | $s = str_replace("Ç","C",$s); | 697 | $s = str_replace("Ç","C",$s); |
696 | //$str = htmlentities($s); | 698 | //$str = htmlentities($s); |
classesphp/classe_navegacao.php
@@ -26,7 +26,7 @@ Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til | @@ -26,7 +26,7 @@ Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til | ||
26 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | 26 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita |
27 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | 27 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. |
28 | Consulte a Licença Pública Geral do GNU para mais detalhes. | 28 | Consulte a Licença Pública Geral do GNU para mais detalhes. |
29 | -Você deve ter recebido uma cópia da Licença Pública Geral do | 29 | +Você deve ter recebido uma c�pia da Licença Pública Geral do |
30 | GNU junto com este programa; se não, escreva para a | 30 | GNU junto com este programa; se não, escreva para a |
31 | Free Software Foundation, Inc., no endereço | 31 | Free Software Foundation, Inc., no endereço |
32 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 32 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
@@ -63,12 +63,16 @@ $map_file - string $map_file Endere&ccedil;o do mapfile no servidor. | @@ -63,12 +63,16 @@ $map_file - string $map_file Endere&ccedil;o do mapfile no servidor. | ||
63 | */ | 63 | */ |
64 | function __construct($map_file,$locaplic="") | 64 | function __construct($map_file,$locaplic="") |
65 | { | 65 | { |
66 | - //error_reporting(0); | 66 | + include(dirname(__FILE__)."/../ms_configura.php"); |
67 | + $this->postgis_mapa = $postgis_mapa; | ||
68 | + | ||
67 | if(file_exists($locaplic."/funcoes_gerais.php")) | 69 | if(file_exists($locaplic."/funcoes_gerais.php")) |
68 | include_once($locaplic."/funcoes_gerais.php"); | 70 | include_once($locaplic."/funcoes_gerais.php"); |
69 | else | 71 | else |
70 | include_once("funcoes_gerais.php"); | 72 | include_once("funcoes_gerais.php"); |
73 | + | ||
71 | $this->mapa = ms_newMapObj($map_file); | 74 | $this->mapa = ms_newMapObj($map_file); |
75 | + substituiConObj($this->mapa,$postgis_mapa); | ||
72 | $this->arquivo = str_replace(".map","",$map_file).".map"; | 76 | $this->arquivo = str_replace(".map","",$map_file).".map"; |
73 | } | 77 | } |
74 | /* | 78 | /* |
@@ -78,9 +82,8 @@ Salva o mapfile atual | @@ -78,9 +82,8 @@ Salva o mapfile atual | ||
78 | */ | 82 | */ |
79 | function salva() | 83 | function salva() |
80 | { | 84 | { |
81 | - $this->mapa->save($this->arquivo); | ||
82 | - include(dirname(__FILE__)."/../ms_configura.php"); | ||
83 | - restauraCon($this->arquivo,$postgis_mapa); | 85 | + restauraConObj($this->mapa,$this->postgis_mapa); |
86 | + $this->mapa->save($this->arquivo); | ||
84 | } | 87 | } |
85 | /* | 88 | /* |
86 | function: gravaImagemCorpo (depreciado) | 89 | function: gravaImagemCorpo (depreciado) |
classesphp/classe_selecao.php
@@ -143,8 +143,8 @@ Salva o mapfile atual | @@ -143,8 +143,8 @@ Salva o mapfile atual | ||
143 | if($this->mapa->getmetadata("interface") == "googlemaps"){ | 143 | if($this->mapa->getmetadata("interface") == "googlemaps"){ |
144 | $this->mapa->setProjection($this->projO); | 144 | $this->mapa->setProjection($this->projO); |
145 | } | 145 | } |
146 | + restauraConObj($this->mapa,$this->postgis_mapa); | ||
146 | $this->mapa->save($this->arquivo); | 147 | $this->mapa->save($this->arquivo); |
147 | - restauraCon($this->arquivo,$this->postgis_mapa); | ||
148 | } | 148 | } |
149 | /* | 149 | /* |
150 | function: nSel | 150 | function: nSel |
classesphp/classe_shp.php
@@ -94,6 +94,9 @@ $ext - extensao geogr&aacute;fica que ser&aacute; aplicada ao mapa | @@ -94,6 +94,9 @@ $ext - extensao geogr&aacute;fica que ser&aacute; aplicada ao mapa | ||
94 | if(!function_exists("corRGB")){ | 94 | if(!function_exists("corRGB")){ |
95 | include_once(dirname(__FILE__)."/funcoes_gerais.php"); | 95 | include_once(dirname(__FILE__)."/funcoes_gerais.php"); |
96 | } | 96 | } |
97 | + include(dirname(__FILE__)."/../ms_configura.php"); | ||
98 | + $this->postgis_mapa = $postgis_mapa; | ||
99 | + | ||
97 | $this->v = versao(); | 100 | $this->v = versao(); |
98 | $this->v = $this->v["principal"]; | 101 | $this->v = $this->v["principal"]; |
99 | $this->dbaseExiste = false; | 102 | $this->dbaseExiste = false; |
@@ -103,6 +106,8 @@ $ext - extensao geogr&aacute;fica que ser&aacute; aplicada ao mapa | @@ -103,6 +106,8 @@ $ext - extensao geogr&aacute;fica que ser&aacute; aplicada ao mapa | ||
103 | 106 | ||
104 | if($map_file != ""){ | 107 | if($map_file != ""){ |
105 | $this->mapa = ms_newMapObj($map_file); | 108 | $this->mapa = ms_newMapObj($map_file); |
109 | + substituiConObj($this->mapa,$postgis_mapa); | ||
110 | + | ||
106 | $this->arquivo = str_replace(".map","",$map_file).".map"; | 111 | $this->arquivo = str_replace(".map","",$map_file).".map"; |
107 | $this->tema = $tema; | 112 | $this->tema = $tema; |
108 | if($tema != "" && @$this->mapa->getlayerbyname($tema)){ | 113 | if($tema != "" && @$this->mapa->getlayerbyname($tema)){ |
@@ -127,9 +132,8 @@ Salva o mapfile atual | @@ -127,9 +132,8 @@ Salva o mapfile atual | ||
127 | */ | 132 | */ |
128 | function salva() | 133 | function salva() |
129 | { | 134 | { |
135 | + restauraConObj($this->mapa,$this->postgis_mapa); | ||
130 | $this->mapa->save($this->arquivo); | 136 | $this->mapa->save($this->arquivo); |
131 | - include(dirname(__FILE__)."/../ms_configura.php"); | ||
132 | - restauraCon($this->arquivo,$postgis_mapa); | ||
133 | } | 137 | } |
134 | /* | 138 | /* |
135 | function: criaSHPvazio | 139 | function: criaSHPvazio |
classesphp/classe_temas.php
@@ -117,22 +117,27 @@ $ext - (opcional) extens&atilde;o geogr&aacute;fica que ser&aacute; aplicada ao | @@ -117,22 +117,27 @@ $ext - (opcional) extens&atilde;o geogr&aacute;fica que ser&aacute; aplicada ao | ||
117 | */ | 117 | */ |
118 | function __construct($map_file,$tema=null,$locaplic="",$ext="") | 118 | function __construct($map_file,$tema=null,$locaplic="",$ext="") |
119 | { | 119 | { |
120 | - //error_reporting(0); | 120 | + //error_reporting(0); |
121 | + include(dirname(__FILE__)."/../ms_configura.php"); | ||
122 | + $this->postgis_mapa = $postgis_mapa; | ||
123 | + | ||
121 | $map_file = str_replace(".map","",$map_file).".map"; | 124 | $map_file = str_replace(".map","",$map_file).".map"; |
122 | $this->qyfile = str_replace(".map",".qy",$map_file); | 125 | $this->qyfile = str_replace(".map",".qy",$map_file); |
123 | $this->arquivo = $map_file; | 126 | $this->arquivo = $map_file; |
124 | - if(file_exists($locaplic."/funcoes_gerais.php")) | 127 | + if(file_exists($locaplic."/funcoes_gerais.php")) |
125 | include_once($locaplic."/funcoes_gerais.php"); | 128 | include_once($locaplic."/funcoes_gerais.php"); |
126 | - else | 129 | + else |
127 | include_once("funcoes_gerais.php"); | 130 | include_once("funcoes_gerais.php"); |
131 | + | ||
128 | $this->v = versao(); | 132 | $this->v = versao(); |
129 | $this->vi = $this->v["inteiro"]; | 133 | $this->vi = $this->v["inteiro"]; |
130 | $this->v = $this->v["principal"]; | 134 | $this->v = $this->v["principal"]; |
131 | 135 | ||
132 | - $this->locaplic = $locaplic; | ||
133 | - if($map_file != "") | 136 | + $this->locaplic = $locaplic; |
137 | + if($map_file != "") | ||
134 | { | 138 | { |
135 | $this->mapa = ms_newMapObj($map_file); | 139 | $this->mapa = ms_newMapObj($map_file); |
140 | + substituiConObj($this->mapa,$postgis_mapa); | ||
136 | $this->arquivo = $map_file; | 141 | $this->arquivo = $map_file; |
137 | if($tema != "") | 142 | if($tema != "") |
138 | { | 143 | { |
@@ -170,9 +175,8 @@ Salva o mapfile atual | @@ -170,9 +175,8 @@ Salva o mapfile atual | ||
170 | */ | 175 | */ |
171 | function salva() | 176 | function salva() |
172 | { | 177 | { |
178 | + restauraConObj($this->mapa,$this->postgis_mapa); | ||
173 | $this->mapa->save($this->arquivo); | 179 | $this->mapa->save($this->arquivo); |
174 | - include(dirname(__FILE__)."/../ms_configura.php"); | ||
175 | - restauraCon($this->arquivo,$postgis_mapa); | ||
176 | } | 180 | } |
177 | /* | 181 | /* |
178 | function: pegaMetadata | 182 | function: pegaMetadata |
classesphp/classe_toponimia.php
@@ -26,7 +26,7 @@ Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til | @@ -26,7 +26,7 @@ Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til | ||
26 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | 26 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita |
27 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | 27 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. |
28 | Consulte a Licença Pública Geral do GNU para mais detalhes. | 28 | Consulte a Licença Pública Geral do GNU para mais detalhes. |
29 | -Você deve ter recebido uma cópia da Licença Pública Geral do | 29 | +Você deve ter recebido uma c�pia da Licença Pública Geral do |
30 | GNU junto com este programa; se não, escreva para a | 30 | GNU junto com este programa; se não, escreva para a |
31 | Free Software Foundation, Inc., no endereço | 31 | Free Software Foundation, Inc., no endereço |
32 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 32 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
@@ -91,15 +91,21 @@ $tema - nome do tema que ser&aacute; processado | @@ -91,15 +91,21 @@ $tema - nome do tema que ser&aacute; processado | ||
91 | */ | 91 | */ |
92 | function __construct($map_file,$tema="",$locaplic="") | 92 | function __construct($map_file,$tema="",$locaplic="") |
93 | { | 93 | { |
94 | - //error_reporting(0); | 94 | + include(dirname(__FILE__)."/../ms_configura.php"); |
95 | + $this->postgis_mapa = $postgis_mapa; | ||
96 | + | ||
95 | if(file_exists($locaplic."/funcoes_gerais.php")) | 97 | if(file_exists($locaplic."/funcoes_gerais.php")) |
96 | include_once($locaplic."/funcoes_gerais.php"); | 98 | include_once($locaplic."/funcoes_gerais.php"); |
97 | else | 99 | else |
98 | include_once("funcoes_gerais.php"); | 100 | include_once("funcoes_gerais.php"); |
101 | + | ||
99 | $this->v = versao(); | 102 | $this->v = versao(); |
100 | $this->vi = $this->v["inteiro"]; | 103 | $this->vi = $this->v["inteiro"]; |
101 | $this->v = $this->v["principal"]; | 104 | $this->v = $this->v["principal"]; |
105 | + | ||
102 | $this->mapa = ms_newMapObj($map_file); | 106 | $this->mapa = ms_newMapObj($map_file); |
107 | + substituiConObj($this->mapa,$postgis_mapa); | ||
108 | + | ||
103 | $this->arquivo = str_replace(".map","",$map_file).".map"; | 109 | $this->arquivo = str_replace(".map","",$map_file).".map"; |
104 | if($tema != "" && @$this->mapa->getlayerbyname($tema)) | 110 | if($tema != "" && @$this->mapa->getlayerbyname($tema)) |
105 | $this->layer = $this->mapa->getlayerbyname($tema); | 111 | $this->layer = $this->mapa->getlayerbyname($tema); |
@@ -112,9 +118,8 @@ Salva o mapfile atual | @@ -112,9 +118,8 @@ Salva o mapfile atual | ||
112 | */ | 118 | */ |
113 | function salva() | 119 | function salva() |
114 | { | 120 | { |
121 | + restauraConObj($this->mapa,$this->postgis_mapa); | ||
115 | $this->mapa->save($this->arquivo); | 122 | $this->mapa->save($this->arquivo); |
116 | - include(dirname(__FILE__)."/../ms_configura.php"); | ||
117 | - restauraCon($this->arquivo,$postgis_mapa); | ||
118 | } | 123 | } |
119 | /* | 124 | /* |
120 | function: criaToponimia | 125 | function: criaToponimia |
@@ -171,7 +176,7 @@ $novotema sim|nao Cria um novo tema ou n&atilde;o, nesse &uacute;ltimo caso, a t | @@ -171,7 +176,7 @@ $novotema sim|nao Cria um novo tema ou n&atilde;o, nesse &uacute;ltimo caso, a t | ||
171 | 176 | ||
172 | Retorno: | 177 | Retorno: |
173 | 178 | ||
174 | -{string} - código do layer criado | 179 | +{string} - c�digo do layer criado |
175 | */ | 180 | */ |
176 | function criaToponimia($item,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$tipo,$wrap,$novotema="sim") | 181 | function criaToponimia($item,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$tipo,$wrap,$novotema="sim") |
177 | { | 182 | { |
classesphp/classe_vermultilayer.php
@@ -24,7 +24,7 @@ Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til | @@ -24,7 +24,7 @@ Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til | ||
24 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | 24 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita |
25 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | 25 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. |
26 | Consulte a Licença Pública Geral do GNU para mais detalhes. | 26 | Consulte a Licença Pública Geral do GNU para mais detalhes. |
27 | -Você deve ter recebido uma cópia da Licença Pública Geral do | 27 | +Você deve ter recebido uma c�pia da Licença Pública Geral do |
28 | GNU junto com este programa; se não, escreva para a | 28 | GNU junto com este programa; se não, escreva para a |
29 | Free Software Foundation, Inc., no endereço | 29 | Free Software Foundation, Inc., no endereço |
30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
@@ -47,7 +47,7 @@ class vermultilayer | @@ -47,7 +47,7 @@ class vermultilayer | ||
47 | /* | 47 | /* |
48 | Variavel: $temas | 48 | Variavel: $temas |
49 | 49 | ||
50 | - Lista de códigos dos temas | 50 | + Lista de c�digos dos temas |
51 | */ | 51 | */ |
52 | var $temas; //lista de nomes de temas se for um grupo | 52 | var $temas; //lista de nomes de temas se for um grupo |
53 | /* | 53 | /* |
@@ -71,7 +71,7 @@ class vermultilayer | @@ -71,7 +71,7 @@ class vermultilayer | ||
71 | /* | 71 | /* |
72 | Variavel: $temasvisiveis | 72 | Variavel: $temasvisiveis |
73 | 73 | ||
74 | - Lista com os códigos dos temas visíveis | 74 | + Lista com os c�digos dos temas visíveis |
75 | */ | 75 | */ |
76 | var $temasvisiveis; //temas vi'siveis na escala | 76 | var $temasvisiveis; //temas vi'siveis na escala |
77 | /* | 77 | /* |
@@ -82,11 +82,16 @@ class vermultilayer | @@ -82,11 +82,16 @@ class vermultilayer | ||
82 | parameters: | 82 | parameters: |
83 | $mapfile - arquivo mapfile | 83 | $mapfile - arquivo mapfile |
84 | 84 | ||
85 | - $tema - código do tema que será verificado | 85 | + $tema - c�digo do tema que será verificado |
86 | */ | 86 | */ |
87 | function verifica($mapfile,$tema) //$mapfile = arquivo .map, $tema = nome do layer | 87 | function verifica($mapfile,$tema) //$mapfile = arquivo .map, $tema = nome do layer |
88 | { | 88 | { |
89 | + include(dirname(__FILE__)."/../ms_configura.php"); | ||
90 | + $this->postgis_mapa = $postgis_mapa; | ||
91 | + | ||
89 | $map = ms_newMapObj($mapfile); | 92 | $map = ms_newMapObj($mapfile); |
93 | + substituiConObj($this->mapa,$postgis_mapa); | ||
94 | + | ||
90 | $map->preparequery(); | 95 | $map->preparequery(); |
91 | $escala = $map->scaledenom ; | 96 | $escala = $map->scaledenom ; |
92 | $multilayer = 0; | 97 | $multilayer = 0; |
classesphp/funcoes_gerais.php
@@ -755,11 +755,12 @@ String contendo vari&aacute;veis no formato javascript | @@ -755,11 +755,12 @@ String contendo vari&aacute;veis no formato javascript | ||
755 | */ | 755 | */ |
756 | function retornaReferenciaDinamica($ext="",$w="",$h="") | 756 | function retornaReferenciaDinamica($ext="",$w="",$h="") |
757 | { | 757 | { |
758 | - global $nomeImagem,$map_file,$utilizacgi,$locmapserv,$locaplic,$zoom,$tipo,$interface; | 758 | + global $nomeImagem,$map_file,$utilizacgi,$locmapserv,$locaplic,$zoom,$tipo,$interface,$postgis_mapa; |
759 | // | 759 | // |
760 | //adiciona o tema com o web service com o mapa mundi | 760 | //adiciona o tema com o web service com o mapa mundi |
761 | // | 761 | // |
762 | $objMapa = ms_newMapObj($map_file); | 762 | $objMapa = ms_newMapObj($map_file); |
763 | + substituiConObj($objMapa,$postgis_mapa); | ||
763 | $i = $objMapa->getmetadata("interface"); | 764 | $i = $objMapa->getmetadata("interface"); |
764 | if($i == ""){ | 765 | if($i == ""){ |
765 | $i = $interface; | 766 | $i = $interface; |
@@ -862,6 +863,7 @@ function testaMapa($map_file,$postgis_mapa) | @@ -862,6 +863,7 @@ function testaMapa($map_file,$postgis_mapa) | ||
862 | { | 863 | { |
863 | substituiCon($map_file,$postgis_mapa); | 864 | substituiCon($map_file,$postgis_mapa); |
864 | $objMapa = ms_newMapObj($map_file); | 865 | $objMapa = ms_newMapObj($map_file); |
866 | + substituiConObj($objMapa,$postgis_mapa); | ||
865 | ms_ResetErrorList(); | 867 | ms_ResetErrorList(); |
866 | $img = $objMapa->draw(); | 868 | $img = $objMapa->draw(); |
867 | $erros = ""; | 869 | $erros = ""; |
@@ -975,6 +977,10 @@ function gravaImagemMapa($mapa) | @@ -975,6 +977,10 @@ function gravaImagemMapa($mapa) | ||
975 | { | 977 | { |
976 | if(is_string($mapa)) | 978 | if(is_string($mapa)) |
977 | {$mapa = ms_newMapObj($mapa);} | 979 | {$mapa = ms_newMapObj($mapa);} |
980 | + | ||
981 | + include(dirname(__FILE__)."/../ms_configura.php"); | ||
982 | + substituiConObj($mapa,$postgis_mapa); | ||
983 | + | ||
978 | $imgo = @$mapa->draw(); | 984 | $imgo = @$mapa->draw(); |
979 | if(!$imgo) | 985 | if(!$imgo) |
980 | { | 986 | { |
@@ -1149,8 +1155,10 @@ function xy2imagem($map_file,$xy,$map="") | @@ -1149,8 +1155,10 @@ function xy2imagem($map_file,$xy,$map="") | ||
1149 | if (!is_array($xy)) | 1155 | if (!is_array($xy)) |
1150 | {$xy = explode(" ",$xy);} | 1156 | {$xy = explode(" ",$xy);} |
1151 | $pt = ms_newPointObj(); | 1157 | $pt = ms_newPointObj(); |
1158 | + include(dirname(__FILE__)."/../ms_configura.php"); | ||
1152 | if($map == ""){ | 1159 | if($map == ""){ |
1153 | $map = ms_newMapObj($map_file); | 1160 | $map = ms_newMapObj($map_file); |
1161 | + substituiConObj($map,$postgis_mapa); | ||
1154 | $map = desligatemas($map); | 1162 | $map = desligatemas($map); |
1155 | $map = desligamargem($map); | 1163 | $map = desligamargem($map); |
1156 | $imgo = $map->draw(); | 1164 | $imgo = $map->draw(); |
@@ -1181,9 +1189,11 @@ Retorno: | @@ -1181,9 +1189,11 @@ Retorno: | ||
1181 | */ | 1189 | */ |
1182 | function imagem2xy($map_file,$xy) | 1190 | function imagem2xy($map_file,$xy) |
1183 | { | 1191 | { |
1192 | + include(dirname(__FILE__)."/../ms_configura.php"); | ||
1184 | if (!is_array($xy)) | 1193 | if (!is_array($xy)) |
1185 | {$xy = explode(" ",$xy);} | 1194 | {$xy = explode(" ",$xy);} |
1186 | $map = ms_newMapObj($map_file); | 1195 | $map = ms_newMapObj($map_file); |
1196 | + substituiConObj($map,$postgis_mapa); | ||
1187 | $map = desligatemas($map); | 1197 | $map = desligatemas($map); |
1188 | $map = desligamargem($map); | 1198 | $map = desligamargem($map); |
1189 | $imgo = $map->draw(); | 1199 | $imgo = $map->draw(); |
@@ -1454,6 +1464,7 @@ Retorno: | @@ -1454,6 +1464,7 @@ Retorno: | ||
1454 | */ | 1464 | */ |
1455 | function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE,$prj="",$projetaToMap=true) | 1465 | function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE,$prj="",$projetaToMap=true) |
1456 | { | 1466 | { |
1467 | + include(dirname(__FILE__)."/../ms_configura.php"); | ||
1457 | $versao = versao(); | 1468 | $versao = versao(); |
1458 | $versao = $versao["principal"]; | 1469 | $versao = $versao["principal"]; |
1459 | //para manipular dbf | 1470 | //para manipular dbf |
@@ -1464,7 +1475,10 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE,$prj="",$proj | @@ -1464,7 +1475,10 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE,$prj="",$proj | ||
1464 | include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | 1475 | include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; |
1465 | } | 1476 | } |
1466 | $map = @ms_newMapObj($map_file); | 1477 | $map = @ms_newMapObj($map_file); |
1478 | + substituiConObj($map,$postgis_mapa); | ||
1479 | + | ||
1467 | $layer = $map->getlayerbyname($tema); | 1480 | $layer = $map->getlayerbyname($tema); |
1481 | + | ||
1468 | //e necessario abrir ou nao vai projetar | 1482 | //e necessario abrir ou nao vai projetar |
1469 | $layer->open(); | 1483 | $layer->open(); |
1470 | $prjMapa = $map->getProjection(); | 1484 | $prjMapa = $map->getProjection(); |
@@ -1802,9 +1816,10 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | @@ -1802,9 +1816,10 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
1802 | copy($qyfile,$nqyfile); | 1816 | copy($qyfile,$nqyfile); |
1803 | } | 1817 | } |
1804 | $map->save($map_file); | 1818 | $map->save($map_file); |
1805 | - substituiCon($map_file,$postgis_mapa); | 1819 | + |
1806 | //$map_file agora contem os LAYERS necessários | 1820 | //$map_file agora contem os LAYERS necessários |
1807 | $map = ms_newMapObj($map_file); | 1821 | $map = ms_newMapObj($map_file); |
1822 | + substituiConObj($map,$postgis_mapa); | ||
1808 | // | 1823 | // |
1809 | //verifica se existe mais de um tema (grupo) montando o array com os temas | 1824 | //verifica se existe mais de um tema (grupo) montando o array com os temas |
1810 | //os grupos podem ter o nome do layer em GROUP ao invés de NAME | 1825 | //os grupos podem ter o nome do layer em GROUP ao invés de NAME |
@@ -1863,6 +1878,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | @@ -1863,6 +1878,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
1863 | $nomecopia = $dir_tmp."/".basename($meta); | 1878 | $nomecopia = $dir_tmp."/".basename($meta); |
1864 | //para evitar que tente copiar um arquivo mapfile | 1879 | //para evitar que tente copiar um arquivo mapfile |
1865 | $nomecopia = str_replace(".map","",$nomecopia); | 1880 | $nomecopia = str_replace(".map","",$nomecopia); |
1881 | + $nomecopia = str_replace(".zip","zip",$nomecopia).".zip"; | ||
1866 | if(file_exists($meta)){ | 1882 | if(file_exists($meta)){ |
1867 | if(!file_exists($nomecopia)){ | 1883 | if(!file_exists($nomecopia)){ |
1868 | copy($meta,$nomecopia); | 1884 | copy($meta,$nomecopia); |
@@ -1969,6 +1985,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | @@ -1969,6 +1985,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
1969 | //gera um mapfile para download | 1985 | //gera um mapfile para download |
1970 | // | 1986 | // |
1971 | $nomemapfileurl = ""; | 1987 | $nomemapfileurl = ""; |
1988 | + /* | ||
1972 | if(file_exists($temasdir."/".$tema.".map")){ | 1989 | if(file_exists($temasdir."/".$tema.".map")){ |
1973 | $maptemp = ms_newMapObj($temasdir."/".$tema.".map"); | 1990 | $maptemp = ms_newMapObj($temasdir."/".$tema.".map"); |
1974 | $numlayers = $maptemp->numlayers; | 1991 | $numlayers = $maptemp->numlayers; |
@@ -1984,7 +2001,8 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | @@ -1984,7 +2001,8 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
1984 | $maptemp->save($nomemapfile); | 2001 | $maptemp->save($nomemapfile); |
1985 | $nomemapfileurl = str_replace($radtmp."/","",$nomemapfile); | 2002 | $nomemapfileurl = str_replace($radtmp."/","",$nomemapfile); |
1986 | } | 2003 | } |
1987 | - return array("tema"=>$tema,"mapfile"=>$nomemapfile,"mapfileurl"=>$nomemapfileurl,"arquivos"=>implode(",",$resultado),"nreg"=>$nreg,"datas"=>$dataArquivos, "shape-zip"=>$nomeshp.".zip"); | 2004 | + */ |
2005 | + return array("tema"=>$tema,"mapfile"=>"","mapfileurl"=>"","arquivos"=>implode(",",$resultado),"nreg"=>$nreg,"datas"=>$dataArquivos, "shape-zip"=>$nomeshp.".zip"); | ||
1988 | } | 2006 | } |
1989 | 2007 | ||
1990 | /* | 2008 | /* |
json.php
@@ -125,10 +125,10 @@ autoClasses($l,$oMap); | @@ -125,10 +125,10 @@ autoClasses($l,$oMap); | ||
125 | ms_newLayerObj($oMap, $l); | 125 | ms_newLayerObj($oMap, $l); |
126 | 126 | ||
127 | $oMap->save($nomeMapfileTmp); | 127 | $oMap->save($nomeMapfileTmp); |
128 | -restauraCon($nomeMapfileTmp,$postgis_mapa); | ||
129 | validaAcessoTemas($nomeMapfileTmp,true); | 128 | validaAcessoTemas($nomeMapfileTmp,true); |
130 | - | ||
131 | $oMap = ms_newMapobj($nomeMapfileTmp); | 129 | $oMap = ms_newMapobj($nomeMapfileTmp); |
130 | +restauraCon($nomeMapfileTmp,$postgis_mapa); | ||
131 | + | ||
132 | $layer = $oMap->getlayerbyname($tema); | 132 | $layer = $oMap->getlayerbyname($tema); |
133 | if($layer == ""){ | 133 | if($layer == ""){ |
134 | echo "Layer nao encontrado"; | 134 | echo "Layer nao encontrado"; |