Commit 89a1d56537bf1a8af19cca8d3e3acbdfd16593aa
1 parent
15a5e127
Exists in
master
and in
7 other branches
--no commit message
Showing
2 changed files
with
11 additions
and
5 deletions
Show diff stats
pacotes/kmlmapserver/classes/layerserver.class.php
@@ -162,7 +162,6 @@ class LayerServer { | @@ -162,7 +162,6 @@ class LayerServer { | ||
162 | $url = $imageObj->saveWebImage(); | 162 | $url = $imageObj->saveWebImage(); |
163 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | 163 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
164 | $url = strtolower($protocolo[0]."://".$_SERVER['HTTP_HOST']).$url; | 164 | $url = strtolower($protocolo[0]."://".$_SERVER['HTTP_HOST']).$url; |
165 | - | ||
166 | $legenda = " <ScreenOverlay>" . PHP_EOL | 165 | $legenda = " <ScreenOverlay>" . PHP_EOL |
167 | . " <name>Legenda</name>" . PHP_EOL | 166 | . " <name>Legenda</name>" . PHP_EOL |
168 | . " <Icon>" . PHP_EOL | 167 | . " <Icon>" . PHP_EOL |
@@ -180,9 +179,11 @@ class LayerServer { | @@ -180,9 +179,11 @@ class LayerServer { | ||
180 | $this->out_proj = ms_newProjectionObj("init=epsg:4326"); | 179 | $this->out_proj = ms_newProjectionObj("init=epsg:4326"); |
181 | // Set endpoint | 180 | // Set endpoint |
182 | //die($_SERVER['REQUEST_URI']); | 181 | //die($_SERVER['REQUEST_URI']); |
182 | + | ||
183 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | 183 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
184 | $protocolo = strtolower($protocolo[0]); | 184 | $protocolo = strtolower($protocolo[0]); |
185 | $this->endpoint = $protocolo . '://'.$_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] ? ':'.$_SERVER['SERVER_PORT'] : '') . $_SERVER['PHP_SELF']; | 185 | $this->endpoint = $protocolo . '://'.$_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] ? ':'.$_SERVER['SERVER_PORT'] : '') . $_SERVER['PHP_SELF']; |
186 | + | ||
186 | // Process request | 187 | // Process request |
187 | if(!$this->has_error()) { | 188 | if(!$this->has_error()) { |
188 | $this->process_request(); | 189 | $this->process_request(); |
@@ -192,6 +193,7 @@ class LayerServer { | @@ -192,6 +193,7 @@ class LayerServer { | ||
192 | } | 193 | } |
193 | 194 | ||
194 | return $this->send_stream($this->get_kml()); | 195 | return $this->send_stream($this->get_kml()); |
196 | + | ||
195 | } | 197 | } |
196 | 198 | ||
197 | /** | 199 | /** |
@@ -363,6 +365,7 @@ class LayerServer { | @@ -363,6 +365,7 @@ class LayerServer { | ||
363 | {$namecol = explode(",",$namecol);$namecol = $namecol[0];} | 365 | {$namecol = explode(",",$namecol);$namecol = $namecol[0];} |
364 | // Add classes | 366 | // Add classes |
365 | $folder =& $this->_xml->Document->addChild('Folder'); | 367 | $folder =& $this->_xml->Document->addChild('Folder'); |
368 | + | ||
366 | $class_list = $this->parse_classes($layer, $folder, $namecol, $title_field, $description_template); | 369 | $class_list = $this->parse_classes($layer, $folder, $namecol, $title_field, $description_template); |
367 | 370 | ||
368 | //die(print_r($class_list, true)); | 371 | //die(print_r($class_list, true)); |
@@ -372,6 +375,7 @@ class LayerServer { | @@ -372,6 +375,7 @@ class LayerServer { | ||
372 | //print("$searchfield && $searchstring"); | 375 | //print("$searchfield && $searchstring"); |
373 | if(!isset($searchfield)){$searchfield = false;} | 376 | if(!isset($searchfield)){$searchfield = false;} |
374 | if(!isset($searchstring)){$searchstring = false;} | 377 | if(!isset($searchstring)){$searchstring = false;} |
378 | + | ||
375 | if($searchfield && $searchstring){ | 379 | if($searchfield && $searchstring){ |
376 | if(@$layer->queryByAttributes($searchfield, $searchstring, MS_MULTIPLE) == MS_SUCCESS){ | 380 | if(@$layer->queryByAttributes($searchfield, $searchstring, MS_MULTIPLE) == MS_SUCCESS){ |
377 | $layer->open(); | 381 | $layer->open(); |
@@ -639,7 +643,9 @@ class LayerServer { | @@ -639,7 +643,9 @@ class LayerServer { | ||
639 | $numclasses = $layer->numclasses; | 643 | $numclasses = $layer->numclasses; |
640 | for($i = 0; $i < $numclasses; $i++){ | 644 | for($i = 0; $i < $numclasses; $i++){ |
641 | $class = $layer->getClass($i); | 645 | $class = $layer->getClass($i); |
646 | + | ||
642 | $label = $class->label; | 647 | $label = $class->label; |
648 | + | ||
643 | if($label){ | 649 | if($label){ |
644 | $style['label_color'] = $label->color; | 650 | $style['label_color'] = $label->color; |
645 | $style['label_size'] = $label->size; | 651 | $style['label_size'] = $label->size; |
@@ -1134,4 +1140,4 @@ function versao() | @@ -1134,4 +1140,4 @@ function versao() | ||
1134 | return $versao; | 1140 | return $versao; |
1135 | } | 1141 | } |
1136 | } | 1142 | } |
1137 | -?> | ||
1138 | \ No newline at end of file | 1143 | \ No newline at end of file |
1144 | +?> |
temas/_lubs.map
@@ -2,12 +2,12 @@ MAP | @@ -2,12 +2,12 @@ MAP | ||
2 | FONTSET "../symbols/fontes.txt" | 2 | FONTSET "../symbols/fontes.txt" |
3 | SYMBOLSET "../symbols/simbolos.sym" | 3 | SYMBOLSET "../symbols/simbolos.sym" |
4 | LAYER | 4 | LAYER |
5 | - CONNECTION "user=guest_sala password= dbname=dbspo host=10.1.2.25 port=5432" | 5 | + CONNECTION "user=guest_sala password=151617 dbname=dbspo host=10.1.2.25 port=5432" |
6 | CONNECTIONTYPE POSTGIS | 6 | CONNECTIONTYPE POSTGIS |
7 | DATA "the_geom from ( | 7 | DATA "the_geom from ( |
8 | SELECT | 8 | SELECT |
9 | st_geomfromtext('POINT(' || dbgeral.tb_estab_geo.long || ' ' || dbgeral.tb_estab_geo.lat || ')', 4326) as the_geom, | 9 | st_geomfromtext('POINT(' || dbgeral.tb_estab_geo.long || ' ' || dbgeral.tb_estab_geo.lat || ')', 4326) as the_geom, |
10 | - 'UBS - '||dbsismob.tb_sismob_unid_func.no_unidade||' - cnes:'||tb_sismob_unid_func.co_cnes as nome, | 10 | + 'Unidade Básica de Saúde - '||dbsismob.tb_sismob_unid_func.no_unidade as nome, |
11 | dbgeral.tb_ibge.uf | 11 | dbgeral.tb_ibge.uf |
12 | ||' ,' | 12 | ||' ,' |
13 | ||dbgeral.tb_ibge.cidade | 13 | ||dbgeral.tb_ibge.cidade |
@@ -23,7 +23,7 @@ MAP | @@ -23,7 +23,7 @@ MAP | ||
23 | ON dbsismob.tb_sismob_unid_func.co_ibge = dbgeral.tb_ibge.ibge | 23 | ON dbsismob.tb_sismob_unid_func.co_ibge = dbgeral.tb_ibge.ibge |
24 | INNER JOIN dbgeral.tb_estab_geo | 24 | INNER JOIN dbgeral.tb_estab_geo |
25 | ON dbsismob.tb_sismob_unid_func.co_cnes = dbgeral.tb_estab_geo.co_cnes | 25 | ON dbsismob.tb_sismob_unid_func.co_cnes = dbgeral.tb_estab_geo.co_cnes |
26 | - WHERE dbsismob.tb_sismob_unid_func.co_sismob_programa = 1 limit 500 | 26 | + WHERE dbsismob.tb_sismob_unid_func.co_sismob_programa = 1 limit 100 |
27 | ) as foo using unique cnes using srid=4326" | 27 | ) as foo using unique cnes using srid=4326" |
28 | METADATA | 28 | METADATA |
29 | "METAESTAT_ID_MEDIDA_VARIAVEL" "" | 29 | "METAESTAT_ID_MEDIDA_VARIAVEL" "" |