Commit 37c5221770c0518b6da3c3ed3004deaac430f8d9

Authored by Edmar Moretti
1 parent b00bdf65

$1

aplicmap/legendaOgc.html 0 → 100644
... ... @@ -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 14 NAME "i3geoogc"
15 15 DEBUG OFF
16 16 #DEBUG 5
  17 + #CONFIG "MS_ERRORFILE" "/tmp/ms_tmp/ms_error.txt"
17 18 OUTPUTFORMAT
18 19 NAME 'png'
19 20 MIMETYPE "image/png"
... ...
ogc.php
... ... @@ -623,7 +623,27 @@ if(strtolower($req-&gt;getValueByName(&quot;REQUEST&quot;)) == &quot;getlegendgraphic&quot;){
623 623 }
624 624 if($req->getValueByName("FORMAT") == ""){
625 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 648 if(strtolower($req->getValueByName("REQUEST")) == "getfeature"){
629 649 $l = $oMap->getlayer(0);
... ...