Commit d47d60b0233e7101f69d99dce0049cf0ace796a4

Authored by Edmar Moretti
1 parent be61b438

i3geo/i3geo#120 Adicionar informação sobre símbolo ao gerar legenda

Showing 1 changed file with 8 additions and 3 deletions   Show diff stats
classesphp/classe_legenda.php
@@ -368,9 +368,10 @@ class Legenda @@ -368,9 +368,10 @@ class Legenda
368 "outline" => "-1 -1 -1", 368 "outline" => "-1 -1 -1",
369 "background" => "-1 -1 -1" 369 "background" => "-1 -1 -1"
370 ); 370 );
371 - // remove o offset em simbolos do tipo imagem  
372 - 371 + //o simbolo pode ser definido apenas com base nas cores
  372 + $simple = true;
373 373
  374 + // remove o offset em simbolos do tipo imagem
374 if ($classe->numstyles > 0) { 375 if ($classe->numstyles > 0) {
375 $estilo = $classe->getstyle(0); 376 $estilo = $classe->getstyle(0);
376 if ($estilo->symbolname != "" && file_exists($estilo->symbolname)) { 377 if ($estilo->symbolname != "" && file_exists($estilo->symbolname)) {
@@ -382,6 +383,9 @@ class Legenda @@ -382,6 +383,9 @@ class Legenda
382 "outline" => corRGB($estilo->outlinecolor), 383 "outline" => corRGB($estilo->outlinecolor),
383 "background" => corRGB($estilo->backgroundcolor) 384 "background" => corRGB($estilo->backgroundcolor)
384 ); 385 );
  386 + if($estilo->symbolname != "" && $estilo->symbolname != "linha" && $estilo->symbolname != "ponto"){
  387 + $simple = false;
  388 + }
385 } 389 }
386 $imagem = $classe->createLegendIcon($w, $h)->saveWebImage(); 390 $imagem = $classe->createLegendIcon($w, $h)->saveWebImage();
387 391
@@ -393,7 +397,8 @@ class Legenda @@ -393,7 +397,8 @@ class Legenda
393 "layer" => $la->name, 397 "layer" => $la->name,
394 "cor"=>$cor, 398 "cor"=>$cor,
395 "w"=>$w, 399 "w"=>$w,
396 - "h"=>$h 400 + "h"=>$h,
  401 + "simple" => $simple
397 ); 402 );
398 } 403 }
399 $legenda[] = array( 404 $legenda[] = array(