Commit 58377c8bcdb33a68197a6f3d4dd0c12f274dcf60

Authored by Edmar Moretti
1 parent fc4eb3b6

Corrige a geração da legenda no plugin parametrossql nas requisições wms

Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
ferramentas/parametrossql/ogc.php
... ... @@ -374,6 +374,11 @@ if(strtolower($req->getValueByName("REQUEST")) == "getlegendgraphic"){
374 374 if($req->getValueByName("FORMAT") == "text/html"){
375 375 //$req->setParameter("FORMAT","image/png");
376 376 $l = $oMap->getlayerbyname($req->getValueByName("LAYER"));
  377 + //o nome do layer pode ter sido alterado no mapfile caso o cache esteja ativo
  378 + //nesse caso, pega o primeiro layer
  379 + if($l == ""){
  380 + $l = $oMap->getlayer(0);
  381 + }
377 382 $l->set("status",MS_DEFAULT);
378 383 //remove offset de simbolos pontuais
379 384 $nclass = $l->numclasses;
... ...