Commit b6480661c6ed2631ec5df85954b71a2b315d7cfa

Authored by Edmar Moretti
1 parent 50a96330

Inclusão da opção cluster na legenda e correção na aplicação de offset em estilos

admin/admin.db
No preview for this file type
classesphp/classe_legenda.php
... ... @@ -1106,6 +1106,12 @@ class Legenda
1106 1106 case "width":
1107 1107 $estilo->set("width",$valor);
1108 1108 continue;
  1109 + case "offsetx":
  1110 + $estilo->set("offsetx",$valor);
  1111 + continue;
  1112 + case "offsety":
  1113 + $estilo->set("offsety",$valor);
  1114 + continue;
1109 1115 case "opacity":
1110 1116 $estilo->set("opacity",$valor);
1111 1117 continue;
... ...
classesphp/classe_temas.php
... ... @@ -1316,18 +1316,7 @@ Adiciona LABEL em uma classe de um tema
1316 1316 }
1317 1317 function removeCluster(){
1318 1318 $cluster = $this->layer->cluster;
1319   - /*
1320   - $cluster->maxdistance == 10 &&
1321   - $cluster->buffer == 0.0 &&
1322   - $cluster->region.string == '' &&
1323   - $cluster->group.string == '' &&
1324   - $cluster->filter.string == '';
1325   - */
1326   - $cluster->setFilter(NULL);
1327   - $cluster->setGroup(NULL);
1328   - $cluster->maxdistance = 10;
1329   - $cluster->region = NULL;
1330   -
  1319 + $this->layer->updatefromstring("LAYER CLUSTER END END");
1331 1320 $this->layer->setMetaData("cache","");
1332 1321 $this->layer->setMetadata("tiles","NAO");
1333 1322 $this->layer->setMetadata("cortepixels",0);
... ...
ferramentas/legenda/index.js
... ... @@ -376,32 +376,7 @@ i3GEOF.legenda =
376 376 b.addClass("abrir100");
377 377 i3GEOF.legenda.ativaFoco();
378 378 i3GEOF.legenda.mostralegenda();
379   - i3GEO.util.comboItens("", i3GEOF.legenda.tema, function(retorno) {
380   - if ($i("i3GEOlegendaitensValorUnico")) {
381   - $i("i3GEOlegendaitensValorUnico").innerHTML = retorno.dados;
382   - }
383   - if ($i("i3GEOlegendaClassesValorUnico")) {
384   - $i("i3GEOlegendaClassesValorUnico").innerHTML = retorno.dados;
385   - }
386   - if ($i("i3GEOlegendaitensMetade")) {
387   - $i("i3GEOlegendaitensMetade").innerHTML = retorno.dados;
388   - }
389   - if ($i("i3GEOlegendaitensMetadeId")) {
390   - $i("i3GEOlegendaitensMetadeId").innerHTML = retorno.dados;
391   - }
392   - if ($i("i3GEOlegendaitensMedia")) {
393   - $i("i3GEOlegendaitensMedia").innerHTML = retorno.dados;
394   - }
395   - if ($i("i3GEOlegendaitensValorClass")) {
396   - $i("i3GEOlegendaitensValorClass").innerHTML = retorno.dados;
397   - }
398   - if ($i("i3GEOlegendaitensCluster")) {
399   - $i("i3GEOlegendaitensCluster").innerHTML = retorno.dados;
400   - }
401   - if ($i("i3GEOlegendaitensValorQuartil")) {
402   - $i("i3GEOlegendaitensValorQuartil").innerHTML = retorno.dados;
403   - }
404   - });
  379 + i3GEOF.legenda.montaCombosItens();
405 380 if (i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.legenda.tema).classe && i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.legenda.tema).classe
406 381 .toLowerCase() == "nao") {
407 382 $i("i3GEOFlegendamostra").checked = false;
... ... @@ -516,6 +491,7 @@ i3GEOF.legenda =
516 491 * Função executada após ocorrer alguma alteração efetiva da legenda do mapa
517 492 */
518 493 aposAlterarLegenda : function() {
  494 + i3GEO.arvoreDeCamadas.CAMADAS = [];
519 495 i3GEO.atualiza();
520 496 i3GEO.Interface.atualizaTema("", i3GEOF.legenda.tema);
521 497 i3GEO.arvoreDeCamadas.atualizaLegenda(i3GEOF.legenda.tema);
... ... @@ -1952,7 +1928,7 @@ i3GEOF.legenda =
1952 1928 + "' id='i3GEOlegendamaxsize' />"
1953 1929 + "</form></div>"
1954 1930  
1955   - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"offsetx\",\"i3GEOlegendasymbolname\")' title='"
  1931 + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"offsetx\",\"i3GEOlegendaoffsetx\")' title='"
1956 1932 + $trad('aplicatodos', i3GEOF.legenda.dicionario)
1957 1933 + "' src='"
1958 1934 + i3GEO.configura.locaplic
... ... @@ -1967,7 +1943,7 @@ i3GEOF.legenda =
1967 1943 + "' id='i3GEOlegendaoffsetx' />"
1968 1944 + "</form></div>"
1969 1945  
1970   - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"offsety\",\"i3GEOlegendasymbolname\")' title='"
  1946 + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"offsety\",\"i3GEOlegendaoffsety\")' title='"
1971 1947 + $trad('aplicatodos', i3GEOF.legenda.dicionario)
1972 1948 + "' src='"
1973 1949 + i3GEO.configura.locaplic
... ... @@ -2305,8 +2281,8 @@ i3GEOF.legenda =
2305 2281 },
2306 2282 aplicarCluster : function(){
2307 2283 var temp = function() {
2308   - // i3GEOF.legenda.mostralegenda();
2309 2284 i3GEOF.legenda.aposAlterarLegenda();
  2285 + i3GEOF.legenda.montaCombosItens();
2310 2286 }, p, cp;
2311 2287 p =
2312 2288 i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
... ... @@ -2330,7 +2306,7 @@ i3GEOF.legenda =
2330 2306 },
2331 2307 removerCluster : function(){
2332 2308 var temp = function() {
2333   - // i3GEOF.legenda.mostralegenda();
  2309 + i3GEOF.legenda.montaCombosItens();
2334 2310 i3GEOF.legenda.aposAlterarLegenda();
2335 2311 }, p, cp;
2336 2312 p =
... ... @@ -2342,5 +2318,33 @@ i3GEOF.legenda =
2342 2318 cp = new cpaint();
2343 2319 cp.set_response_type("JSON");
2344 2320 cp.call(p, "foo", temp);
  2321 + },
  2322 + montaCombosItens : function(){
  2323 + i3GEO.util.comboItens("", i3GEOF.legenda.tema, function(retorno) {
  2324 + if ($i("i3GEOlegendaitensValorUnico")) {
  2325 + $i("i3GEOlegendaitensValorUnico").innerHTML = retorno.dados;
  2326 + }
  2327 + if ($i("i3GEOlegendaClassesValorUnico")) {
  2328 + $i("i3GEOlegendaClassesValorUnico").innerHTML = retorno.dados;
  2329 + }
  2330 + if ($i("i3GEOlegendaitensMetade")) {
  2331 + $i("i3GEOlegendaitensMetade").innerHTML = retorno.dados;
  2332 + }
  2333 + if ($i("i3GEOlegendaitensMetadeId")) {
  2334 + $i("i3GEOlegendaitensMetadeId").innerHTML = retorno.dados;
  2335 + }
  2336 + if ($i("i3GEOlegendaitensMedia")) {
  2337 + $i("i3GEOlegendaitensMedia").innerHTML = retorno.dados;
  2338 + }
  2339 + if ($i("i3GEOlegendaitensValorClass")) {
  2340 + $i("i3GEOlegendaitensValorClass").innerHTML = retorno.dados;
  2341 + }
  2342 + if ($i("i3GEOlegendaitensCluster")) {
  2343 + $i("i3GEOlegendaitensCluster").innerHTML = retorno.dados;
  2344 + }
  2345 + if ($i("i3GEOlegendaitensValorQuartil")) {
  2346 + $i("i3GEOlegendaitensValorQuartil").innerHTML = retorno.dados;
  2347 + }
  2348 + });
2345 2349 }
2346 2350 };
2347 2351 \ No newline at end of file
... ...
temas/_llocali.map
1 1 MAP
2 2 FONTSET "../symbols/fontes.txt"
3 3 SYMBOLSET "../symbols/simbolosv6.sym"
  4 +
4 5 LAYER
5 6 CONNECTION ""
6 7 DATA "/var/www/i3geo/aplicmap/dados/locali.shp"
... ...