Commit a3eb84d5f4706f408ee6b39d7fd7b503d8975c18
1 parent
36b04fe8
Exists in
master
and in
7 other branches
Layers do tipo notile no OL3
Showing
8 changed files
with
361 additions
and
372 deletions
Show diff stats
.project
| ... | ... | @@ -27,7 +27,7 @@ |
| 27 | 27 | </natures> |
| 28 | 28 | <filteredResources> |
| 29 | 29 | <filter> |
| 30 | - <id>1432242885010</id> | |
| 30 | + <id>1432670586259</id> | |
| 31 | 31 | <name></name> |
| 32 | 32 | <type>30</type> |
| 33 | 33 | <matcher> |
| ... | ... | @@ -36,7 +36,7 @@ |
| 36 | 36 | </matcher> |
| 37 | 37 | </filter> |
| 38 | 38 | <filter> |
| 39 | - <id>1432242885012</id> | |
| 39 | + <id>1432670586259</id> | |
| 40 | 40 | <name></name> |
| 41 | 41 | <type>30</type> |
| 42 | 42 | <matcher> |
| ... | ... | @@ -45,7 +45,7 @@ |
| 45 | 45 | </matcher> |
| 46 | 46 | </filter> |
| 47 | 47 | <filter> |
| 48 | - <id>1432242885019</id> | |
| 48 | + <id>1432670586261</id> | |
| 49 | 49 | <name></name> |
| 50 | 50 | <type>30</type> |
| 51 | 51 | <matcher> |
| ... | ... | @@ -53,14 +53,5 @@ |
| 53 | 53 | <arguments>1.0-name-matches-false-false-*compacto*</arguments> |
| 54 | 54 | </matcher> |
| 55 | 55 | </filter> |
| 56 | - <filter> | |
| 57 | - <id>1432242885538</id> | |
| 58 | - <name></name> | |
| 59 | - <type>30</type> | |
| 60 | - <matcher> | |
| 61 | - <id>org.eclipse.ui.ide.multiFilter</id> | |
| 62 | - <arguments>1.0-name-matches-false-false-.*</arguments> | |
| 63 | - </matcher> | |
| 64 | - </filter> | |
| 65 | 56 | </filteredResources> |
| 66 | 57 | </projectDescription> | ... | ... |
admin/admin.db
No preview for this file type
ferramentas/opcoes_fundo/index.js
| ... | ... | @@ -129,11 +129,16 @@ i3GEOF.opcoesFundo = { |
| 129 | 129 | //var layer = i3geoOL.getLayersByName("Nenhum")[0]; |
| 130 | 130 | //layer.mergeNewParams({"DESLIGACACHE":"sim"}); |
| 131 | 131 | //layer.mergeNewParams({r:Math.random()}); |
| 132 | - if($i(i3geoOL.id+"_events")) | |
| 133 | - {$i(i3geoOL.id+"_events").style.backgroundColor = "rgb("+$i("i3GEOopcoesFundocor").value+")";} | |
| 132 | + if($i(i3geoOL.id+"_events")){ | |
| 133 | + $i(i3geoOL.id+"_events").style.backgroundColor = "rgb("+$i("i3GEOopcoesFundocor").value+")"; | |
| 134 | + } | |
| 134 | 135 | if ($i(i3geoOL.id + "_OpenLayers_ViewPort")) { |
| 135 | 136 | $i(i3geoOL.id + "_OpenLayers_ViewPort").style.backgroundColor = "rgb("+$i("i3GEOopcoesFundocor").value+")"; |
| 136 | 137 | } |
| 138 | + //para OL3 | |
| 139 | + if($i("openlayers")){ | |
| 140 | + $i("openlayers").style.backgroundColor = "rgb(" + $i("i3GEOopcoesFundocor").value + ")"; | |
| 141 | + } | |
| 137 | 142 | } |
| 138 | 143 | i3GEO.atualiza(); |
| 139 | 144 | }, | ... | ... |
interface/openlayersdebug.htm
| ... | ... | @@ -140,8 +140,9 @@ |
| 140 | 140 | i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin = true; |
| 141 | 141 | |
| 142 | 142 | i3GEO.Interface.openlayers.TILES = true; |
| 143 | + i3GEO.Interface.openlayers.googleLike = false; | |
| 143 | 144 | |
| 144 | - i3GEO.configura.guardaExtensao = false; | |
| 145 | + i3GEO.configura.guardaExtensao = true; | |
| 145 | 146 | i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.finaliza = |
| 146 | 147 | 'if($i("omenudataInterface1")){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("text", " ");}'; |
| 147 | 148 | ... | ... |
js/arvoredecamadas.js
| ... | ... | @@ -1026,13 +1026,13 @@ i3GEO.arvoreDeCamadas = |
| 1026 | 1026 | ); |
| 1027 | 1027 | for (i = 0; i < n; i++) { |
| 1028 | 1028 | temp = |
| 1029 | - "<div class='" + k + "' onclick='i3GEO.Interface.openlayers.ativaFundo(\"" + c[i].name + "\")'>" | |
| 1029 | + "<div class='" + k + "' onclick='i3GEO.Interface.openlayers.ativaFundo(\"" + c[i].get("name") + "\")'>" | |
| 1030 | 1030 | + "<input name=layer type=checkbox "; |
| 1031 | - if(c[i].visibility === true){ | |
| 1031 | + if(c[i].getVisible() === true){ | |
| 1032 | 1032 | temp += " checked "; |
| 1033 | 1033 | } |
| 1034 | - temp += " value='" + c[i].name + "' id='CK" + c[i].id + "'/>" | |
| 1035 | - + " <label for='CK" + c[i].id + "'>" + c[i].name + "</label></div>"; | |
| 1034 | + temp += " value='" + c[i].get("name") + "' id='CK" + c[i].get("name") + "'/>" | |
| 1035 | + + " <label for='CK" + c[i].get("name") + "'>" + c[i].get("title") + "</label></div>"; | |
| 1036 | 1036 | new YAHOO.widget.HTMLNode( |
| 1037 | 1037 | { |
| 1038 | 1038 | html : temp, | ... | ... |
js/dicionario.js
| 1 | 1 | //utilize $trad("p1") para retornar o texto |
| 2 | -g_traducao = { | |
| 2 | +g_traducao = | |
| 3 | + { | |
| 3 | 4 | // texto da janela de mensagens |
| 4 | 5 | "p1" : [ |
| 5 | 6 | { |
| ... | ... | @@ -2672,5 +2673,12 @@ g_traducao = { |
| 2672 | 2673 | en : "", |
| 2673 | 2674 | es : "" |
| 2674 | 2675 | } |
| 2676 | + ], | |
| 2677 | + "nenhum" : [ | |
| 2678 | + { | |
| 2679 | + pt : "Nenhum", | |
| 2680 | + en : "", | |
| 2681 | + es : "" | |
| 2682 | + } | |
| 2675 | 2683 | ] |
| 2676 | 2684 | }; |
| 2677 | 2685 | \ No newline at end of file | ... | ... |
js/interface.js
| ... | ... | @@ -29,16 +29,16 @@ |
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Licença |
| 32 | - * | |
| 32 | + * | |
| 33 | 33 | * GPL2 |
| 34 | - * | |
| 34 | + * | |
| 35 | 35 | * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet |
| 36 | - * | |
| 36 | + * | |
| 37 | 37 | * Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com |
| 38 | - * | |
| 38 | + * | |
| 39 | 39 | * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da Licença |
| 40 | 40 | * Pública Geral GNU conforme publicada pela Free Software Foundation; |
| 41 | - * | |
| 41 | + * | |
| 42 | 42 | * Este programa é distribuído na expectativa de que seja útil, porém, SEM NENHUMA GARANTIA; nem mesmo a |
| 43 | 43 | * garantia implícita de COMERCIABILIDADE OU ADEQUACÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença |
| 44 | 44 | * Pública Geral do GNU para mais detalhes. Você deve ter recebido uma cópia da Licença Pública Geral do |
| ... | ... | @@ -48,166 +48,165 @@ |
| 48 | 48 | if (typeof (i3GEO) === 'undefined') { |
| 49 | 49 | var i3GEO = {}; |
| 50 | 50 | } |
| 51 | -// TODO integrar Cesium http://cesiumjs.org/2013/04/12/Cesium-up-and-running/ | |
| 52 | 51 | i3GEO.Interface = |
| 53 | 52 | { |
| 54 | 53 | /** |
| 55 | 54 | * Propriedade: TABLET |
| 56 | - * | |
| 55 | + * | |
| 57 | 56 | * Quando true, são aplicadas configurações especiais para uso em tablets. |
| 58 | - * | |
| 57 | + * | |
| 59 | 58 | * Altera o posicionamento da barra de botões e comportamento das guias. Veja o exemplo interface/openlayers_t.htm. |
| 60 | - * | |
| 59 | + * | |
| 61 | 60 | * Tipo: |
| 62 | - * | |
| 61 | + * | |
| 63 | 62 | * {boolean} |
| 64 | - * | |
| 63 | + * | |
| 65 | 64 | * Default: |
| 66 | - * | |
| 65 | + * | |
| 67 | 66 | * false |
| 68 | 67 | */ |
| 69 | 68 | TABLET : false, |
| 70 | 69 | /** |
| 71 | 70 | * Propriedade: ALTTABLET |
| 72 | - * | |
| 71 | + * | |
| 73 | 72 | * Nome do arquivo HTML com a interface alternativa utilizada quando o i3Geo detecta o uso de um dispositivo móvel |
| 74 | - * | |
| 73 | + * | |
| 75 | 74 | * A detecção é aplicada automaticamente quando essa variável for definida |
| 76 | - * | |
| 75 | + * | |
| 77 | 76 | * Para não aplicar a detecção, use i3GEO.Interface.ALTTABLET = "" |
| 78 | - * | |
| 77 | + * | |
| 79 | 78 | * Tipo: |
| 80 | - * | |
| 79 | + * | |
| 81 | 80 | * {string} |
| 82 | 81 | */ |
| 83 | 82 | ALTTABLET : "", |
| 84 | 83 | /** |
| 85 | 84 | * Formato de geração da imagem. |
| 86 | - * | |
| 85 | + * | |
| 87 | 86 | * Os formatos devem estar definidos no mapfile geral1windows.map e geral1.map. A definição dessa variável |
| 88 | 87 | * não afeta a interface padrão, que utiliza a definição que estiver ativa nos mapfiles de |
| 89 | 88 | * inicialização. |
| 90 | - * | |
| 89 | + * | |
| 91 | 90 | * Tipo: |
| 92 | - * | |
| 91 | + * | |
| 93 | 92 | * {MAPSERVER OUTPUTFORMAT} |
| 94 | - * | |
| 93 | + * | |
| 95 | 94 | * Default: |
| 96 | - * | |
| 95 | + * | |
| 97 | 96 | * AGG_Q |
| 98 | 97 | */ |
| 99 | 98 | OUTPUTFORMAT : "AGG_Q", |
| 100 | 99 | /** |
| 101 | 100 | * Propriedade: BARRABOTOESTOP |
| 102 | - * | |
| 101 | + * | |
| 103 | 102 | * Distancia da barra de botões em relação ao topo do mapa. |
| 104 | - * | |
| 103 | + * | |
| 105 | 104 | * Tipo: |
| 106 | - * | |
| 105 | + * | |
| 107 | 106 | * {number} |
| 108 | - * | |
| 107 | + * | |
| 109 | 108 | * Default: |
| 110 | - * | |
| 109 | + * | |
| 111 | 110 | * 12 |
| 112 | 111 | */ |
| 113 | 112 | BARRABOTOESTOP : 12, |
| 114 | 113 | /** |
| 115 | 114 | * Propriedade: BARRABOTOESLEFT |
| 116 | - * | |
| 115 | + * | |
| 117 | 116 | * Distancia da barra de botões em relação ao lado esquerdo do mapa. |
| 118 | - * | |
| 117 | + * | |
| 119 | 118 | * Tipo: |
| 120 | - * | |
| 119 | + * | |
| 121 | 120 | * {number} |
| 122 | - * | |
| 121 | + * | |
| 123 | 122 | * Default: |
| 124 | - * | |
| 123 | + * | |
| 125 | 124 | * 3 |
| 126 | 125 | */ |
| 127 | 126 | BARRABOTOESLEFT : 3, |
| 128 | 127 | /** |
| 129 | 128 | * Propriedade: BARRADEZOOMRIGHT |
| 130 | - * | |
| 129 | + * | |
| 131 | 130 | * Distancia da barra de botões em relação ao lado direito do mapa. |
| 132 | - * | |
| 131 | + * | |
| 133 | 132 | * Utilizado para ajustar a barra de zoom |
| 134 | - * | |
| 133 | + * | |
| 135 | 134 | * Tipo: |
| 136 | - * | |
| 135 | + * | |
| 137 | 136 | * {number} |
| 138 | - * | |
| 137 | + * | |
| 139 | 138 | * Default |
| 140 | - * | |
| 139 | + * | |
| 141 | 140 | * 50 |
| 142 | 141 | */ |
| 143 | 142 | BARRADEZOOMRIGHT : 0, |
| 144 | 143 | /** |
| 145 | 144 | * Propriedade: BARRADEZOOMTOP |
| 146 | - * | |
| 145 | + * | |
| 147 | 146 | * Distancia da barra de zoom em relação ao topo do mapa. |
| 148 | - * | |
| 147 | + * | |
| 149 | 148 | * Tipo: |
| 150 | - * | |
| 149 | + * | |
| 151 | 150 | * {number} |
| 152 | - * | |
| 151 | + * | |
| 153 | 152 | * Default: |
| 154 | - * | |
| 153 | + * | |
| 155 | 154 | * 20 |
| 156 | 155 | */ |
| 157 | 156 | BARRADEZOOMTOP : 20, |
| 158 | 157 | /** |
| 159 | 158 | * Propriedade: BARRADEZOOMLEFT |
| 160 | - * | |
| 159 | + * | |
| 161 | 160 | * Distancia da barra de zoom em relação ao lado esquerdo do mapa. |
| 162 | - * | |
| 161 | + * | |
| 163 | 162 | * Tipo: |
| 164 | - * | |
| 163 | + * | |
| 165 | 164 | * {number} |
| 166 | - * | |
| 165 | + * | |
| 167 | 166 | * Default: |
| 168 | - * | |
| 167 | + * | |
| 169 | 168 | * 10 |
| 170 | 169 | */ |
| 171 | 170 | BARRADEZOOMLEFT : 10, |
| 172 | 171 | /** |
| 173 | 172 | * Propriedade: ATUAL |
| 174 | - * | |
| 173 | + * | |
| 175 | 174 | * Interface utilizada na criação e controle do mapa. |
| 176 | - * | |
| 175 | + * | |
| 177 | 176 | * Veja como usar nos arquivos de apresentação do mapa existentes no diretório i3geo/interface |
| 178 | - * | |
| 177 | + * | |
| 179 | 178 | * O i3Geo, além da interface própria, permite o uso de outras APIs para a construção do mapa, como |
| 180 | 179 | * Google Maps ou Openlayers. Essa propriedade define qual interface será usada. Não confundir com o nome do HTML que |
| 181 | 180 | * é utilizado para mostrar o mapa. |
| 182 | - * | |
| 181 | + * | |
| 183 | 182 | * Para definir a interface, utilize |
| 184 | - * | |
| 183 | + * | |
| 185 | 184 | * i3GEO.Interface.ATUAL = "<valor>" |
| 186 | - * | |
| 185 | + * | |
| 187 | 186 | * Tipo: |
| 188 | - * | |
| 187 | + * | |
| 189 | 188 | * {string} |
| 190 | - * | |
| 189 | + * | |
| 191 | 190 | * Valores: |
| 192 | - * | |
| 191 | + * | |
| 193 | 192 | * openlayers|googlemaps|googleearth |
| 194 | - * | |
| 193 | + * | |
| 195 | 194 | * Default: |
| 196 | - * | |
| 195 | + * | |
| 197 | 196 | * openlayers |
| 198 | 197 | */ |
| 199 | 198 | ATUAL : "openlayers", |
| 200 | 199 | /** |
| 201 | 200 | * Propriedade: IDCORPO |
| 202 | - * | |
| 201 | + * | |
| 203 | 202 | * ID do elemento HTML que receberá o corpo do mapa |
| 204 | - * | |
| 203 | + * | |
| 205 | 204 | * Tipo: |
| 206 | - * | |
| 205 | + * | |
| 207 | 206 | * {string} |
| 208 | - * | |
| 207 | + * | |
| 209 | 208 | * Default: |
| 210 | - * | |
| 209 | + * | |
| 211 | 210 | * corpoMapa |
| 212 | 211 | */ |
| 213 | 212 | IDCORPO : "openlayers", |
| ... | ... | @@ -217,19 +216,19 @@ i3GEO.Interface = |
| 217 | 216 | ATIVAMENUCONTEXTO : false, |
| 218 | 217 | /** |
| 219 | 218 | * Variavel: IDMAPA |
| 220 | - * | |
| 219 | + * | |
| 221 | 220 | * ID do elemento HTML criado para conter o mapa |
| 222 | - * | |
| 221 | + * | |
| 223 | 222 | * Esse elemento normalmente é criado dentro de IDCORPO dependendo da interface |
| 224 | 223 | */ |
| 225 | 224 | IDMAPA : "", |
| 226 | 225 | /** |
| 227 | 226 | * Indica o status atual do mapa. |
| 228 | - * | |
| 227 | + * | |
| 229 | 228 | * É utilizado para verificar o status do mapa e bloquear ou não determinadas funções. |
| 230 | - * | |
| 229 | + * | |
| 231 | 230 | * Por exemplo, na interface OpenLayers, identifica se as camadas estão sendo atualizadas |
| 232 | - * | |
| 231 | + * | |
| 233 | 232 | * STATUS = { atualizando: new Array(), //guarda os códigos dos layers que estão sendo redesenhados trocando: false |
| 234 | 233 | * //indica se o mapa está na fase de troca de interface } |
| 235 | 234 | */ |
| ... | ... | @@ -287,8 +286,11 @@ i3GEO.Interface = |
| 287 | 286 | i3GEO.Interface.atual2ol.initemp(); |
| 288 | 287 | } |
| 289 | 288 | } catch (e) { |
| 290 | - i3GEO.util.scriptTag(i3GEO.configura.locaplic + "/pacotes/openlayers/OpenLayers2131.js.php", | |
| 291 | - "i3GEO.Interface.atual2ol.initemp()", "", false); | |
| 289 | + i3GEO.util.scriptTag( | |
| 290 | + i3GEO.configura.locaplic + "/pacotes/openlayers/OpenLayers2131.js.php", | |
| 291 | + "i3GEO.Interface.atual2ol.initemp()", | |
| 292 | + "", | |
| 293 | + false); | |
| 292 | 294 | } |
| 293 | 295 | }, |
| 294 | 296 | initemp : function() { |
| ... | ... | @@ -311,18 +313,19 @@ i3GEO.Interface = |
| 311 | 313 | /** |
| 312 | 314 | * Function : aposAdicNovaCamada |
| 313 | 315 | * |
| 314 | - * Executa funcoes apos uma nova camada ter sido adicionada ao mapa, mas antes do layer ter sido efetivamente adicionado ao objeto com o mapa | |
| 315 | - * | |
| 316 | + * Executa funcoes apos uma nova camada ter sido adicionada ao mapa, mas antes do layer ter sido efetivamente adicionado ao objeto | |
| 317 | + * com o mapa | |
| 318 | + * | |
| 316 | 319 | * Parametros: |
| 317 | 320 | * |
| 318 | 321 | * {obj} - objeto camada ver i3GEO.arvoreDeCamadas.CAMADAS |
| 319 | 322 | */ |
| 320 | - aposAdicNovaCamada : function (camada) { | |
| 323 | + aposAdicNovaCamada : function(camada) { | |
| 321 | 324 | i3GEO.tema.ativaFerramentas(camada); |
| 322 | 325 | }, |
| 323 | 326 | /** |
| 324 | 327 | * Function: redesenha |
| 325 | - * | |
| 328 | + * | |
| 326 | 329 | * Aplica o método redesenha da interface atual. Em alguns casos, a função de redesenho aplica os mesmos |
| 327 | 330 | * processos da função de atualizar o mapa. Isso ocorre pq em alguns casos as funções são |
| 328 | 331 | * otimizadas para cada situação |
| ... | ... | @@ -332,13 +335,13 @@ i3GEO.Interface = |
| 332 | 335 | }, |
| 333 | 336 | /** |
| 334 | 337 | * Function: aplicaOpacidade |
| 335 | - * | |
| 338 | + * | |
| 336 | 339 | * Aplica um fator de opacidade a todos os layers do mapa |
| 337 | - * | |
| 340 | + * | |
| 338 | 341 | * Parametro: |
| 339 | - * | |
| 342 | + * | |
| 340 | 343 | * {numerico} - 0 a 1 |
| 341 | - * | |
| 344 | + * | |
| 342 | 345 | * {string} - (opcional) se for vazio aplica ao mapa todo |
| 343 | 346 | */ |
| 344 | 347 | aplicaOpacidade : function(opacidade, layer) { |
| ... | ... | @@ -346,7 +349,7 @@ i3GEO.Interface = |
| 346 | 349 | }, |
| 347 | 350 | /** |
| 348 | 351 | * Function: atualizaMapa |
| 349 | - * | |
| 352 | + * | |
| 350 | 353 | * Aplica o método atualizaMapa da interface atual. Em alguns casos, a função de redesenho aplica os mesmos |
| 351 | 354 | * processos da função de atualizar o mapa. Isso ocorre pq em alguns casos as funções são |
| 352 | 355 | * otimizadas para cada situação |
| ... | ... | @@ -362,14 +365,14 @@ i3GEO.Interface = |
| 362 | 365 | }, |
| 363 | 366 | /** |
| 364 | 367 | * Function: atualizaTema |
| 365 | - * | |
| 368 | + * | |
| 366 | 369 | * Aplica o método atualizaTema da interface atual |
| 367 | - * | |
| 370 | + * | |
| 368 | 371 | * Parametros: |
| 369 | - * | |
| 372 | + * | |
| 370 | 373 | * {Objeto} -parametros obtidos da função PHP de redesenho do mapa. Quando igual a "", é feita apenas a |
| 371 | 374 | * atualização da camada, sem que a árvore de camadas seja atualizada. |
| 372 | - * | |
| 375 | + * | |
| 373 | 376 | * {string} - código do tema |
| 374 | 377 | */ |
| 375 | 378 | atualizaTema : function(retorno, tema) { |
| ... | ... | @@ -377,11 +380,11 @@ i3GEO.Interface = |
| 377 | 380 | }, |
| 378 | 381 | /** |
| 379 | 382 | * Function: ligaDesliga |
| 380 | - * | |
| 383 | + * | |
| 381 | 384 | * Liga/desliga um tema |
| 382 | - * | |
| 385 | + * | |
| 383 | 386 | * Parametros: |
| 384 | - * | |
| 387 | + * | |
| 385 | 388 | * {object} - objeto do tipo checkbox que foi acionado na arvore de camadas ou objeto que contenha as propriedades value e checked, |
| 386 | 389 | * sendo value o código do layer |
| 387 | 390 | */ |
| ... | ... | @@ -397,7 +400,7 @@ i3GEO.Interface = |
| 397 | 400 | }, |
| 398 | 401 | /** |
| 399 | 402 | * Function: adicionaKml |
| 400 | - * | |
| 403 | + * | |
| 401 | 404 | * Aplica o método de adição de kml ao mapa conforme a interface atual |
| 402 | 405 | */ |
| 403 | 406 | adicionaKml : function() { |
| ... | ... | @@ -413,13 +416,13 @@ i3GEO.Interface = |
| 413 | 416 | }, |
| 414 | 417 | /** |
| 415 | 418 | * Cria ou altera os elementos HTML necessários para a interface |
| 416 | - * | |
| 419 | + * | |
| 417 | 420 | * Essa função é executada na inicialização do i3geo |
| 418 | - * | |
| 421 | + * | |
| 419 | 422 | * Parametros: |
| 420 | - * | |
| 423 | + * | |
| 421 | 424 | * {Integer} - largura do corpo do mapa em pixels |
| 422 | - * | |
| 425 | + * | |
| 423 | 426 | * {Integer} - altura do corpo do mapa em pixels |
| 424 | 427 | */ |
| 425 | 428 | cria : function(w, h) { |
| ... | ... | @@ -463,13 +466,13 @@ i3GEO.Interface = |
| 463 | 466 | }, |
| 464 | 467 | /** |
| 465 | 468 | * Function: alteraLayers |
| 466 | - * | |
| 469 | + * | |
| 467 | 470 | * Altera todos os layers do mapa modificando um determinado parametro |
| 468 | - * | |
| 471 | + * | |
| 469 | 472 | * Parametros: |
| 470 | - * | |
| 473 | + * | |
| 471 | 474 | * {string} - nome do parâmetro |
| 472 | - * | |
| 475 | + * | |
| 473 | 476 | * {string} - valor a ser atribuído |
| 474 | 477 | */ |
| 475 | 478 | alteraParametroLayers : function(parametro, valor) { |
| ... | ... | @@ -491,26 +494,26 @@ i3GEO.Interface = |
| 491 | 494 | }, |
| 492 | 495 | /** |
| 493 | 496 | * Section: i3GEO.Interface.OpenLayers |
| 494 | - * | |
| 497 | + * | |
| 495 | 498 | * Interface com motor de navegação baseado na API OpenLayers |
| 496 | - * | |
| 499 | + * | |
| 497 | 500 | * Namespace: |
| 498 | - * | |
| 501 | + * | |
| 499 | 502 | * i3GEO.Interface.openlayers |
| 500 | - * | |
| 503 | + * | |
| 501 | 504 | * Utilizado quando |
| 502 | - * | |
| 505 | + * | |
| 503 | 506 | * i3GEO.Interface.ATUAL = "openlayers" |
| 504 | - * | |
| 507 | + * | |
| 505 | 508 | * Cria o objeto i3geoOL que pode receber os métodos da API do OpenLayers |
| 506 | 509 | */ |
| 507 | 510 | openlayers : { |
| 508 | 511 | // TODO incluir na ferramenta de propriedades |
| 509 | 512 | /** |
| 510 | 513 | * Propriedade: parametrosMap |
| 511 | - * | |
| 514 | + * | |
| 512 | 515 | * Permite incluir parametros da API do OpenLayers nao previstos no i3Geo |
| 513 | - * | |
| 516 | + * | |
| 514 | 517 | * Parametros do objeto map do OpenLayers |
| 515 | 518 | */ |
| 516 | 519 | parametrosMap : { |
| ... | ... | @@ -523,9 +526,9 @@ i3GEO.Interface = |
| 523 | 526 | // TODO incluir na ferramenta de propriedades |
| 524 | 527 | /** |
| 525 | 528 | * Propriedade: parametrosView |
| 526 | - * | |
| 529 | + * | |
| 527 | 530 | * Permite incluir parametros da API do OpenLayers nao previstos no i3Geo |
| 528 | - * | |
| 531 | + * | |
| 529 | 532 | * Parametros do objeto View do OpenLayers |
| 530 | 533 | */ |
| 531 | 534 | parametrosView : { |
| ... | ... | @@ -533,15 +536,15 @@ i3GEO.Interface = |
| 533 | 536 | }, |
| 534 | 537 | /** |
| 535 | 538 | * Propriedade: interacoes |
| 536 | - * | |
| 539 | + * | |
| 537 | 540 | * Interacoes default utilizadas no mapa. |
| 538 | - * | |
| 541 | + * | |
| 539 | 542 | * http://openlayers.org/en/v3.4.0/apidoc/ol.interaction.Interaction.html?unstable=true |
| 540 | - * | |
| 543 | + * | |
| 541 | 544 | * Parametros do objeto Map.options.interactions do OpenLayers |
| 542 | - * | |
| 545 | + * | |
| 543 | 546 | * Tipo: |
| 544 | - * | |
| 547 | + * | |
| 545 | 548 | * {array} |
| 546 | 549 | */ |
| 547 | 550 | interacoes : [ |
| ... | ... | @@ -558,47 +561,47 @@ i3GEO.Interface = |
| 558 | 561 | ], |
| 559 | 562 | /** |
| 560 | 563 | * Propriedade: FUNDOTEMA |
| 561 | - * | |
| 564 | + * | |
| 562 | 565 | * Estilo "background" do nome do tema na árvore de camadas enquanto o mesmo está sendo carregado. |
| 563 | - * | |
| 566 | + * | |
| 564 | 567 | * Permite destacar o nome do tema que está em processo de carregamento |
| 565 | - * | |
| 568 | + * | |
| 566 | 569 | * Tipo: |
| 567 | - * | |
| 570 | + * | |
| 568 | 571 | * {string} |
| 569 | - * | |
| 572 | + * | |
| 570 | 573 | * Default: |
| 571 | - * | |
| 574 | + * | |
| 572 | 575 | * yellow |
| 573 | 576 | */ |
| 574 | 577 | FUNDOTEMA : "yellow", |
| 575 | 578 | /** |
| 576 | 579 | * Propriedade: TILES |
| 577 | - * | |
| 580 | + * | |
| 578 | 581 | * Indica se será utilizado o modo de navegação em tiles em todas as camadas do mapa |
| 579 | - * | |
| 582 | + * | |
| 580 | 583 | * Ao bloquear o modo tile, o cache de imagens não poderá ser realizado |
| 581 | - * | |
| 584 | + * | |
| 582 | 585 | * Tipo: |
| 583 | - * | |
| 586 | + * | |
| 584 | 587 | * {boolean} |
| 585 | - * | |
| 588 | + * | |
| 586 | 589 | * Default: |
| 587 | - * | |
| 590 | + * | |
| 588 | 591 | * true |
| 589 | 592 | */ |
| 590 | 593 | TILES : true, |
| 591 | 594 | /** |
| 592 | 595 | * Propriedade: GADGETS |
| 593 | - * | |
| 596 | + * | |
| 594 | 597 | * Lista dos controles específicos da API do OpenLayers que serão inseridos ou não no mapa |
| 595 | - * | |
| 598 | + * | |
| 596 | 599 | * Tipo: |
| 597 | - * | |
| 600 | + * | |
| 598 | 601 | * {object} |
| 599 | - * | |
| 602 | + * | |
| 600 | 603 | * Default: |
| 601 | - * | |
| 604 | + * | |
| 602 | 605 | * {ZoomSlider:true,Zoom: false,LayerSwitcher:true,ScaleLine:true,OverviewMap:false} |
| 603 | 606 | */ |
| 604 | 607 | GADGETS : { |
| ... | ... | @@ -609,15 +612,15 @@ i3GEO.Interface = |
| 609 | 612 | }, |
| 610 | 613 | /** |
| 611 | 614 | * Propriedade: SCALELINE |
| 612 | - * | |
| 615 | + * | |
| 613 | 616 | * Propriedades da API do OL3 para o controle de barra de escala |
| 614 | - * | |
| 617 | + * | |
| 615 | 618 | * http://openlayers.org/en/v3.4.0/apidoc/ol.control.ScaleLine.html |
| 616 | - * | |
| 619 | + * | |
| 617 | 620 | * Tipo: |
| 618 | - * | |
| 621 | + * | |
| 619 | 622 | * {object} |
| 620 | - * | |
| 623 | + * | |
| 621 | 624 | * Default: {} |
| 622 | 625 | */ |
| 623 | 626 | SCALELINE : { |
| ... | ... | @@ -625,15 +628,15 @@ i3GEO.Interface = |
| 625 | 628 | }, |
| 626 | 629 | /** |
| 627 | 630 | * Propriedade: ZOOM |
| 628 | - * | |
| 631 | + * | |
| 629 | 632 | * Propriedades da API do OL3 para o controle de zoom |
| 630 | - * | |
| 633 | + * | |
| 631 | 634 | * http://openlayers.org/en/v3.4.0/apidoc/ol.control.Zoom.html |
| 632 | - * | |
| 635 | + * | |
| 633 | 636 | * Tipo: |
| 634 | - * | |
| 637 | + * | |
| 635 | 638 | * {object} |
| 636 | - * | |
| 639 | + * | |
| 637 | 640 | * Default: {} |
| 638 | 641 | */ |
| 639 | 642 | ZOOM : { |
| ... | ... | @@ -641,15 +644,15 @@ i3GEO.Interface = |
| 641 | 644 | }, |
| 642 | 645 | /** |
| 643 | 646 | * Propriedade: ZOOMSLIDER |
| 644 | - * | |
| 647 | + * | |
| 645 | 648 | * Propriedades da API do OL3 para o controle de zoomBar |
| 646 | - * | |
| 649 | + * | |
| 647 | 650 | * http://openlayers.org/en/v3.4.0/apidoc/ol.control.ZoomSlider.html |
| 648 | - * | |
| 651 | + * | |
| 649 | 652 | * Tipo: |
| 650 | - * | |
| 653 | + * | |
| 651 | 654 | * {object} |
| 652 | - * | |
| 655 | + * | |
| 653 | 656 | * Default: {} |
| 654 | 657 | */ |
| 655 | 658 | ZOOMSLIDER : { |
| ... | ... | @@ -657,15 +660,15 @@ i3GEO.Interface = |
| 657 | 660 | }, |
| 658 | 661 | /** |
| 659 | 662 | * Propriedade: MINEXTENT |
| 660 | - * | |
| 663 | + * | |
| 661 | 664 | * Menor extensão geográfica que pode ser mostrada no mapa |
| 662 | - * | |
| 665 | + * | |
| 663 | 666 | * Tipo: |
| 664 | - * | |
| 667 | + * | |
| 665 | 668 | * {array} |
| 666 | - * | |
| 669 | + * | |
| 667 | 670 | * Default: |
| 668 | - * | |
| 671 | + * | |
| 669 | 672 | * [-0.0003, -0.0003, 0.0003, 0.0003] |
| 670 | 673 | */ |
| 671 | 674 | MINEXTENT : [ |
| ... | ... | @@ -673,15 +676,15 @@ i3GEO.Interface = |
| 673 | 676 | ], |
| 674 | 677 | /** |
| 675 | 678 | * Propriedade: MAXEXTENT |
| 676 | - * | |
| 679 | + * | |
| 677 | 680 | * Maior extensão geográfica que pode ser mostrada no mapa |
| 678 | - * | |
| 681 | + * | |
| 679 | 682 | * Tipo: |
| 680 | - * | |
| 683 | + * | |
| 681 | 684 | * {array} |
| 682 | - * | |
| 685 | + * | |
| 683 | 686 | * Default: |
| 684 | - * | |
| 687 | + * | |
| 685 | 688 | * [-180, -90, 180, 90] |
| 686 | 689 | */ |
| 687 | 690 | MAXEXTENT : [ |
| ... | ... | @@ -689,32 +692,32 @@ i3GEO.Interface = |
| 689 | 692 | ], |
| 690 | 693 | /** |
| 691 | 694 | * Propriedades: LAYERSADICIONAIS |
| 692 | - * | |
| 695 | + * | |
| 693 | 696 | * Objetos do tipo LAYER que serão adicionados após a crioação de todos os layers default. |
| 694 | - * | |
| 697 | + * | |
| 695 | 698 | * Tipo: |
| 696 | - * | |
| 699 | + * | |
| 697 | 700 | * {array} |
| 698 | - * | |
| 701 | + * | |
| 699 | 702 | */ |
| 700 | 703 | LAYERSADICIONAIS : [], |
| 701 | 704 | /** |
| 702 | 705 | * Propriedade: LAYERFUNDO |
| 703 | - * | |
| 706 | + * | |
| 704 | 707 | * Nome do layer do tipo baselayer que sera ativado |
| 705 | 708 | */ |
| 706 | 709 | LAYERFUNDO : "", |
| 707 | 710 | /** |
| 708 | 711 | * Propriedade: googleLike |
| 709 | - * | |
| 712 | + * | |
| 710 | 713 | * Indica se a projeção cartográfica do mapa atual é a mesma utilizada pela API do Google Maps |
| 711 | - * | |
| 714 | + * | |
| 712 | 715 | * Tipo: |
| 713 | - * | |
| 716 | + * | |
| 714 | 717 | * {boolean} |
| 715 | - * | |
| 718 | + * | |
| 716 | 719 | * Default: |
| 717 | - * | |
| 720 | + * | |
| 718 | 721 | * false |
| 719 | 722 | */ |
| 720 | 723 | googleLike : false, |
| ... | ... | @@ -764,7 +767,7 @@ i3GEO.Interface = |
| 764 | 767 | }, |
| 765 | 768 | /** |
| 766 | 769 | * Redesenha o mapa atual |
| 767 | - * | |
| 770 | + * | |
| 768 | 771 | * são criados apenas os layers que ainda não existirem no mapa mas que existem na arvore de camadas |
| 769 | 772 | */ |
| 770 | 773 | redesenha : function() { |
| ... | ... | @@ -776,7 +779,7 @@ i3GEO.Interface = |
| 776 | 779 | }, |
| 777 | 780 | /** |
| 778 | 781 | * Cria o mapa do lado do cliente (navegador) Define o que for necessario para a criacao de |
| 779 | - * | |
| 782 | + * | |
| 780 | 783 | * i3geoOL = new OpenLayers.Map() |
| 781 | 784 | */ |
| 782 | 785 | cria : function(w, h) { |
| ... | ... | @@ -1259,7 +1262,6 @@ i3GEO.Interface = |
| 1259 | 1262 | matrixIds[z] = z; |
| 1260 | 1263 | } |
| 1261 | 1264 | // define a cor do fundo do mapa |
| 1262 | - // FIXME mudar a ferramenta que define o fundo | |
| 1263 | 1265 | $i("openlayers").style.backgroundColor = "rgb(" + i3GEO.parametros.cordefundo + ")"; |
| 1264 | 1266 | |
| 1265 | 1267 | // adiciona as camadas definidas em LAYERSADICIONAIS |
| ... | ... | @@ -1273,9 +1275,13 @@ i3GEO.Interface = |
| 1273 | 1275 | visible : false, |
| 1274 | 1276 | singleTile : !(i3GEO.Interface.openlayers.TILES), |
| 1275 | 1277 | tilePixelRatio : 1, |
| 1276 | - preload : Infinity | |
| 1278 | + preload : Infinity, | |
| 1279 | + projection : 'EPSG:4326' | |
| 1277 | 1280 | // pode ser 0 |
| 1278 | 1281 | }; |
| 1282 | + if (i3GEO.Interface.openlayers.googleLike === true) { | |
| 1283 | + opcoes.projection = 'EPSG:3857'; | |
| 1284 | + } | |
| 1279 | 1285 | for (i = nlayers - 1; i >= 0; i--) { |
| 1280 | 1286 | layer = ""; |
| 1281 | 1287 | camada = i3GEO.arvoreDeCamadas.CAMADAS[i]; |
| ... | ... | @@ -1317,12 +1323,14 @@ i3GEO.Interface = |
| 1317 | 1323 | && camada.usasld.toLowerCase() != "sim") { |
| 1318 | 1324 | urllayer = camada.wmsurl + "&r=" + Math.random(); |
| 1319 | 1325 | if (camada.wmstile == 1) { |
| 1326 | + // TODO testar isso | |
| 1320 | 1327 | layer = new OpenLayers.Layer.TMS(camada.name, camada.wmsurl, { |
| 1321 | 1328 | isBaseLayer : false, |
| 1322 | 1329 | layername : camada.wmsname, |
| 1323 | 1330 | type : 'png' |
| 1324 | 1331 | }); |
| 1325 | 1332 | } else { |
| 1333 | + // TODO testar isso | |
| 1326 | 1334 | layer = new OpenLayers.Layer.WMS(camada.name, urllayer, { |
| 1327 | 1335 | LAYERS : camada.name, |
| 1328 | 1336 | format : camada.wmsformat, |
| ... | ... | @@ -1353,55 +1361,50 @@ i3GEO.Interface = |
| 1353 | 1361 | if (camada.tiles === "sim" || camada.cache === "sim" || (camada.cortepixels && camada.cortepixels > 0)) { |
| 1354 | 1362 | opcoes.singleTile = false; |
| 1355 | 1363 | } |
| 1356 | - // FIXME testar isso | |
| 1357 | 1364 | if (opcoes.singleTile === true) { |
| 1358 | - if (i3GEO.Interface.openlayers.googleLike === true) { | |
| 1359 | - opcoes.projection = "EPSG:3857"; | |
| 1360 | - } | |
| 1361 | - // erro aqui - corrigir | |
| 1362 | - /* | |
| 1363 | - * layer = new OpenLayers.Layer.WMS(camada.name, urllayer, { LAYERS : camada.name, format : | |
| 1364 | - * camada.wmsformat, transparent : true }, opcoes); | |
| 1365 | - */ | |
| 1366 | - | |
| 1365 | + source = new ol.source.ImageWMS({ | |
| 1366 | + url : urllayer, | |
| 1367 | + params : { | |
| 1368 | + 'LAYERS' : camada.name, | |
| 1369 | + 'VERSION' : '1.1.0' | |
| 1370 | + }, | |
| 1371 | + projection : opcoes.projection | |
| 1372 | + }); | |
| 1367 | 1373 | } else { |
| 1368 | - // FIXME testar isso | |
| 1369 | - if (i3GEO.Interface.openlayers.googleLike === true) { | |
| 1370 | - layer = new OpenLayers.Layer.OSM(camada.name, urllayer + "&Z=${z}&X=${x}&Y=${y}", { | |
| 1371 | - isBaseLayer : false | |
| 1372 | - }); | |
| 1373 | - } else { | |
| 1374 | - source = new ol.source.WMTS({ | |
| 1375 | - url : urllayer, | |
| 1376 | - matrixSet : 'EPSG:4326', | |
| 1377 | - format : 'image/png', | |
| 1378 | - projection : ol.proj.get('EPSG:4326'), | |
| 1379 | - tileGrid : new ol.tilegrid.WMTS({ | |
| 1380 | - origin : ol.extent.getTopLeft(projectionExtent), | |
| 1381 | - resolutions : resolutions, | |
| 1382 | - matrixIds : matrixIds | |
| 1383 | - }), | |
| 1384 | - wrapX : true | |
| 1385 | - }); | |
| 1386 | - source.set("name", camada.name); | |
| 1387 | - opcoes.source = source; | |
| 1388 | - opcoes.title = camada.tema; | |
| 1389 | - opcoes.name = camada.name; | |
| 1390 | - opcoes.isBaseLayer = false; | |
| 1391 | - opcoes.visible = true; | |
| 1392 | - if (i3GEO.arvoreDeCamadas.BARRAPROGRESSO === true) { | |
| 1393 | - source.on('tileloadstart', function(event) { | |
| 1394 | - i3GEO.Interface.openlayers.loadStartLayer(source.get("name")); | |
| 1395 | - }); | |
| 1396 | - source.on('tileloadend', function(event) { | |
| 1397 | - i3GEO.Interface.openlayers.loadStopLayer(source.get("name")); | |
| 1398 | - }); | |
| 1399 | - source.on('tileloaderror', function(event) { | |
| 1400 | - i3GEO.Interface.openlayers.loadStopLayer(source.get("name")); | |
| 1401 | - }); | |
| 1402 | - } | |
| 1403 | - layer = new ol.layer.Tile(opcoes); | |
| 1404 | - } | |
| 1374 | + source = new ol.source.WMTS({ | |
| 1375 | + url : urllayer, | |
| 1376 | + matrixSet : opcoes.projection, | |
| 1377 | + format : 'image/png', | |
| 1378 | + projection : opcoes.projection, | |
| 1379 | + tileGrid : new ol.tilegrid.WMTS({ | |
| 1380 | + origin : ol.extent.getTopLeft(projectionExtent), | |
| 1381 | + resolutions : resolutions, | |
| 1382 | + matrixIds : matrixIds | |
| 1383 | + }), | |
| 1384 | + wrapX : true | |
| 1385 | + }); | |
| 1386 | + } | |
| 1387 | + source.set("name", camada.name); | |
| 1388 | + opcoes.source = source; | |
| 1389 | + opcoes.title = camada.tema; | |
| 1390 | + opcoes.name = camada.name; | |
| 1391 | + opcoes.isBaseLayer = false; | |
| 1392 | + opcoes.visible = true; | |
| 1393 | + if (i3GEO.arvoreDeCamadas.BARRAPROGRESSO === true) { | |
| 1394 | + source.on('tileloadstart', function(event) { | |
| 1395 | + i3GEO.Interface.openlayers.loadStartLayer(source.get("name")); | |
| 1396 | + }); | |
| 1397 | + source.on('tileloadend', function(event) { | |
| 1398 | + i3GEO.Interface.openlayers.loadStopLayer(source.get("name")); | |
| 1399 | + }); | |
| 1400 | + source.on('tileloaderror', function(event) { | |
| 1401 | + i3GEO.Interface.openlayers.loadStopLayer(source.get("name")); | |
| 1402 | + }); | |
| 1403 | + } | |
| 1404 | + if (opcoes.singleTile === true) { | |
| 1405 | + layer = new ol.layer.Image(opcoes); | |
| 1406 | + } else { | |
| 1407 | + layer = new ol.layer.Tile(opcoes); | |
| 1405 | 1408 | } |
| 1406 | 1409 | } |
| 1407 | 1410 | } catch (e) { |
| ... | ... | @@ -1436,7 +1439,6 @@ i3GEO.Interface = |
| 1436 | 1439 | $i(i3GEO.Interface.IDMAPA).appendChild(temp); |
| 1437 | 1440 | } |
| 1438 | 1441 | } |
| 1439 | - // FIXME testar isso | |
| 1440 | 1442 | if (i3GEO.Interface.openlayers.LAYERFUNDO != "") { |
| 1441 | 1443 | i3GEO.Interface.openlayers.ativaFundo(i3GEO.Interface.openlayers.LAYERFUNDO); |
| 1442 | 1444 | } |
| ... | ... | @@ -1543,8 +1545,6 @@ i3GEO.Interface = |
| 1543 | 1545 | layers.push(layer); |
| 1544 | 1546 | } |
| 1545 | 1547 | } |
| 1546 | - // TODO precisa subir os layers graficos? | |
| 1547 | - // i3GEO.Interface.openlayers.sobeLayersGraficos(); | |
| 1548 | 1548 | }, |
| 1549 | 1549 | /** |
| 1550 | 1550 | * Liga ou desliga um layer |
| ... | ... | @@ -1586,47 +1586,31 @@ i3GEO.Interface = |
| 1586 | 1586 | * Define um dos layers existentes no mapa como baselayer |
| 1587 | 1587 | */ |
| 1588 | 1588 | ativaFundo : function(nome) { |
| 1589 | - var t, temp = i3geoOL.getLayersBy("name", nome), layers, layersn, i, status; | |
| 1590 | - if (temp.length > 0) { | |
| 1591 | - i3geoOL.setBaseLayer(temp[0]); | |
| 1592 | - if (i3GEO.Interface.openlayers.OLpanzoombar) { | |
| 1593 | - i3GEO.Interface.openlayers.OLpanzoombar.div.style.top = i3GEO.Interface.BARRADEZOOMTOP + "px"; | |
| 1594 | - i3GEO.Interface.openlayers.OLpanzoombar.div.style.left = i3GEO.Interface.BARRADEZOOMLEFT + "px"; | |
| 1595 | - i3GEO.Interface.openlayers.OLpanzoombar.div.style.right = i3GEO.Interface.BARRADEZOOMRIGHT + "px"; | |
| 1596 | - } | |
| 1597 | - if (i3GEO.Interface.BARRADEZOOMLEFT === 0 && i3GEO.Interface.openlayers.OLpanzoombar) { | |
| 1598 | - i3GEO.Interface.openlayers.OLpanzoombar.div.style.left = null; | |
| 1599 | - } | |
| 1600 | - if (i3GEO.Interface.BARRADEZOOMRIGHT === 0 && i3GEO.Interface.openlayers.OLpanzoombar) { | |
| 1601 | - i3GEO.Interface.openlayers.OLpanzoombar.div.style.right = null; | |
| 1589 | + var baseLayers, n, i, t, ck = true; | |
| 1590 | + if ($i("CK" + nome)) { | |
| 1591 | + ck = $i("CK" + nome).checked; | |
| 1592 | + } | |
| 1593 | + | |
| 1594 | + baseLayers = i3geoOL.getLayersBase(); | |
| 1595 | + n = baseLayers.length; | |
| 1596 | + i3GEO.Interface.openlayers.LAYERFUNDO = ""; | |
| 1597 | + // desmarca os checkbox e desliga todos | |
| 1598 | + for (i = 0; i < n; i++) { | |
| 1599 | + baseLayers[i].setVisible(false); | |
| 1600 | + t = $i("CK" + baseLayers[i].get("name")); | |
| 1601 | + if (t) { | |
| 1602 | + t.checked = false; | |
| 1602 | 1603 | } |
| 1603 | - i3GEO.Interface.openlayers.LAYERFUNDO = nome; | |
| 1604 | - } else { | |
| 1605 | - i3GEO.Interface.openlayers.LAYERFUNDO = ""; | |
| 1606 | 1604 | } |
| 1607 | - // | |
| 1608 | - // verifica se existe um checkbox com o id do tema | |
| 1609 | - // se existir, altera o status do checkbox | |
| 1610 | - // e processa a lista de layers de fundo | |
| 1611 | - // | |
| 1612 | - t = $i("CK" + temp[0].id); | |
| 1613 | - if (t) { | |
| 1614 | - status = true; | |
| 1615 | - if (t.checked === false) { | |
| 1616 | - status = false; | |
| 1617 | - } | |
| 1618 | - // desativa todos | |
| 1619 | - // aqui sao considerados apenas os layers em layersadicionais, pois esses que foram inseridos na arvore | |
| 1620 | - layers = i3GEO.Interface.openlayers.LAYERSADICIONAIS; | |
| 1621 | - layersn = layers.length; | |
| 1622 | - for (i = 0; i < layersn; i++) { | |
| 1623 | - if (layers[i].name != nome) { | |
| 1624 | - layers[i].setVisibility(false); | |
| 1625 | - $i("CK" + layers[i].id).checked = false; | |
| 1605 | + // liga/desliga o fundo desejado | |
| 1606 | + for (i = 0; i < n; i++) { | |
| 1607 | + if (baseLayers[i].get("name") === nome) { | |
| 1608 | + baseLayers[i].setVisible(!ck); | |
| 1609 | + if (!ck === true) { | |
| 1610 | + $i("CK" + nome).checked = true; | |
| 1611 | + i3GEO.Interface.openlayers.LAYERFUNDO = nome; | |
| 1626 | 1612 | } |
| 1627 | 1613 | } |
| 1628 | - temp[0].setVisibility(!status); | |
| 1629 | - t.checked = !status; | |
| 1630 | 1614 | } |
| 1631 | 1615 | }, |
| 1632 | 1616 | /** |
| ... | ... | @@ -1822,32 +1806,32 @@ i3GEO.Interface = |
| 1822 | 1806 | }, |
| 1823 | 1807 | /** |
| 1824 | 1808 | * Section: i3GEO.Interface.Googlemaps |
| 1825 | - * | |
| 1809 | + * | |
| 1826 | 1810 | * Interface com motor de navegação baseado na API Google Maps |
| 1827 | - * | |
| 1811 | + * | |
| 1828 | 1812 | * Namespace: |
| 1829 | - * | |
| 1813 | + * | |
| 1830 | 1814 | * i3GEO.Interface.googlemaps |
| 1831 | - * | |
| 1815 | + * | |
| 1832 | 1816 | * Utilizado quando |
| 1833 | - * | |
| 1817 | + * | |
| 1834 | 1818 | * i3GEO.Interface.ATUAL = "googlemaps" |
| 1835 | - * | |
| 1819 | + * | |
| 1836 | 1820 | * Cria o objeto i3GeoMap que pode receber os métodos da API. Cria também o objeto i3GeoMapOverlay do tipo Overlay, |
| 1837 | 1821 | * utilizado para cálculos ou para receber elementos gráficos. |
| 1838 | 1822 | */ |
| 1839 | 1823 | googlemaps : { |
| 1840 | 1824 | /** |
| 1841 | 1825 | * Propriedade: ESTILOS |
| 1842 | - * | |
| 1826 | + * | |
| 1843 | 1827 | * Estilos que podem ser utilizados com o mapa |
| 1844 | - * | |
| 1828 | + * | |
| 1845 | 1829 | * Para novos estilos, acrescente seu codigo nesse objeto |
| 1846 | - * | |
| 1830 | + * | |
| 1847 | 1831 | * Fonte http://maps-api-tt.appspot.com/apilite/styled/styled.html |
| 1848 | - * | |
| 1832 | + * | |
| 1849 | 1833 | * Tipo: |
| 1850 | - * | |
| 1834 | + * | |
| 1851 | 1835 | * {objeto} |
| 1852 | 1836 | */ |
| 1853 | 1837 | ESTILOS : { |
| ... | ... | @@ -2045,29 +2029,29 @@ i3GEO.Interface = |
| 2045 | 2029 | }, |
| 2046 | 2030 | /** |
| 2047 | 2031 | * Propriedade: ESTILOPADRAO |
| 2048 | - * | |
| 2032 | + * | |
| 2049 | 2033 | * Nome do estilo definido em ESTILOS que sera usado como padrao para o mapa. Se for "" sera usado o estilo normal do Google |
| 2050 | - * | |
| 2034 | + * | |
| 2051 | 2035 | * Estilos pre-definidos Red, Countries, Night, Blue, Greyscale, No roads, Mixed, Chilled |
| 2052 | - * | |
| 2036 | + * | |
| 2053 | 2037 | * Tipo: |
| 2054 | - * | |
| 2038 | + * | |
| 2055 | 2039 | * {string} |
| 2056 | 2040 | */ |
| 2057 | 2041 | ESTILOPADRAO : "", |
| 2058 | 2042 | /** |
| 2059 | 2043 | * Propriedade: MAPOPTIONS |
| 2060 | - * | |
| 2044 | + * | |
| 2061 | 2045 | * Objeto contendo opções que serão utilizadas no construtor do mapa conforme a API do GoogleMaps |
| 2062 | - * | |
| 2046 | + * | |
| 2063 | 2047 | * Exemplo de uso |
| 2064 | - * | |
| 2048 | + * | |
| 2065 | 2049 | * i3GEO.Interface.googlemaps.MAPOPTIONS = {maxZoom:5}; |
| 2066 | - * | |
| 2050 | + * | |
| 2067 | 2051 | * https://developers.google.com/maps/documentation/javascript/reference#MapOptions |
| 2068 | - * | |
| 2052 | + * | |
| 2069 | 2053 | * Tipo: |
| 2070 | - * | |
| 2054 | + * | |
| 2071 | 2055 | * {MapOptions} |
| 2072 | 2056 | */ |
| 2073 | 2057 | MAPOPTIONS : { |
| ... | ... | @@ -2078,43 +2062,43 @@ i3GEO.Interface = |
| 2078 | 2062 | }, |
| 2079 | 2063 | /** |
| 2080 | 2064 | * Propriedade: OPACIDADE |
| 2081 | - * | |
| 2065 | + * | |
| 2082 | 2066 | * Valor da opacidade das camadas i3geo do mapa |
| 2083 | - * | |
| 2067 | + * | |
| 2084 | 2068 | * Varia de 0 a 1 |
| 2085 | - * | |
| 2069 | + * | |
| 2086 | 2070 | * Tipo: |
| 2087 | - * | |
| 2071 | + * | |
| 2088 | 2072 | * {Numeric} |
| 2089 | - * | |
| 2073 | + * | |
| 2090 | 2074 | * Default: 0.8 |
| 2091 | 2075 | */ |
| 2092 | 2076 | OPACIDADE : 0.8, |
| 2093 | 2077 | /** |
| 2094 | 2078 | * Propriedade: TIPOMAPA |
| 2095 | - * | |
| 2079 | + * | |
| 2096 | 2080 | * Tipo de mapa que será usado como default, conforme constantes definidas na API do Google Maps. |
| 2097 | - * | |
| 2081 | + * | |
| 2098 | 2082 | * Tipo: |
| 2099 | - * | |
| 2083 | + * | |
| 2100 | 2084 | * {string} |
| 2101 | - * | |
| 2085 | + * | |
| 2102 | 2086 | * Valores: |
| 2103 | - * | |
| 2087 | + * | |
| 2104 | 2088 | * satellite|roadmap|hybrid|terrain |
| 2105 | - * | |
| 2089 | + * | |
| 2106 | 2090 | * Default: |
| 2107 | - * | |
| 2091 | + * | |
| 2108 | 2092 | * terrain |
| 2109 | 2093 | */ |
| 2110 | 2094 | TIPOMAPA : "terrain", |
| 2111 | 2095 | /** |
| 2112 | 2096 | * Variable: ZOOMSCALE |
| 2113 | - * | |
| 2097 | + * | |
| 2114 | 2098 | * Array com a lista de escalas em cada nivel de zoom utilizado pelo Google |
| 2115 | - * | |
| 2099 | + * | |
| 2116 | 2100 | * Tipo: |
| 2117 | - * | |
| 2101 | + * | |
| 2118 | 2102 | * {array} |
| 2119 | 2103 | */ |
| 2120 | 2104 | ZOOMSCALE : [ |
| ... | ... | @@ -2141,17 +2125,17 @@ i3GEO.Interface = |
| 2141 | 2125 | ], |
| 2142 | 2126 | /** |
| 2143 | 2127 | * Parametros adicionais que são inseridos na URL que define cada layer |
| 2144 | - * | |
| 2128 | + * | |
| 2145 | 2129 | * Tipo: |
| 2146 | - * | |
| 2130 | + * | |
| 2147 | 2131 | * {string} |
| 2148 | 2132 | */ |
| 2149 | 2133 | PARAMETROSLAYER : "&TIPOIMAGEM=" + i3GEO.configura.tipoimagem, |
| 2150 | 2134 | /** |
| 2151 | 2135 | * String acrescentada a url de cada tile para garantir a remoção do cache local |
| 2152 | - * | |
| 2136 | + * | |
| 2153 | 2137 | * Tipo: |
| 2154 | - * | |
| 2138 | + * | |
| 2155 | 2139 | * {string} |
| 2156 | 2140 | */ |
| 2157 | 2141 | posfixo : 0, |
| ... | ... | @@ -2476,8 +2460,8 @@ i3GEO.Interface = |
| 2476 | 2460 | * i3GEO.parametros.w + "&layer=" + nomeLayer + i3GEO.Interface.googlemaps.PARAMETROSLAYER + '&r=' + Math.random(); return |
| 2477 | 2461 | * url+'&nd='+i3GEO.Interface.googlemaps.posfixo; }, tileSize: new google.maps.Size(i3GEO.parametros.w, i3GEO.parametros.h), |
| 2478 | 2462 | * isPng: true, name: nomeLayer, projection : i3GeoMap.getProjection(), b : i3GeoMap.getBounds() }); |
| 2479 | - * | |
| 2480 | - * | |
| 2463 | + * | |
| 2464 | + * | |
| 2481 | 2465 | * google.maps.event.addListener(i3GEOTileO, 'tilesloaded', function() { var l = |
| 2482 | 2466 | * i3GEO.Interface.googlemaps.retornaObjetoLayer(nomeLayer); var currentBounds = i3GeoMap.getBounds(); if |
| 2483 | 2467 | * (currentBounds.equals(l.b)) { return; } l.b = currentBounds; }); |
| ... | ... | @@ -2764,22 +2748,22 @@ i3GEO.Interface = |
| 2764 | 2748 | }, |
| 2765 | 2749 | /** |
| 2766 | 2750 | * Function: adicionaKml |
| 2767 | - * | |
| 2751 | + * | |
| 2768 | 2752 | * Insere no mapa uma camada KML com base na API do Google Maps |
| 2769 | - * | |
| 2753 | + * | |
| 2770 | 2754 | * As camadas adicionadas são acrescentadas na árvore de camadas |
| 2771 | - * | |
| 2755 | + * | |
| 2772 | 2756 | * A lista de nomes dos objetos geoXml criados é mantida em i3GEO.mapas.GEOXML |
| 2773 | - * | |
| 2757 | + * | |
| 2774 | 2758 | * Parametros: |
| 2775 | - * | |
| 2759 | + * | |
| 2776 | 2760 | * {Boolean} - define se o mapa será deslocado para encaixar o KML |
| 2777 | - * | |
| 2761 | + * | |
| 2778 | 2762 | * {String} - URL do arquivo KML. Se não for definido, a URL será obtida do INPUT com id = i3geo_urlkml (veja |
| 2779 | 2763 | * i3GEO.gadgets.mostraInserirKml) |
| 2780 | - * | |
| 2764 | + * | |
| 2781 | 2765 | * {string} - titulo que aparecerá na árvore. Se não for definido, será calculado aleatoriamente. |
| 2782 | - * | |
| 2766 | + * | |
| 2783 | 2767 | * {boolean} - indica se a camada estará ativa ou não. Se não for definido, será considerado como |
| 2784 | 2768 | * true |
| 2785 | 2769 | */ |
| ... | ... | @@ -2827,19 +2811,19 @@ i3GEO.Interface = |
| 2827 | 2811 | }, |
| 2828 | 2812 | /** |
| 2829 | 2813 | * Acrescenta na árvore de camadas um novo tema no nó que mostra os arquivos KML inseridos no mapa |
| 2830 | - * | |
| 2814 | + * | |
| 2831 | 2815 | * Os temas são incluídos em um nó chamado "Google Maps". |
| 2832 | - * | |
| 2816 | + * | |
| 2833 | 2817 | * Para obter esse nó utilize var node = i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idkml","raiz"); |
| 2834 | - * | |
| 2818 | + * | |
| 2835 | 2819 | * Parametros: |
| 2836 | - * | |
| 2820 | + * | |
| 2837 | 2821 | * url {string} - url do arquivo KML |
| 2838 | - * | |
| 2822 | + * | |
| 2839 | 2823 | * nomeOverlay {string} - título do tema |
| 2840 | - * | |
| 2824 | + * | |
| 2841 | 2825 | * ativo {boolean} - indica o estado do checkbox |
| 2842 | - * | |
| 2826 | + * | |
| 2843 | 2827 | * id {string} - nome do objeto GGeoXml |
| 2844 | 2828 | */ |
| 2845 | 2829 | adicionaNoArvoreGoogle : function(url, nomeOverlay, ativo, id) { |
| ... | ... | @@ -2921,11 +2905,11 @@ i3GEO.Interface = |
| 2921 | 2905 | }, |
| 2922 | 2906 | /** |
| 2923 | 2907 | * Ativa ou desativa uma camada do nó de layers KML |
| 2924 | - * | |
| 2908 | + * | |
| 2925 | 2909 | * Parametro: |
| 2926 | - * | |
| 2910 | + * | |
| 2927 | 2911 | * obj {object} - objeto do tipo checkbox que foi ativado/desativado |
| 2928 | - * | |
| 2912 | + * | |
| 2929 | 2913 | * url {string} - url do KML |
| 2930 | 2914 | */ |
| 2931 | 2915 | ativaDesativaCamadaKml : function(obj, url) { |
| ... | ... | @@ -2945,51 +2929,51 @@ i3GEO.Interface = |
| 2945 | 2929 | }, |
| 2946 | 2930 | /** |
| 2947 | 2931 | * Section: i3GEO.Interface.GoogleEarth |
| 2948 | - * | |
| 2932 | + * | |
| 2949 | 2933 | * Interface com motor de navegação baseado na API Google Earth |
| 2950 | - * | |
| 2934 | + * | |
| 2951 | 2935 | * Namespace: |
| 2952 | - * | |
| 2936 | + * | |
| 2953 | 2937 | * i3GEO.Interface.googleearth |
| 2954 | - * | |
| 2938 | + * | |
| 2955 | 2939 | * Utilizado quando |
| 2956 | - * | |
| 2940 | + * | |
| 2957 | 2941 | * i3GEO.Interface.ATUAL = "googleearth" |
| 2958 | - * | |
| 2942 | + * | |
| 2959 | 2943 | * Cria o objeto i3GeoMap que pode receber os métodos da API. |
| 2960 | 2944 | */ |
| 2961 | 2945 | googleearth : { |
| 2962 | 2946 | /** |
| 2963 | 2947 | * Variable: PARAMETROSLAYER |
| 2964 | - * | |
| 2948 | + * | |
| 2965 | 2949 | * Parametros adicionais que são inseridos na URL que define cada layer |
| 2966 | - * | |
| 2950 | + * | |
| 2967 | 2951 | * Tipo: |
| 2968 | - * | |
| 2952 | + * | |
| 2969 | 2953 | * {string} |
| 2970 | 2954 | */ |
| 2971 | 2955 | PARAMETROSLAYER : "&TIPOIMAGEM=" + i3GEO.configura.tipoimagem, |
| 2972 | 2956 | /** |
| 2973 | 2957 | * String acrescentada a url de cada tile para garantir a remoção do cache local |
| 2974 | - * | |
| 2958 | + * | |
| 2975 | 2959 | * Tipo: |
| 2976 | - * | |
| 2960 | + * | |
| 2977 | 2961 | * {string} |
| 2978 | 2962 | */ |
| 2979 | 2963 | posfixo : "", |
| 2980 | 2964 | /** |
| 2981 | 2965 | * Propriedade: GADGETS |
| 2982 | - * | |
| 2966 | + * | |
| 2983 | 2967 | * Lista dos controles específicos da API do Google Earth que serão inseridos ou não no mapa |
| 2984 | - * | |
| 2968 | + * | |
| 2985 | 2969 | * Tipo: |
| 2986 | - * | |
| 2970 | + * | |
| 2987 | 2971 | * {object} |
| 2988 | - * | |
| 2972 | + * | |
| 2989 | 2973 | * Default: |
| 2990 | - * | |
| 2974 | + * | |
| 2991 | 2975 | * (start code) |
| 2992 | - * | |
| 2976 | + * | |
| 2993 | 2977 | * i3GEO.Interface.googleearth.GADGETS = { setMouseNavigationEnabled : true, setStatusBarVisibility : true, |
| 2994 | 2978 | * setOverviewMapVisibility : true, setScaleLegendVisibility : true, setAtmosphereVisibility : true, setGridVisibility : false, |
| 2995 | 2979 | * getSun : false, LAYER_BORDERS : true, LAYER_BUILDINGS : false, LAYER_ROADS : false, LAYER_TERRAIN : true } (end) |
| ... | ... | @@ -3419,22 +3403,22 @@ i3GEO.Interface = |
| 3419 | 3403 | }, |
| 3420 | 3404 | /** |
| 3421 | 3405 | * Function: adicionaKml |
| 3422 | - * | |
| 3406 | + * | |
| 3423 | 3407 | * Insere no mapa uma camada KML com base na API do Google Earth |
| 3424 | - * | |
| 3408 | + * | |
| 3425 | 3409 | * As camadas adicionadas são crescentadas na árvore de camadas |
| 3426 | - * | |
| 3410 | + * | |
| 3427 | 3411 | * A lista de nomes dos objetos geoXml criados é mantida em i3GEO.mapas.GEOXML |
| 3428 | - * | |
| 3412 | + * | |
| 3429 | 3413 | * Parametros: |
| 3430 | - * | |
| 3414 | + * | |
| 3431 | 3415 | * {Boolean} - define se o mapa será deslocado para encaixar o KML |
| 3432 | - * | |
| 3416 | + * | |
| 3433 | 3417 | * {String} - URL do arquivo KML. Se não for definido, a URL será obtida do INPUT com id = i3geo_urlkml (veja |
| 3434 | 3418 | * i3GEO.gadgets.mostraInserirKml) |
| 3435 | - * | |
| 3419 | + * | |
| 3436 | 3420 | * {string} - titulo que aparecerá na árvore. Se não for definido, será calculado aleatoriamente. |
| 3437 | - * | |
| 3421 | + * | |
| 3438 | 3422 | * {boolean} - indica se a camada estará ativa ou não. Se não for definido, será considerado como |
| 3439 | 3423 | * true |
| 3440 | 3424 | */ |
| ... | ... | @@ -3490,21 +3474,21 @@ i3GEO.Interface = |
| 3490 | 3474 | i3GEO.php.listaRSSwsARRAY(monta, "KML"); |
| 3491 | 3475 | }, |
| 3492 | 3476 | /** |
| 3493 | - * | |
| 3477 | + * | |
| 3494 | 3478 | * Acrescenta na árvore de camadas um novo tema no nó que mostra os arquivos KML inseridos no mapa |
| 3495 | - * | |
| 3479 | + * | |
| 3496 | 3480 | * Os temas são incluídos em um nó chamado "Google Earth". |
| 3497 | - * | |
| 3481 | + * | |
| 3498 | 3482 | * Para obter esse nó utilize var node = i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idkml","raiz"); |
| 3499 | - * | |
| 3483 | + * | |
| 3500 | 3484 | * Parametros: |
| 3501 | - * | |
| 3485 | + * | |
| 3502 | 3486 | * url {string} - url do arquivo KML |
| 3503 | - * | |
| 3487 | + * | |
| 3504 | 3488 | * nomeOverlay {string} - título do tema |
| 3505 | - * | |
| 3489 | + * | |
| 3506 | 3490 | * ativo {boolean} - indica o estado do checkbox |
| 3507 | - * | |
| 3491 | + * | |
| 3508 | 3492 | * id {string} - nome do objeto GGeoXml |
| 3509 | 3493 | */ |
| 3510 | 3494 | adicionaNoArvoreGoogle : function(url, nomeOverlay, ativo, id) { |
| ... | ... | @@ -3597,11 +3581,11 @@ i3GEO.Interface = |
| 3597 | 3581 | } |
| 3598 | 3582 | }, |
| 3599 | 3583 | /** |
| 3600 | - * | |
| 3584 | + * | |
| 3601 | 3585 | * Ativa ou desativa uma camada do nó de layers KML |
| 3602 | - * | |
| 3586 | + * | |
| 3603 | 3587 | * Parametro: |
| 3604 | - * | |
| 3588 | + * | |
| 3605 | 3589 | * obj {object} - objeto do tipo checkbox que foi ativado/desativado |
| 3606 | 3590 | */ |
| 3607 | 3591 | ativaDesativaCamadaKml : function(obj) { | ... | ... |
temas/_lbiomashp.map
| ... | ... | @@ -6,12 +6,12 @@ MAP |
| 6 | 6 | DATA "/var/www/i3geo/aplicmap/dados/biomas.shp" |
| 7 | 7 | METADATA |
| 8 | 8 | "TIP" "CD_LEGENDA" |
| 9 | - "CACHE" "SIM" | |
| 9 | + "CACHE" "NAO" | |
| 10 | 10 | "CLASSE" "SIM" |
| 11 | 11 | "permitekmz" "SIM" |
| 12 | 12 | "ITENSDESC" "Bioma Teste de acentuação" |
| 13 | 13 | "ESCALA" "1000000" |
| 14 | - "TILES" "SIM" | |
| 14 | + "TILES" "NAO" | |
| 15 | 15 | "permitedownload" "SIM" |
| 16 | 16 | "download" "SIM" |
| 17 | 17 | "itembuscarapida" "CD_LEGENDA" | ... | ... |