Commit 37c5221770c0518b6da3c3ed3004deaac430f8d9
1 parent
b00bdf65
Exists in
master
and in
7 other branches
$1
Showing
3 changed files
with
34 additions
and
1 deletions
Show diff stats
@@ -0,0 +1,12 @@ | @@ -0,0 +1,12 @@ | ||
1 | +[leg_class_html] | ||
2 | +[if name=CLASSE oper=neq value=NAO] | ||
3 | +<table class="tabelaItemLegenda"> | ||
4 | +<tr> | ||
5 | + <td class="tabelaItemLegendaIcone" width=22 > | ||
6 | + <img src="[leg_icon width=16 height=16 ]" /> | ||
7 | + </td> | ||
8 | + <td style=font-size:12px class="tabelaItemLegendaNome" > | ||
9 | + <span >[leg_class_name]</span> | ||
10 | + </td> | ||
11 | +</tr> | ||
12 | +</table>[/if][/leg_class_html] |
aplicmap/ogcwsv6.map
@@ -14,6 +14,7 @@ MAXSIZE 10000 | @@ -14,6 +14,7 @@ MAXSIZE 10000 | ||
14 | NAME "i3geoogc" | 14 | NAME "i3geoogc" |
15 | DEBUG OFF | 15 | DEBUG OFF |
16 | #DEBUG 5 | 16 | #DEBUG 5 |
17 | + #CONFIG "MS_ERRORFILE" "/tmp/ms_tmp/ms_error.txt" | ||
17 | OUTPUTFORMAT | 18 | OUTPUTFORMAT |
18 | NAME 'png' | 19 | NAME 'png' |
19 | MIMETYPE "image/png" | 20 | MIMETYPE "image/png" |
ogc.php
@@ -623,7 +623,27 @@ if(strtolower($req->getValueByName("REQUEST")) == "getlegendgraphic"){ | @@ -623,7 +623,27 @@ if(strtolower($req->getValueByName("REQUEST")) == "getlegendgraphic"){ | ||
623 | } | 623 | } |
624 | if($req->getValueByName("FORMAT") == ""){ | 624 | if($req->getValueByName("FORMAT") == ""){ |
625 | $req->setParameter("FORMAT","image/png"); | 625 | $req->setParameter("FORMAT","image/png"); |
626 | - } | 626 | + } |
627 | + | ||
628 | + if($req->getValueByName("FORMAT") == "text/html"){ | ||
629 | + $req->setParameter("FORMAT","image/png"); | ||
630 | + $l = $oMap->getlayerbyname($req->getValueByName("LAYER")); | ||
631 | + $l->set("status",MS_DEFAULT); | ||
632 | + $l->set("minscaledenom",0); | ||
633 | + $l->set("maxscaledenom",0); | ||
634 | + $legenda = $oMap->legend; | ||
635 | + $legenda->set("status",MS_DEFAULT); | ||
636 | + $legenda->set("template",$locaplic."/aplicmap/legendaOgc.html"); | ||
637 | + | ||
638 | + $tmparray["my_tag"] = "value_of_my_tag"; | ||
639 | + if($leg = @$oMap->processlegendtemplate($tmparray)){ | ||
640 | + if (function_exists("mb_convert_encoding")){ | ||
641 | + //$leg = mb_convert_encoding($leg,"UTF-8","ISO-8859-1"); | ||
642 | + } | ||
643 | + echo $leg;exit; | ||
644 | + } | ||
645 | + } | ||
646 | + | ||
627 | } | 647 | } |
628 | if(strtolower($req->getValueByName("REQUEST")) == "getfeature"){ | 648 | if(strtolower($req->getValueByName("REQUEST")) == "getfeature"){ |
629 | $l = $oMap->getlayer(0); | 649 | $l = $oMap->getlayer(0); |