diff --git a/aplicmap/geral1debianv7.map b/aplicmap/geral1debianv7.map index 9418e0d..f6afa32 100755 --- a/aplicmap/geral1debianv7.map +++ b/aplicmap/geral1debianv7.map @@ -18,7 +18,7 @@ MAP #edite os caminhos caso a aplicacao esteja instalada em um local diferente do default # FONTSET "/var/www/i3geo/symbols/fontes.txt" - SYMBOLSET "/var/www/i3geo/symbols/simbolosv6.sym" + SYMBOLSET "/var/www/i3geo/symbols/simbolosv7.sym" SHAPEPATH "/var/www/geodados" IMAGECOLOR 104 171 195 MAXSIZE 4096 diff --git a/aplicmap/simpolv7.map b/aplicmap/simpolv7.map index b129641..c19eae0 100755 --- a/aplicmap/simpolv7.map +++ b/aplicmap/simpolv7.map @@ -1,5 +1,5 @@ MAP -SYMBOLSET ../symbols/simbolospolv6.sym +SYMBOLSET ../symbols/simbolospolv7.sym FONTSET "../symbols/fontes.txt" DEBUG OFF #DEBUG 5 diff --git a/classesphp/classe_analise.php b/classesphp/classe_analise.php index de36ffc..38619ca 100644 --- a/classesphp/classe_analise.php +++ b/classesphp/classe_analise.php @@ -1132,7 +1132,7 @@ class Analise } if ($layer->getResult(0) !== FALSE) { - if($this->v == 6) + if($this->v >= 6) { $shape = $layer->getShape($layer->getResult(0)); } @@ -1261,7 +1261,7 @@ class Analise for ($i = 0; $i < $res_count; ++$i) { - if($this->v == 6) + if($this->v >= 6) { $shapesdestino[] = $layerdestino->getShape($layerdestino->getResult($i)); } @@ -2200,7 +2200,7 @@ class Analise $layerPt->open(); $res_count = $layerPt->getNumresults(); for ($i = 0; $i < $res_count; ++$i){ - if($this->v == 6){ + if($this->v >= 6){ $s = $layerPt->getShape($layerPt->getResult($i)); } else{ diff --git a/classesphp/classe_atributos.php b/classesphp/classe_atributos.php index 670e242..df75ea0 100644 --- a/classesphp/classe_atributos.php +++ b/classesphp/classe_atributos.php @@ -214,7 +214,7 @@ class Atributos //$this->layer->setfilter(""); $ext = ""; //procura o registro e pega a extensão geográfica - if($this->v == 6){ + if($this->v >= 6){ $this->layer->open(); $shape = $this->layer->getShape(new resultObj($registro)); //$shape = $this->layer->getShape($this->layer->getResult($registro)); @@ -505,7 +505,7 @@ class Atributos $valoresunicos = array(); for ($i = $inicio; $i < $res_count; ++$i){ $valitem = array(); - if($this->v == 6){ + if($this->v >= 6){ $shape = $this->layer->getShape($this->layer->getResult($i)); $indx = $shape->index; } @@ -621,7 +621,7 @@ class Atributos $sopen = $this->layer->open(); for ($i = 0; $i < $res_count; ++$i){ $valitem = array(); - if($this->v == 6){ + if($this->v >= 6){ $shape = $this->layer->getShape($this->layer->getResult($i)); $indx = $shape->index; } @@ -732,7 +732,7 @@ class Atributos $palavra = $this->remove_accents(strtolower($palavra)); for ($i = 0; $i < $res_count; ++$i) { $valitem = array(); - if($this->v == 6){ + if($this->v >= 6){ $shape = $l->getShape($l->getResult($i)); $indx = $shape->index; } @@ -1930,7 +1930,7 @@ class Atributos for ($i = 0; $i < $res_count; ++$i) { $valori = array(); - if($this->v == 6) + if($this->v >= 6) { $shape = $layer->getShape($layer->getResult($i)); } @@ -2308,7 +2308,7 @@ class Atributos } for ($i = 0; $i < $res_count; ++$i) { $valori = array(); - if($this->v == 6){ + if($this->v >= 6){ $shape = $layer->getShape($layer->getResult($i)); } else{ diff --git a/classesphp/classe_legenda.php b/classesphp/classe_legenda.php index 63d2f9e..5942b26 100644 --- a/classesphp/classe_legenda.php +++ b/classesphp/classe_legenda.php @@ -656,8 +656,8 @@ class Legenda { $mapatemp = ms_newMapObj($this->localaplicacao."\\aplicmap\\".$t); } - else - {$mapatemp = ms_newMapObj($this->localaplicacao."/aplicmap/".$t); + else{ + $mapatemp = ms_newMapObj($this->localaplicacao."/aplicmap/".$t); } $l = $mapatemp->getlayer(0); @@ -665,21 +665,38 @@ class Legenda { $novoss = dirname($this->mapa->symbolsetfilename)."\\".basename($mapatemp->symbolsetfilename); } - else - {$novoss = dirname($this->mapa->symbolsetfilename)."/".basename($mapatemp->symbolsetfilename); + else{ + $novoss = dirname($this->mapa->symbolsetfilename)."/".basename($mapatemp->symbolsetfilename); } + $this->mapa->setsymbolset($novoss); + $ns = $this->mapa->getnumsymbols(); - for ($i=0;$i < $ns;++$i) - { + $inis = 0; + + //na versao 7 nao tem o simbolo 0 + if($this->v >= 7){ + $inis = 1; + //se for versao 7 inclui um primeiro simbolo com valor 0 e imagem + $oSymbol = $this->mapa->getSymbolObjectById(1); + $adiciona = ms_newLayerObj($this->mapa, $l); + $nomel = $l->name; + $tematemp= $this->mapa->getlayerbyname($nomel); + $c = $tematemp->getClass(0); + $e = $c->getstyle(0); + $e->set("size",1); + $e->set("width",1); + $ico = $c->createLegendIcon(40,40); + $nimg = $ico->saveWebImage(); + $pat = $this->mapa->web->imageurl; + $ins .= ""; + } + for ($i=$inis;$i < $ns;++$i){ $oSymbol = $this->mapa->getSymbolObjectById($i); - $nomes = $oSymbol->name; - if($nomes == "") - { + if($nomes == ""){ $nomes = $i; } - $adiciona = ms_newLayerObj($this->mapa, $l); $nomel = $l->name; $tematemp= $this->mapa->getlayerbyname($nomel); @@ -688,11 +705,8 @@ class Legenda $e->set("symbolname",$nomes); $e->set("size",$tamanho); $e->set("width",$width); - $ico = $c->createLegendIcon(40,40); - $nimg = $ico->saveWebImage(); - $pat = $this->mapa->web->imageurl; $ins .= ""; } @@ -701,8 +715,7 @@ class Legenda //copy ($dir."/simbolos".$tipo.".inc",$dir_tmp."/comum/simbolos".$tipo.".inc"); return $ins; } - else - { + else { $res = ""; include_once $dir."/simbolos".$tipo.".inc"; return $res; @@ -728,8 +741,7 @@ class Legenda $tipoLayer = $this->layer->type; $classe = $this->layer->getclass($classe); $numestilos = $classe->numstyles; - for ($i=0;$i<$numestilos;++$i) - { + for ($i=0;$i<$numestilos;++$i){ $linha = array(); $estilo = $classe->getstyle($i); $linha[] = $i; @@ -739,7 +751,7 @@ class Legenda $linha[] = $estilo->symbolname; $linha[] = $estilo->size; $linha[] = $estilo->opacity; - if($this->v == 6){ + if($this->v >= 6){ $linha[] = $estilo->width; $s = $estilo->symbol; $linha[] = implode(" ",$s->getPatternArray); @@ -832,11 +844,11 @@ class Legenda { $estilo->set("size",$size); } - if ((isset ($width)) && ($width != "-1") && ($this->v == 6)) + if ((isset ($width)) && ($width != "-1") && ($this->v >= 6)) { $estilo->set("width",$width); } - if ((isset ($pattern)) && ($pattern != "-1") && ($this->v == 6) && ($pattern != "")) + if ((isset ($pattern)) && ($pattern != "-1") && ($this->v >= 6) && ($pattern != "")) { $estilo->updatefromstring("STYLE PATTERN ".$pattern." END"); } @@ -1054,7 +1066,7 @@ class Legenda case "pattern": if(!empty($pattern)){ $pattern = str_replace(","," ",$valor); - if ($this->v == 6){ + if ($this->v >= 6){ $estilo->updatefromstring("STYLE PATTERN ".$valor." END"); } } diff --git a/classesphp/classe_selecao.php b/classesphp/classe_selecao.php index 9d05740..50c1f74 100644 --- a/classesphp/classe_selecao.php +++ b/classesphp/classe_selecao.php @@ -276,7 +276,7 @@ $buffer - Opcional $res_count = $layero->getNumresults(); for ($i = 0; $i < $res_count; ++$i) { - if($this->v == 6) + if($this->v >= 6) {$sh = $layero->getShape($layero->getResult($i));} else{ $result = $layero->getResult($i); @@ -339,7 +339,7 @@ $buffer - Opcional $conta = $layero->getNumresults(); for ($k = 0; $k < $conta; $k++) { - if($this->v == 6) + if($this->v >= 6) {$s = @$layero->getShape($layero->getResult($k));} else {$s = @$layero->getfeature($k,-1);} diff --git a/classesphp/classe_shp.php b/classesphp/classe_shp.php index 0b38721..cbf5387 100644 --- a/classesphp/classe_shp.php +++ b/classesphp/classe_shp.php @@ -438,7 +438,7 @@ array("layerprj"=>$xylayer,"mapprj"=>$xymapa) $sopen = $this->layer->open(); if($sopen == MS_FAILURE){return "erro";} $xy = array(); - if($this->v == 6) + if($this->v >= 6) {$shape = $this->layer->getShape($this->layer->getshape(new resultObj($res_count - 1)));} else{ $result = $this->layer->getResult($res_count - 1); -- libgit2 0.21.2