Commit 01b848798a5b61cb0b7c655779717eae95f1c059
1 parent
1c54b3a6
Exists in
master
and in
7 other branches
Adicionado parâmetro para permitir o uso de singletile nos layers do mashups openlayers
Showing
2 changed files
with
17 additions
and
4 deletions
Show diff stats
mashups/openlayers.js.php
| @@ -95,12 +95,14 @@ i3GEO.editorOL = { | @@ -95,12 +95,14 @@ i3GEO.editorOL = { | ||
| 95 | new OpenLayers.Control.OverviewMap(), | 95 | new OpenLayers.Control.OverviewMap(), |
| 96 | new OpenLayers.Control.KeyboardDefaults() | 96 | new OpenLayers.Control.KeyboardDefaults() |
| 97 | ], | 97 | ], |
| 98 | + tiles: true, | ||
| 98 | numzoom: 12, | 99 | numzoom: 12, |
| 99 | maxext: "", | 100 | maxext: "", |
| 100 | mapext: new OpenLayers.Bounds(-76.5125927,-39.3925675209,-29.5851853,9.49014852081), | 101 | mapext: new OpenLayers.Bounds(-76.5125927,-39.3925675209,-29.5851853,9.49014852081), |
| 101 | mapa: "", | 102 | mapa: "", |
| 102 | inicia: function(){ | 103 | inicia: function(){ |
| 103 | - var alayers = [], | 104 | + var single = false, |
| 105 | + alayers = [], | ||
| 104 | fundo = (i3GEO.editorOL.fundo).split(","), | 106 | fundo = (i3GEO.editorOL.fundo).split(","), |
| 105 | nfundo = fundo.length, | 107 | nfundo = fundo.length, |
| 106 | ncontroles = i3GEO.editorOL.controles.length, | 108 | ncontroles = i3GEO.editorOL.controles.length, |
| @@ -177,8 +179,13 @@ i3GEO.editorOL = { | @@ -177,8 +179,13 @@ i3GEO.editorOL = { | ||
| 177 | i3GEO.editorOL.mapa.addLayers(alayers); | 179 | i3GEO.editorOL.mapa.addLayers(alayers); |
| 178 | if(i3GEO.editorOL.layersIniciais !== ""){ | 180 | if(i3GEO.editorOL.layersIniciais !== ""){ |
| 179 | n = i3GEO.editorOL.layersIniciais.length; | 181 | n = i3GEO.editorOL.layersIniciais.length; |
| 180 | - for(i=0;i<n;i++) | ||
| 181 | - {i3GEO.editorOL.mapa.addLayer(i3GEO.editorOL.layersIniciais[i]);} | 182 | + if(i3GEO.editorOL.tiles === false || i3GEO.editorOL.tiles === "false"){ |
| 183 | + single = true; | ||
| 184 | + } | ||
| 185 | + for(i=0;i<n;i++){ | ||
| 186 | + i3GEO.editorOL.layersIniciais[i].singleTile = single; | ||
| 187 | + i3GEO.editorOL.mapa.addLayer(i3GEO.editorOL.layersIniciais[i]); | ||
| 188 | + } | ||
| 182 | } | 189 | } |
| 183 | if(i3GEO.editorOL.layergrafico !== ""){ | 190 | if(i3GEO.editorOL.layergrafico !== ""){ |
| 184 | i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]); | 191 | i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]); |
mashups/openlayers.php
| @@ -155,7 +155,8 @@ Parâmetros: | @@ -155,7 +155,8 @@ Parâmetros: | ||
| 155 | largura - lagura do mapa em pixels | 155 | largura - lagura do mapa em pixels |
| 156 | altura - altura do mapa em pixels | 156 | altura - altura do mapa em pixels |
| 157 | pontos - lista de coordenadas x e y que serão incluídas como marcas no mapa | 157 | pontos - lista de coordenadas x e y que serão incluídas como marcas no mapa |
| 158 | - marca - nome do arquivo que contém a imagem que será utilizada para mostrar as coordenadas | 158 | + marca - nome do arquivo que contém a imagem que será utilizada para mostrar as coordenadas |
| 159 | + tiles (true|false) - indica se o modo tile será usado ou não (true por default). O modo tile pode tornar o mashup mais lento em algumas situações. | ||
| 159 | 160 | ||
| 160 | fundo - lista com os nomes, separados por ',' dos layers que serão usados como fundo para o mapa. Se não for definido, | 161 | fundo - lista com os nomes, separados por ',' dos layers que serão usados como fundo para o mapa. Se não for definido, |
| 161 | será usado o default. O primeiro da lista será o fundo ativo. Se na lista de temas de fundo estiver algum | 162 | será usado o default. O primeiro da lista será o fundo ativo. Se na lista de temas de fundo estiver algum |
| @@ -274,6 +275,11 @@ i3GEO.editorOL.marca = "<?php | @@ -274,6 +275,11 @@ i3GEO.editorOL.marca = "<?php | ||
| 274 | else | 275 | else |
| 275 | {echo "../pacotes/openlayers/img/marker-gold.png";} | 276 | {echo "../pacotes/openlayers/img/marker-gold.png";} |
| 276 | ?>"; | 277 | ?>"; |
| 278 | +i3GEO.editorOL.tiles = "<?php | ||
| 279 | + if(isset($tiles)){echo $tiles;} | ||
| 280 | + else | ||
| 281 | + {echo "true";} | ||
| 282 | +?>"; | ||
| 277 | <?php if(isset($fundo)){ | 283 | <?php if(isset($fundo)){ |
| 278 | echo "i3GEO.editorOL.fundo = '".implode(",",$fundo)."';"; | 284 | echo "i3GEO.editorOL.fundo = '".implode(",",$fundo)."';"; |
| 279 | } | 285 | } |