Commit 34c6b428ea7c0918ff50f644785816e1d9ec1947
1 parent
34a04822
Exists in
master
and in
7 other branches
--no commit message
Showing
2 changed files
with
9 additions
and
3 deletions
Show diff stats
mashups/openlayers.js.php
@@ -173,7 +173,10 @@ i3GEO.editorOL = { | @@ -173,7 +173,10 @@ i3GEO.editorOL = { | ||
173 | eval("i3GEO.editorOL."+fundo[i]+".setVisibility(false);"); | 173 | eval("i3GEO.editorOL."+fundo[i]+".setVisibility(false);"); |
174 | eval("alayers.push(i3GEO.editorOL."+fundo[i]+");"); | 174 | eval("alayers.push(i3GEO.editorOL."+fundo[i]+");"); |
175 | } | 175 | } |
176 | - catch(e){alayers[0].setVisibility(true);} | 176 | + catch(e){ |
177 | + if(alayers[0]) | ||
178 | + alayers[0].setVisibility(true); | ||
179 | + } | ||
177 | } | 180 | } |
178 | } | 181 | } |
179 | i3GEO.editorOL.mapa.addLayers(alayers); | 182 | i3GEO.editorOL.mapa.addLayers(alayers); |
@@ -629,7 +632,7 @@ i3GEO.editorOL = { | @@ -629,7 +632,7 @@ i3GEO.editorOL = { | ||
629 | button = new OpenLayers.Control.Button({ | 632 | button = new OpenLayers.Control.Button({ |
630 | displayClass: "editorOLzoomtot", | 633 | displayClass: "editorOLzoomtot", |
631 | trigger: function(){i3GEO.editorOL.mapa.zoomToMaxExtent();}, | 634 | trigger: function(){i3GEO.editorOL.mapa.zoomToMaxExtent();}, |
632 | - title: "ajusta extensão" | 635 | + title: "ajusta extensão" |
633 | }); | 636 | }); |
634 | controles.push(button); | 637 | controles.push(button); |
635 | adiciona = true; | 638 | adiciona = true; |
mashups/openlayers.php
@@ -292,10 +292,13 @@ i3GEO.editorOL.tiles = "<?php | @@ -292,10 +292,13 @@ i3GEO.editorOL.tiles = "<?php | ||
292 | echo "i3GEO.editorOL.numzoom = ".$numzoomlevels.";"; | 292 | echo "i3GEO.editorOL.numzoom = ".$numzoomlevels.";"; |
293 | } | 293 | } |
294 | ?> | 294 | ?> |
295 | -<?php if(isset($maxextent)){ | 295 | +<?php |
296 | +if(isset($maxextent)){ | ||
296 | $maxextent = str_replace(" ",",",$maxextent); | 297 | $maxextent = str_replace(" ",",",$maxextent); |
297 | echo "i3GEO.editorOL.maxext = new OpenLayers.Bounds(".$maxextent.");"; | 298 | echo "i3GEO.editorOL.maxext = new OpenLayers.Bounds(".$maxextent.");"; |
298 | } | 299 | } |
300 | +else | ||
301 | +{echo "i3GEO.editorOL.maxext = new OpenLayers.Bounds(-76.5125927,-39.3925675209,-29.5851853,9.49014852081);";} | ||
299 | ?> | 302 | ?> |
300 | <?php if(isset($mapext)){ | 303 | <?php if(isset($mapext)){ |
301 | $mapext = str_replace(" ",",",$mapext); | 304 | $mapext = str_replace(" ",",",$mapext); |