Commit 58377c8bcdb33a68197a6f3d4dd0c12f274dcf60
1 parent
fc4eb3b6
Exists in
master
and in
7 other branches
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,6 +374,11 @@ if(strtolower($req->getValueByName("REQUEST")) == "getlegendgraphic"){ | ||
374 | if($req->getValueByName("FORMAT") == "text/html"){ | 374 | if($req->getValueByName("FORMAT") == "text/html"){ |
375 | //$req->setParameter("FORMAT","image/png"); | 375 | //$req->setParameter("FORMAT","image/png"); |
376 | $l = $oMap->getlayerbyname($req->getValueByName("LAYER")); | 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 | $l->set("status",MS_DEFAULT); | 382 | $l->set("status",MS_DEFAULT); |
378 | //remove offset de simbolos pontuais | 383 | //remove offset de simbolos pontuais |
379 | $nclass = $l->numclasses; | 384 | $nclass = $l->numclasses; |