Commit 9426b4b776e1433ce786ca62fcedd47fa0d9886d
1 parent
43b7d81b
Exists in
master
and in
7 other branches
--no commit message
Showing
6 changed files
with
43 additions
and
18 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesjs/classe_arvoredecamadas.js
... | ... | @@ -2105,6 +2105,9 @@ i3GEO.arvoreDeCamadas = |
2105 | 2105 | if (typeof (console) !== 'undefined') |
2106 | 2106 | console.info("i3GEO.arvoreDeCamadas.filtraCamadas()"); |
2107 | 2107 | |
2108 | + if(!camadas){ | |
2109 | + camadas = i3GEO.arvoreDeCamadas.CAMADAS; | |
2110 | + } | |
2108 | 2111 | var resultado = [], i = 0, temp, nelementos = camadas.length, ltema; |
2109 | 2112 | if (nelementos > 0) { |
2110 | 2113 | do { |
... | ... | @@ -2112,18 +2115,18 @@ i3GEO.arvoreDeCamadas = |
2112 | 2115 | if (ltema.escondido.toLowerCase() !== "sim") { |
2113 | 2116 | temp = ltema[propriedade]; |
2114 | 2117 | if (operador === "igual") { |
2115 | - if (temp == valor) // não usar === aqui | |
2118 | + if (temp+"".toLowerCase() == valor+"".toLowerCase()) // não usar === aqui | |
2116 | 2119 | { |
2117 | 2120 | resultado.push(ltema); |
2118 | 2121 | } |
2119 | 2122 | } |
2120 | 2123 | if (operador === "diferente") { |
2121 | - if (temp !== valor) { | |
2124 | + if (temp+"".toLowerCase() !== valor+"".toLowerCase()) { | |
2122 | 2125 | resultado.push(ltema); |
2123 | 2126 | } |
2124 | 2127 | } |
2125 | 2128 | if (operador === "menor") { |
2126 | - if (temp < valor) { | |
2129 | + if (temp+"".toLowerCase() < valor+"".toLowerCase()) { | |
2127 | 2130 | resultado.push(ltema); |
2128 | 2131 | } |
2129 | 2132 | } | ... | ... |
classesjs/classe_editorgm.js
... | ... | @@ -395,11 +395,19 @@ i3GEO.editorGM = { |
395 | 395 | temp = function(retorno){ |
396 | 396 | var temp,n,i,WicketWkt, |
397 | 397 | wkt = "", |
398 | - colunaid = i3GEO.editorGM.descregioes["a_"+regiao]["identificador"], | |
398 | + colunaid = "", | |
399 | 399 | valorid = "", |
400 | - colunanome = i3GEO.editorGM.descregioes["a_"+regiao]["colunanomeregiao"], | |
400 | + colunanome = "", | |
401 | 401 | valornome = "", |
402 | 402 | aguarde = $i("i3GEOjanelaEditor_imagemCabecalho"); |
403 | + | |
404 | + if(i3GEO.editorGM.descregioes["a_"+regiao]["identificador"]){ | |
405 | + colunaid = i3GEO.editorGM.descregioes["a_"+regiao]["identificador"]; | |
406 | + } | |
407 | + if(i3GEO.editorGM.descregioes["a_"+regiao]["colunanomeregiao"]){ | |
408 | + colunanome = i3GEO.editorGM.descregioes["a_"+regiao]["colunanomeregiao"]; | |
409 | + } | |
410 | + | |
403 | 411 | if(aguarde){ |
404 | 412 | aguarde.style.visibility = "hidden"; |
405 | 413 | } |
... | ... | @@ -475,10 +483,17 @@ i3GEO.editorGM = { |
475 | 483 | for(i=0;i<n;i++){ |
476 | 484 | //so e possivel editar nesse esquema |
477 | 485 | //if(dados[i].esquemadb == "i3geo_metaestat"){ |
478 | - ins += "<option value='"+dados[i].codigo_tipo_regiao+"'>"+dados[i].nome_tipo_regiao+"</option>"; | |
486 | + ins += "<option title='' value='"+dados[i].codigo_tipo_regiao+"'>"+dados[i].nome_tipo_regiao+"</option>"; | |
479 | 487 | i3GEO.editorGM.descregioes["a_"+dados[i].codigo_tipo_regiao] = dados[i]; |
480 | 488 | //} |
481 | 489 | } |
490 | + //inclui as camadas que sao editaveis e estao no mapa | |
491 | + dados = i3GEO.arvoreDeCamadas.filtraCamadas("editavel", "SIM", "igual"); | |
492 | + n = dados.length; | |
493 | + for(i=0;i<n;i++){ | |
494 | + ins += "<option title='layer' value='"+dados[i].name+"'>"+dados[i].tema+"</option>"; | |
495 | + i3GEO.editorGM.descregioes["a_"+dados[i].name] = ""; | |
496 | + } | |
482 | 497 | ins += "</select>"; |
483 | 498 | if(onde){ |
484 | 499 | onde.innerHTML = ins; |
... | ... | @@ -496,15 +511,22 @@ i3GEO.editorGM = { |
496 | 511 | return; |
497 | 512 | } |
498 | 513 | i3GEO.editorGM.editarAtributos.desativa(); |
499 | - var temp = function(retorno){ | |
500 | - if(i3GEO.arvoreDeCamadas.pegaTema(retorno.layer) == ""){ | |
501 | - i3GEO.php.adtema(i3GEO.atualiza,retorno.mapfile); | |
502 | - //guarda o codigo e relaciona com a regiao | |
503 | - i3GEO.editorGM.regioestemas["a"+$i("i3geoCartoRegioesEditaveis").value] = retorno.layer; | |
504 | - i3GEO.editorGM.temasregioes[retorno.layer] = $i("i3geoCartoRegioesEditaveis").value; | |
505 | - } | |
506 | - }; | |
507 | - i3GEO.php.mapfileTipoRegiao(temp,combo.value); | |
514 | + //caso a camada escolhida seja uma camada normal, vinda de um mapfile | |
515 | + if(i3GEO.arvoreDeCamadas.pegaTema(combo.value) != ""){ | |
516 | + i3GEO.editorGM.regioestemas["a"+combo.value] = combo.value; | |
517 | + i3GEO.editorGM.temasregioes[combo.value] = combo.value; | |
518 | + } | |
519 | + else{ | |
520 | + var temp = function(retorno){ | |
521 | + if(i3GEO.arvoreDeCamadas.pegaTema(retorno.layer) == ""){ | |
522 | + i3GEO.php.adtema(i3GEO.atualiza,retorno.mapfile); | |
523 | + //guarda o codigo e relaciona com a regiao | |
524 | + i3GEO.editorGM.regioestemas["a"+combo.value] = retorno.layer; | |
525 | + i3GEO.editorGM.temasregioes[retorno.layer] = combo.value; | |
526 | + } | |
527 | + }; | |
528 | + i3GEO.php.mapfileTipoRegiao(temp,combo.value); | |
529 | + } | |
508 | 530 | }, |
509 | 531 | /** |
510 | 532 | * Altera as bordas dos icones e desativa eventos |
... | ... | @@ -938,6 +960,7 @@ i3GEO.editorGM = { |
938 | 960 | ins += "<option value='"+dados[i].id_medida_variavel+"'>"+dados[i].nomemedida+"</option>"; |
939 | 961 | } |
940 | 962 | } |
963 | + | |
941 | 964 | ins += "</select>"; |
942 | 965 | $i("editarAtributosMedidasVariavel").innerHTML = ins; |
943 | 966 | }; | ... | ... |
classesphp/classe_atributos.php
... | ... | @@ -2347,7 +2347,6 @@ class Atributos |
2347 | 2347 | $layer->set("tolerance",$resolucao); |
2348 | 2348 | $ident = @$layer->queryByPoint($pt, 1, -1); |
2349 | 2349 | } |
2350 | - | |
2351 | 2350 | if ($ident == MS_SUCCESS){ |
2352 | 2351 | //$ident = @$layer->queryByPoint($pt, 1, -1); |
2353 | 2352 | //verifica se o layer e editavel no sistema METAESTAT |
... | ... | @@ -2440,6 +2439,7 @@ class Atributos |
2440 | 2439 | } |
2441 | 2440 | $conta = $conta + 1; |
2442 | 2441 | } |
2442 | + | |
2443 | 2443 | if($wkt == "sim"){ |
2444 | 2444 | $arraytemp = array( |
2445 | 2445 | "alias"=>"wkt", | ... | ... |
css/geral.css
temas/_lbairros.map
... | ... | @@ -13,7 +13,7 @@ MAP |
13 | 13 | "EDITAVEL" "SIM" |
14 | 14 | "ESQUEMATABELAEDITAVEL" "ibge" |
15 | 15 | "ITENS" "gid,co_bairro,no_bairro,no_distr,no_municip" |
16 | - "TEMA" "Bairro (IBGE)" | |
16 | + "TEMA" "Bairro via mapfile" | |
17 | 17 | "COLUNAIDUNICO" "gid" |
18 | 18 | "COLUNAGEOMETRIA" "the_geom" |
19 | 19 | "TABELAEDITAVEL" "bairros" | ... | ... |