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 | 95 | new OpenLayers.Control.OverviewMap(), |
96 | 96 | new OpenLayers.Control.KeyboardDefaults() |
97 | 97 | ], |
98 | + tiles: true, | |
98 | 99 | numzoom: 12, |
99 | 100 | maxext: "", |
100 | 101 | mapext: new OpenLayers.Bounds(-76.5125927,-39.3925675209,-29.5851853,9.49014852081), |
101 | 102 | mapa: "", |
102 | 103 | inicia: function(){ |
103 | - var alayers = [], | |
104 | + var single = false, | |
105 | + alayers = [], | |
104 | 106 | fundo = (i3GEO.editorOL.fundo).split(","), |
105 | 107 | nfundo = fundo.length, |
106 | 108 | ncontroles = i3GEO.editorOL.controles.length, |
... | ... | @@ -177,8 +179,13 @@ i3GEO.editorOL = { |
177 | 179 | i3GEO.editorOL.mapa.addLayers(alayers); |
178 | 180 | if(i3GEO.editorOL.layersIniciais !== ""){ |
179 | 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 | 190 | if(i3GEO.editorOL.layergrafico !== ""){ |
184 | 191 | i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]); | ... | ... |
mashups/openlayers.php
... | ... | @@ -155,7 +155,8 @@ Parâmetros: |
155 | 155 | largura - lagura do mapa em pixels |
156 | 156 | altura - altura do mapa em pixels |
157 | 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 | 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 | 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 | 275 | else |
275 | 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 | 283 | <?php if(isset($fundo)){ |
278 | 284 | echo "i3GEO.editorOL.fundo = '".implode(",",$fundo)."';"; |
279 | 285 | } | ... | ... |