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 | 162 | $url = $imageObj->saveWebImage(); |
| 163 | 163 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
| 164 | 164 | $url = strtolower($protocolo[0]."://".$_SERVER['HTTP_HOST']).$url; |
| 165 | - | |
| 166 | 165 | $legenda = " <ScreenOverlay>" . PHP_EOL |
| 167 | 166 | . " <name>Legenda</name>" . PHP_EOL |
| 168 | 167 | . " <Icon>" . PHP_EOL |
| ... | ... | @@ -180,9 +179,11 @@ class LayerServer { |
| 180 | 179 | $this->out_proj = ms_newProjectionObj("init=epsg:4326"); |
| 181 | 180 | // Set endpoint |
| 182 | 181 | //die($_SERVER['REQUEST_URI']); |
| 182 | + | |
| 183 | 183 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
| 184 | 184 | $protocolo = strtolower($protocolo[0]); |
| 185 | 185 | $this->endpoint = $protocolo . '://'.$_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] ? ':'.$_SERVER['SERVER_PORT'] : '') . $_SERVER['PHP_SELF']; |
| 186 | + | |
| 186 | 187 | // Process request |
| 187 | 188 | if(!$this->has_error()) { |
| 188 | 189 | $this->process_request(); |
| ... | ... | @@ -192,6 +193,7 @@ class LayerServer { |
| 192 | 193 | } |
| 193 | 194 | |
| 194 | 195 | return $this->send_stream($this->get_kml()); |
| 196 | + | |
| 195 | 197 | } |
| 196 | 198 | |
| 197 | 199 | /** |
| ... | ... | @@ -363,6 +365,7 @@ class LayerServer { |
| 363 | 365 | {$namecol = explode(",",$namecol);$namecol = $namecol[0];} |
| 364 | 366 | // Add classes |
| 365 | 367 | $folder =& $this->_xml->Document->addChild('Folder'); |
| 368 | + | |
| 366 | 369 | $class_list = $this->parse_classes($layer, $folder, $namecol, $title_field, $description_template); |
| 367 | 370 | |
| 368 | 371 | //die(print_r($class_list, true)); |
| ... | ... | @@ -372,6 +375,7 @@ class LayerServer { |
| 372 | 375 | //print("$searchfield && $searchstring"); |
| 373 | 376 | if(!isset($searchfield)){$searchfield = false;} |
| 374 | 377 | if(!isset($searchstring)){$searchstring = false;} |
| 378 | + | |
| 375 | 379 | if($searchfield && $searchstring){ |
| 376 | 380 | if(@$layer->queryByAttributes($searchfield, $searchstring, MS_MULTIPLE) == MS_SUCCESS){ |
| 377 | 381 | $layer->open(); |
| ... | ... | @@ -639,7 +643,9 @@ class LayerServer { |
| 639 | 643 | $numclasses = $layer->numclasses; |
| 640 | 644 | for($i = 0; $i < $numclasses; $i++){ |
| 641 | 645 | $class = $layer->getClass($i); |
| 646 | + | |
| 642 | 647 | $label = $class->label; |
| 648 | + | |
| 643 | 649 | if($label){ |
| 644 | 650 | $style['label_color'] = $label->color; |
| 645 | 651 | $style['label_size'] = $label->size; |
| ... | ... | @@ -1134,4 +1140,4 @@ function versao() |
| 1134 | 1140 | return $versao; |
| 1135 | 1141 | } |
| 1136 | 1142 | } |
| 1137 | -?> | |
| 1138 | 1143 | \ No newline at end of file |
| 1144 | +?> | ... | ... |
temas/_lubs.map
| ... | ... | @@ -2,12 +2,12 @@ MAP |
| 2 | 2 | FONTSET "../symbols/fontes.txt" |
| 3 | 3 | SYMBOLSET "../symbols/simbolos.sym" |
| 4 | 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 | 6 | CONNECTIONTYPE POSTGIS |
| 7 | 7 | DATA "the_geom from ( |
| 8 | 8 | SELECT |
| 9 | 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 | 11 | dbgeral.tb_ibge.uf |
| 12 | 12 | ||' ,' |
| 13 | 13 | ||dbgeral.tb_ibge.cidade |
| ... | ... | @@ -23,7 +23,7 @@ MAP |
| 23 | 23 | ON dbsismob.tb_sismob_unid_func.co_ibge = dbgeral.tb_ibge.ibge |
| 24 | 24 | INNER JOIN dbgeral.tb_estab_geo |
| 25 | 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 | 27 | ) as foo using unique cnes using srid=4326" |
| 28 | 28 | METADATA |
| 29 | 29 | "METAESTAT_ID_MEDIDA_VARIAVEL" "" | ... | ... |