Commit c4b38cbe19e462145595161eefc10c984ac112b3
1 parent
f4653612
Exists in
master
and in
7 other branches
Alteração no mashup openlayers para funcionar com a opção allOverlays (ver api d…
…o openlayers) quando o parametro &fundo for vazio
Showing
3 changed files
with
19 additions
and
11 deletions
Show diff stats
admin/admin.db
No preview for this file type
mashups/openlayers.js
... | ... | @@ -179,15 +179,17 @@ i3GEO.editorOL = { |
179 | 179 | } |
180 | 180 | if(i3GEO.editorOL.fundo != ""){ |
181 | 181 | for(i=nfundo-1;i>=0;i--){ |
182 | - try{ | |
183 | - eval("i3GEO.editorOL."+fundo[i]+".transitionEffect = 'resize';"); | |
184 | - eval("i3GEO.editorOL."+fundo[i]+".setVisibility(false);"); | |
185 | - eval("i3GEO.editorOL."+fundo[i]+".singleTile = single;"); | |
186 | - eval("alayers.push(i3GEO.editorOL."+fundo[i]+");"); | |
187 | - } | |
188 | - catch(e){ | |
189 | - if(alayers[0]) | |
190 | - {alayers[0].setVisibility(true);} | |
182 | + if(fundo[i] != ""){ | |
183 | + try{ | |
184 | + eval("i3GEO.editorOL."+fundo[i]+".transitionEffect = 'resize';"); | |
185 | + eval("i3GEO.editorOL."+fundo[i]+".setVisibility(false);"); | |
186 | + eval("i3GEO.editorOL."+fundo[i]+".singleTile = single;"); | |
187 | + eval("alayers.push(i3GEO.editorOL."+fundo[i]+");"); | |
188 | + } | |
189 | + catch(e){ | |
190 | + if(alayers[0]) | |
191 | + {alayers[0].setVisibility(true);} | |
192 | + } | |
191 | 193 | } |
192 | 194 | } |
193 | 195 | } | ... | ... |
mashups/openlayers.php
... | ... | @@ -115,13 +115,13 @@ if(isset($temas)){ |
115 | 115 | if($temas != "") |
116 | 116 | { |
117 | 117 | $temas = str_replace(" ",",",$temas); |
118 | - $temas = strtolower($temas); | |
118 | + //$temas = strtolower($temas); | |
119 | 119 | $temas = explode(",",$temas); |
120 | 120 | if(!isset($visiveis)) |
121 | 121 | {$visiveis = $temas;} |
122 | 122 | else{ |
123 | 123 | $visiveis = str_replace(" ",",",$visiveis); |
124 | - $visiveis = strtolower($visiveis); | |
124 | + //$visiveis = strtolower($visiveis); | |
125 | 125 | $visiveis = explode(",",$visiveis); |
126 | 126 | } |
127 | 127 | $objOpenLayers = array(); |
... | ... | @@ -207,6 +207,7 @@ Parâmetros: |
207 | 207 | fundo - lista com os nomes, separados por ',' dos layers que serão usados como fundo para o mapa. Se não for definido, |
208 | 208 | será usado o default. O primeiro da lista será o fundo ativo. Se na lista de temas de fundo estiver algum |
209 | 209 | tema incluido com o parametro 'temas', esses serão incluídos como temas de fundo. |
210 | + Quando for vazio, o ultimo layer sera considerado como o layer de fundo | |
210 | 211 | Os seguintes fundos podem usados nessa lista: |
211 | 212 | |
212 | 213 | e_oce - ESRI Ocean Basemap |
... | ... | @@ -389,6 +390,11 @@ else |
389 | 390 | } |
390 | 391 | ?> |
391 | 392 | i3GEO.editorOL.mapa = new OpenLayers.Map('i3geoMapa',{controls:[]}); |
393 | +<?php if(empty($fundo)){ | |
394 | + echo "i3GEO.editorOL.mapa.allOverlays = true;"; | |
395 | +} | |
396 | +?> | |
397 | + | |
392 | 398 | i3GEO.editorOL.inicia(); |
393 | 399 | </script> |
394 | 400 | </body> | ... | ... |