Commit ff54390c8194132c7c971fd9703d66f745ca70ac
1 parent
102f21fa
Exists in
master
and in
7 other branches
Correção de erros do tipo Warning em códigos PHP
Showing
4 changed files
with
40 additions
and
18 deletions
Show diff stats
mashups/openlayers.php
... | ... | @@ -8,7 +8,7 @@ include_once (dirname(__FILE__) . "/../ms_configura.php"); |
8 | 8 | include_once (dirname(__FILE__) . "/../classesphp/sani_request.php"); |
9 | 9 | include_once (dirname(__FILE__) . "/../classesphp/carrega_ext.php"); |
10 | 10 | include_once (dirname(__FILE__) . "/../classesphp/funcoes_gerais.php"); |
11 | -// error_reporting(0); | |
11 | +error_reporting(0); | |
12 | 12 | // variaveis utilizadas |
13 | 13 | $parurl = array_merge($_GET, $_POST); |
14 | 14 | if(count($parurl) == 0){ |
... | ... | @@ -60,14 +60,15 @@ if (isset($parurl["altura"])) { |
60 | 60 | if (isset($parurl["largura"])) { |
61 | 61 | $estilo .= ";width:" . $parurl["largura"] . "px"; |
62 | 62 | } |
63 | -$controles = $parurl["controles"]; | |
63 | + | |
64 | 64 | // |
65 | 65 | // define quais controles serão mostrados no mapa |
66 | 66 | // |
67 | 67 | $objControles = array( |
68 | 68 | "new ol.control.Attribution({collapsible: true})" |
69 | 69 | ); |
70 | -if (isset($controles)) { | |
70 | +if (isset($parurl["controles"])) { | |
71 | + $controles = $parurl["controles"]; | |
71 | 72 | $controles = str_replace(" ", ",", $controles); |
72 | 73 | $controles = strtolower($controles); |
73 | 74 | $controles = explode(",", $controles); |
... | ... | @@ -87,18 +88,19 @@ if (isset($controles)) { |
87 | 88 | $objControles[] = "new ol.control.OverviewMap()"; |
88 | 89 | } |
89 | 90 | } else { |
91 | + $controles = ""; | |
90 | 92 | $objControles[] = "new ol.control.Zoom()"; |
91 | 93 | $objControles[] = "new ol.control.ZoomSlider()"; |
92 | 94 | $objControles[] = "new ol.control.ScaleLine()"; |
93 | 95 | $objControles[] = "new ol.control.MousePosition({coordinateFormat : function(c){return ol.coordinate.toStringHDMS(c);}})"; |
94 | 96 | } |
95 | -$botoes = $parurl["botoes"]; | |
96 | 97 | // |
97 | 98 | // define quais botoes serão mostrados no mapa |
98 | 99 | // |
99 | 100 | $objBotoes = array(); |
100 | 101 | $objBotoesHtml = array(); |
101 | -if (isset($botoes)) { | |
102 | +if (isset($parurl["botoes"])) { | |
103 | + $botoes = $parurl["botoes"]; | |
102 | 104 | $botoes = str_replace(" ", ",", $botoes); |
103 | 105 | $botoes = strtolower($botoes); |
104 | 106 | $botoes = explode(",", $botoes); |
... | ... | @@ -312,7 +314,13 @@ if(isset($parurl["ativarodadomouse"]) && $parurl["ativarodadomouse"] == "false") |
312 | 314 | else{ |
313 | 315 | $ativarodadomouse = "new ol.interaction.MouseWheelZoom(),"; |
314 | 316 | } |
317 | +if(!isset($parurl["legendahtml"])){ | |
318 | + $parurl["legendahtml"] = ""; | |
319 | +} | |
315 | 320 | $legendahtml = $parurl["legendahtml"]; |
321 | +if(!isset($parurl["layerDefault"])){ | |
322 | + $parurl["layerDefault"] = ""; | |
323 | +} | |
316 | 324 | $layerDefault = $parurl["layerDefault"]; |
317 | 325 | // cria as pastas temporarias caso nao existam |
318 | 326 | if (! file_exists($dir_tmp)) { | ... | ... |
mashups/openlayersdebug.php
... | ... | @@ -8,7 +8,7 @@ include_once (dirname(__FILE__) . "/../ms_configura.php"); |
8 | 8 | include_once (dirname(__FILE__) . "/../classesphp/sani_request.php"); |
9 | 9 | include_once (dirname(__FILE__) . "/../classesphp/carrega_ext.php"); |
10 | 10 | include_once (dirname(__FILE__) . "/../classesphp/funcoes_gerais.php"); |
11 | -// error_reporting(0); | |
11 | +//error_reporting(0); | |
12 | 12 | // variaveis utilizadas |
13 | 13 | $parurl = array_merge($_GET, $_POST); |
14 | 14 | if(count($parurl) == 0){ |
... | ... | @@ -60,14 +60,15 @@ if (isset($parurl["altura"])) { |
60 | 60 | if (isset($parurl["largura"])) { |
61 | 61 | $estilo .= ";width:" . $parurl["largura"] . "px"; |
62 | 62 | } |
63 | -$controles = $parurl["controles"]; | |
63 | + | |
64 | 64 | // |
65 | 65 | // define quais controles serão mostrados no mapa |
66 | 66 | // |
67 | 67 | $objControles = array( |
68 | 68 | "new ol.control.Attribution({collapsible: true})" |
69 | 69 | ); |
70 | -if (isset($controles)) { | |
70 | +if (isset($parurl["controles"])) { | |
71 | + $controles = $parurl["controles"]; | |
71 | 72 | $controles = str_replace(" ", ",", $controles); |
72 | 73 | $controles = strtolower($controles); |
73 | 74 | $controles = explode(",", $controles); |
... | ... | @@ -87,18 +88,19 @@ if (isset($controles)) { |
87 | 88 | $objControles[] = "new ol.control.OverviewMap()"; |
88 | 89 | } |
89 | 90 | } else { |
91 | + $controles = ""; | |
90 | 92 | $objControles[] = "new ol.control.Zoom()"; |
91 | 93 | $objControles[] = "new ol.control.ZoomSlider()"; |
92 | 94 | $objControles[] = "new ol.control.ScaleLine()"; |
93 | 95 | $objControles[] = "new ol.control.MousePosition({coordinateFormat : function(c){return ol.coordinate.toStringHDMS(c);}})"; |
94 | 96 | } |
95 | -$botoes = $parurl["botoes"]; | |
96 | 97 | // |
97 | 98 | // define quais botoes serão mostrados no mapa |
98 | 99 | // |
99 | 100 | $objBotoes = array(); |
100 | 101 | $objBotoesHtml = array(); |
101 | -if (isset($botoes)) { | |
102 | +if (isset($parurl["botoes"])) { | |
103 | + $botoes = $parurl["botoes"]; | |
102 | 104 | $botoes = str_replace(" ", ",", $botoes); |
103 | 105 | $botoes = strtolower($botoes); |
104 | 106 | $botoes = explode(",", $botoes); |
... | ... | @@ -312,7 +314,13 @@ if(isset($parurl["ativarodadomouse"]) && $parurl["ativarodadomouse"] == "false") |
312 | 314 | else{ |
313 | 315 | $ativarodadomouse = "new ol.interaction.MouseWheelZoom(),"; |
314 | 316 | } |
317 | +if(!isset($parurl["legendahtml"])){ | |
318 | + $parurl["legendahtml"] = ""; | |
319 | +} | |
315 | 320 | $legendahtml = $parurl["legendahtml"]; |
321 | +if(!isset($parurl["layerDefault"])){ | |
322 | + $parurl["layerDefault"] = ""; | |
323 | +} | |
316 | 324 | $layerDefault = $parurl["layerDefault"]; |
317 | 325 | // cria as pastas temporarias caso nao existam |
318 | 326 | if (! file_exists($dir_tmp)) { |
... | ... | @@ -338,19 +346,21 @@ if (file_exists($dir_tmp)) { |
338 | 346 | if (empty($opacidade)) { |
339 | 347 | $opacidade = 1; |
340 | 348 | } |
341 | - | |
349 | +if(!isset($parurl["fundo"])){ | |
350 | + $parurl["fundo"] = ""; | |
351 | +} | |
342 | 352 | function ajuda() |
343 | 353 | { |
344 | 354 | echo " |
345 | 355 | <pre><b> |
346 | 356 | Mashup OpenLayers |
347 | 357 | Parâmetros: |
348 | - .restauramapa - id do mapa armazenado no sistema de administracao e que será restaurado para ser aberto novamente (veja em i3geo/admin/html/mapas.html) | |
358 | + .restauramapa - id do mapa armazenado no sistema de administracao e que será restaurado para ser aberto novamente (veja em i3geo/admin1/catalogo/mapas/index.php) | |
349 | 359 | .opacidade - opacidade (de 0 a 1) aplicada aos temas do tipo poligonal ou raster (default 1) |
350 | 360 | .kml - lista de endereços (url) de um arquivos kml que serão adicionados ao mapa. Separado por ',' |
351 | 361 | .temas - lista com os temas (mapfiles) do i3Geo que serão incluídos no mapa. Pode ser incluído um arquivo mapfile que esteja fora da pasta i3geo/temas. Nesse caso, deve-se definir o caminho completo do arquivo e também o parâmetro &layers |
352 | 362 | .visiveis - lista de temas (mesmos nomes do parâmetro temas) que iniciarão como visíveis no mapa. Se não for definido, todos os temas serão visíveis. |
353 | - .numzoomlevels - número de níveis de zoom, default=12 | |
363 | + .numzoomlevels - número de níveis de zoom | |
354 | 364 | .maxextent - extensão geográfica máxima do mapa (xmin,ymin,xmax,ymax) |
355 | 365 | .mapext - extensão geográfica inicial do mapa (xmin,ymin,xmax,ymax) |
356 | 366 | .largura - lagura do mapa em pixels |
... | ... | @@ -377,11 +387,9 @@ function ajuda() |
377 | 387 | Os seguintes fundos podem usados nessa lista: (lista completa na variavel i3GEO.Interface.openlayers.LAYERSADICIONAIS que pode ser verificada por meio do console javascript do navegador) |
378 | 388 | |
379 | 389 | eng |
380 | - oce - ESRI Ocean Basemap | |
390 | + oce - ESRI Ocean Basemap | |
381 | 391 | ims - ESRI Imagery World 2D |
382 | 392 | wsm - ESRI World Street Map |
383 | - mma - base cartográfica do Brasil | |
384 | - wms - base mundial da Meta Carta | |
385 | 393 | |
386 | 394 | .controles - lista com os nomes dos controles que serão adicionados ao mapa. Se não for definido, todos os controles serão adicionados |
387 | 395 | navigation |
... | ... | @@ -1259,4 +1267,4 @@ function ajuda() |
1259 | 1267 | </script> |
1260 | 1268 | </body> |
1261 | 1269 | |
1262 | -</html> | |
1270 | +</html> | |
1263 | 1271 | \ No newline at end of file | ... | ... |
mashups/osm.php
... | ... | @@ -8,7 +8,7 @@ include_once (dirname(__FILE__) . "/../ms_configura.php"); |
8 | 8 | include_once (dirname(__FILE__) . "/../classesphp/sani_request.php"); |
9 | 9 | include_once (dirname(__FILE__) . "/../classesphp/carrega_ext.php"); |
10 | 10 | include_once (dirname(__FILE__) . "/../classesphp/funcoes_gerais.php"); |
11 | -// error_reporting(0); | |
11 | +error_reporting(0); | |
12 | 12 | // variaveis utilizadas |
13 | 13 | $parurl = array_merge($_GET, $_POST); |
14 | 14 | if (count($parurl) == 0) { | ... | ... |
ogc/index.php
... | ... | @@ -10,6 +10,12 @@ if ($ogcwsmap == "") { |
10 | 10 | $map = ms_newMapObj ( $ogcwsmap ); |
11 | 11 | $mapext = $map->extent->minx . "," . $map->extent->miny . "," . $map->extent->maxx . "," . $map->extent->maxy; |
12 | 12 | include (ONDEI3GEO."/init/head.php"); |
13 | +if(!isset($_GET["temaOgc"])){ | |
14 | + $_GET["temaOgc"] = ""; | |
15 | +} | |
16 | +if(!isset($_GET["temaDownload"])){ | |
17 | + $_GET["temaDownload"] = ""; | |
18 | +} | |
13 | 19 | ?> |
14 | 20 | <link rel='stylesheet' type='text/css' href='index.css'> |
15 | 21 | <body style="padding-top: 55px;" id="topo"> | ... | ... |