From 37c5221770c0518b6da3c3ed3004deaac430f8d9 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Wed, 29 Jan 2014 16:52:32 +0000 Subject: [PATCH] $1 --- aplicmap/legendaOgc.html | 12 ++++++++++++ aplicmap/ogcwsv6.map | 1 + ogc.php | 22 +++++++++++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 aplicmap/legendaOgc.html diff --git a/aplicmap/legendaOgc.html b/aplicmap/legendaOgc.html new file mode 100644 index 0000000..d598461 --- /dev/null +++ b/aplicmap/legendaOgc.html @@ -0,0 +1,12 @@ +[leg_class_html] +[if name=CLASSE oper=neq value=NAO] + + + + + +
+ + + [leg_class_name] +
[/if][/leg_class_html] diff --git a/aplicmap/ogcwsv6.map b/aplicmap/ogcwsv6.map index 0531e33..7e71ff6 100644 --- a/aplicmap/ogcwsv6.map +++ b/aplicmap/ogcwsv6.map @@ -14,6 +14,7 @@ MAXSIZE 10000 NAME "i3geoogc" DEBUG OFF #DEBUG 5 + #CONFIG "MS_ERRORFILE" "/tmp/ms_tmp/ms_error.txt" OUTPUTFORMAT NAME 'png' MIMETYPE "image/png" diff --git a/ogc.php b/ogc.php index 8d5355e..a214067 100644 --- a/ogc.php +++ b/ogc.php @@ -623,7 +623,27 @@ if(strtolower($req->getValueByName("REQUEST")) == "getlegendgraphic"){ } if($req->getValueByName("FORMAT") == ""){ $req->setParameter("FORMAT","image/png"); - } + } + + if($req->getValueByName("FORMAT") == "text/html"){ + $req->setParameter("FORMAT","image/png"); + $l = $oMap->getlayerbyname($req->getValueByName("LAYER")); + $l->set("status",MS_DEFAULT); + $l->set("minscaledenom",0); + $l->set("maxscaledenom",0); + $legenda = $oMap->legend; + $legenda->set("status",MS_DEFAULT); + $legenda->set("template",$locaplic."/aplicmap/legendaOgc.html"); + + $tmparray["my_tag"] = "value_of_my_tag"; + if($leg = @$oMap->processlegendtemplate($tmparray)){ + if (function_exists("mb_convert_encoding")){ + //$leg = mb_convert_encoding($leg,"UTF-8","ISO-8859-1"); + } + echo $leg;exit; + } + } + } if(strtolower($req->getValueByName("REQUEST")) == "getfeature"){ $l = $oMap->getlayer(0); -- libgit2 0.21.2