Commit e347e93c2057394920fa147b2aa20e934c0d70b2
1 parent
8de0b701
Exists in
master
and in
7 other branches
Inclusão da opção format=application/openlayers
Showing
1 changed file
with
19 additions
and
1 deletions
Show diff stats
ogc.php
| @@ -43,6 +43,9 @@ legenda - mostra a legenda no corpo do mapa sim|nao | @@ -43,6 +43,9 @@ legenda - mostra a legenda no corpo do mapa sim|nao | ||
| 43 | 43 | ||
| 44 | perfil - perfil utilizado para escolher os menus | 44 | perfil - perfil utilizado para escolher os menus |
| 45 | 45 | ||
| 46 | +format - (opcional) pode ser utilizado a opção &format=application/openlayers para abrir o mashup do OpenLayers com as camadas definida em temas, exemplo | ||
| 47 | + http://localhost/i3geo/ogc.php?temas=biomashp&format=application/openlayers&bbox=-54,-14,-50,-10 | ||
| 48 | + | ||
| 46 | Exemplos: | 49 | Exemplos: |
| 47 | 50 | ||
| 48 | ogc.php?lista=temas | 51 | ogc.php?lista=temas |
| @@ -68,6 +71,20 @@ require_once("classesphp/carrega_ext.php"); | @@ -68,6 +71,20 @@ require_once("classesphp/carrega_ext.php"); | ||
| 68 | include("ms_configura.php"); | 71 | include("ms_configura.php"); |
| 69 | include("classesphp/pega_variaveis.php"); | 72 | include("classesphp/pega_variaveis.php"); |
| 70 | include("classesphp/classe_menutemas.php"); | 73 | include("classesphp/classe_menutemas.php"); |
| 74 | +if(!isset($temas) && isset($tema)) | ||
| 75 | +{$temas = $tema;} | ||
| 76 | +// | ||
| 77 | +//para operar como o Geoserver | ||
| 78 | +// | ||
| 79 | +if(isset($format) && strtolower($format) == "application/openlayers"){ | ||
| 80 | + if(!isset($layers)) | ||
| 81 | + {$layers = $temas;} | ||
| 82 | + $urln = "mashups/openlayers.php?temas=".$layers."&layers=".$layers."&mapext=".$bbox."&botoes=pan,zoombox,zoomtot,identifica"; | ||
| 83 | + if(!headers_sent()) | ||
| 84 | + {header("Location:".$urln);} | ||
| 85 | + else | ||
| 86 | + {echo "<meta http-equiv='refresh' content='0;url=$urln'>";} | ||
| 87 | +} | ||
| 71 | // | 88 | // |
| 72 | //pega os endereços para compor a url de chamada do gerador de web services | 89 | //pega os endereços para compor a url de chamada do gerador de web services |
| 73 | //ogc.php | 90 | //ogc.php |
| @@ -321,10 +338,11 @@ else | @@ -321,10 +338,11 @@ else | ||
| 321 | } | 338 | } |
| 322 | } | 339 | } |
| 323 | } | 340 | } |
| 324 | - | ||
| 325 | ms_ioinstallstdouttobuffer(); | 341 | ms_ioinstallstdouttobuffer(); |
| 326 | $oMap->owsdispatch($req); | 342 | $oMap->owsdispatch($req); |
| 327 | $contenttype = ms_iostripstdoutbuffercontenttype(); | 343 | $contenttype = ms_iostripstdoutbuffercontenttype(); |
| 344 | +if(strtolower($request) == "getcapabilities") | ||
| 345 | +{header('Content-Disposition: attachment; filename=getcapabilities.xml"');} | ||
| 328 | //header("Content-type: application/xml"); | 346 | //header("Content-type: application/xml"); |
| 329 | header("Content-type: $contenttype"); | 347 | header("Content-type: $contenttype"); |
| 330 | 348 |