Commit 52394d6e30a50456b781df62ddad63d25d94d506
1 parent
6486fd81
Exists in
master
and in
7 other branches
Correções na interface flamingo
Showing
3 changed files
with
76 additions
and
72 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,70 @@ |
| 1 | +<?php | |
| 2 | + $string1 = "<?xml version='1.0' encoding='UTF-8'?>"; | |
| 3 | + $string1 .= | |
| 4 | +'<FLAMINGO xmlns:fmc="fmc" lang="en" languages="en" tooltipdelay="500"> | |
| 5 | +<fmc:Logo id="logo"/> | |
| 6 | +<fmc:Coordinates right="right" top="top" decimals="4" listento="map"> | |
| 7 | +<style id=".xy" font-family="verdana" font-size="10px" color="#555555" display="block" font-weight="normal"/> | |
| 8 | +<string id="xy"> | |
| 9 | +<en> | |
| 10 | +<![CDATA[x:[x]<br>y:[y]]]> | |
| 11 | +</en> | |
| 12 | +</string> | |
| 13 | +</fmc:Coordinates> | |
| 14 | +<fmc:Window skin="g" top="60" right="right -100" width="300" bottom="bottom -70" canresize="true" canclose="true" title="Identificação" visible="false"> | |
| 15 | +<fmc:IdentifyResultsHTML width="100%" height="100%" listento="map"> | |
| 16 | +<style id=".bold" font-family="verdana" font-size="12px" color="#333333" display="block" font-weight="bold"/> | |
| 17 | +<style id=".normal" font-family="verdana" font-size="11px" color="#333333" display="block" font-weight="normal"/> | |
| 18 | +<style id=".uitleg" font-family="verdana" font-size="11px" color="#0033cc" display="block" font-weight="normal" font-style="italic"/> | |
| 19 | +</fmc:IdentifyResultsHTML> | |
| 20 | +</fmc:Window> | |
| 21 | +<fmc:Scalebar id="sbkm" skin="style1" left="30" bottom="bottom" width="200" units=" km" magicnumber="1000" listento="map"> | |
| 22 | +<style id=".label" font-family="verdana" font-size="10px" color="#555555" display="block" font-weight="normal"/> | |
| 23 | +<style id=".units" font-family="verdana" font-size="10px" color="#555555" display="block" font-weight="normal"/> | |
| 24 | +</fmc:Scalebar> | |
| 25 | +<fmc:ToolGroup left="30" top="0" tool="zoom" listento="map"> | |
| 26 | +<fmc:ToolZoomin id="zoom" title="aproxima"/> | |
| 27 | +<fmc:ToolZoomout left="30"/> | |
| 28 | +<fmc:ToolSuperPan left="60"/> | |
| 29 | +<fmc:ToolMeasure left="90" units=" m" magicnumber="1" decimals="0"/> | |
| 30 | +</fmc:ToolGroup> | |
| 31 | +<fmc:ButtonPrev right="210" top="2" listento="map"/> | |
| 32 | +<fmc:ButtonNext right="240" top="2" listento="map"/> | |
| 33 | +<fmc:ButtonFull right="270" top="2" listento="map"/> | |
| 34 | +<fmc:ZoomerV left="5" top="40" height="163" listento="map"/> | |
| 35 | +<fmc:MonitorLayer id="monitor" left="230" top="55" listento="map"> | |
| 36 | +<style id=".text" font-family="verdana" font-size="12px" color="#666666" display="block" font-weight="normal"/> | |
| 37 | +<string id="waiting" en="Criando o mapa..."/> | |
| 38 | +<string id="loading" en="Redesenhando [percentage]%..."/> | |
| 39 | +</fmc:MonitorLayer> | |
| 40 | +<fmc:Map id="overview" movequality="HIGH" right="right" bottom="bottom" width="150" height="150" extent="-79.8713331401,-41.7736536401,-26.2264448599,11.8712346401" fullextent="-79.8713331401,-41.7736536401,-26.2264448599,11.8712346401"> | |
| 41 | +<fmc:LayerOverview listento="map" followfactor="10000"/> | |
| 42 | +<fmc:LayerImage id="brasil" imageurl="../imagens/referencia1.png" extent="-79.8713331401,-41.7736536401,-26.2264448599,11.8712346401" /> | |
| 43 | +</fmc:Map> | |
| 44 | + | |
| 45 | +<fmc:Container borderwidth="0" bordercolor="#b8b8b8" left="left" top="top" bottom="bottom" right="right"> | |
| 46 | + <fmc:BorderNavigation skin="F1" width="100%" height="100%" listento="map"/> | |
| 47 | + <fmc:Map id="map" movequality="HIGH" conform="true" mapunits="DECIMALDEGREES" width="100%" height="100%" fullextent="-180,-90,180,90" extent="-76.5125927,-39.3925675209,-29.5851853,9.49014852081" > | |
| 48 | + <fmc:LayerIdentifyIcon/> | |
| 49 | + <fmc:LayerGrid gridwidth="10" gridheight="10" minscale="11000"/> | |
| 50 | + <fmc:LayerGrid gridwidth="5" gridheight="5" minscale="5000" maxscale="11000"/> | |
| 51 | + <fmc:LayerGrid gridwidth="2" gridheight="2" minscale="1000" maxscale="5000"/> | |
| 52 | + <fmc:LayerGrid gridwidth="1" gridheight="1" minscale= "500" maxscale="1000"/> | |
| 53 | + <fmc:LayerGrid gridwidth="0.5" gridheight="0.5" minscale="100" maxscale="500"/> | |
| 54 | + <fmc:LayerGrid gridwidth="0.1" gridheight="0.1" maxscale="100"/> | |
| 55 | + <fmc:LayerOGWMS id="OG3" format="PNG" url="'; | |
| 56 | + $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
| 57 | + $host = $protocolo[0]."://".$_SERVER['HTTP_HOST']; | |
| 58 | + //include_once("../ms_configura.php"); | |
| 59 | + $string2 = $host."/i3geo/classesphp/flamingoogc.php?g_sid=".$g_sid; | |
| 60 | + $string3 = '&WMS=OGC:WMS&SERVICE=WMS&VERSION=1.1.0&SRS=EPSG:4291&EXCEPTIONS=INIMAGE&BGCOLOR=0xF0F0F0" LAYERS="copyright"/> | |
| 61 | + </fmc:Map> | |
| 62 | +</fmc:Container> | |
| 63 | +</FLAMINGO>'; | |
| 64 | + $stringFinal = $string1.$string2.$string3; | |
| 65 | + $arq = dirname($map_file)."/flamingo.xml"; | |
| 66 | + $fp = fopen($arq,"w"); | |
| 67 | + fwrite($fp,$stringFinal); | |
| 68 | + fclose($fp); | |
| 69 | + | |
| 70 | +?> | |
| 0 | 71 | \ No newline at end of file | ... | ... |
classesphp/flamingoogc.php
| ... | ... | @@ -51,7 +51,7 @@ ogc.php?tema=bioma |
| 51 | 51 | |
| 52 | 52 | ogc.php?intervalo=0,50 |
| 53 | 53 | */ |
| 54 | -error_reporting(0); | |
| 54 | +error_reporting(E_ALL); | |
| 55 | 55 | if (!function_exists('ms_GetVersion')) |
| 56 | 56 | { |
| 57 | 57 | if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) |
| ... | ... | @@ -95,7 +95,7 @@ $nmap = ms_newMapobj($map_file); |
| 95 | 95 | $c = $nmap->numlayers; |
| 96 | 96 | for ($i=0;$i < $c;++$i) |
| 97 | 97 | { |
| 98 | - $l = $nmap->getlayer($i);} | |
| 98 | + $l = $nmap->getlayer($i); | |
| 99 | 99 | if($l->connectiontype != MS_WMS) |
| 100 | 100 | { |
| 101 | 101 | $l->setmetadata("ows_title",pegaNome($l)); |
| ... | ... | @@ -105,9 +105,9 @@ for ($i=0;$i < $c;++$i) |
| 105 | 105 | $l->set("dump",MS_TRUE); |
| 106 | 106 | $l->setmetadata("WMS_INCLUDE_ITEMS","all"); |
| 107 | 107 | $l->setmetadata("WFS_INCLUDE_ITEMS","all"); |
| 108 | - $c = $l->getclass(0); | |
| 109 | - if ($c->name == "") | |
| 110 | - {$c->name = " ";} | |
| 108 | + $classe = $l->getclass(0); | |
| 109 | + if ($classe->name == "") | |
| 110 | + {$classe->name = " ";} | |
| 111 | 111 | if (isset($postgis_mapa)) |
| 112 | 112 | { |
| 113 | 113 | if ($postgis_mapa != "") | ... | ... |
classesphp/mapa_controle.php
| ... | ... | @@ -206,73 +206,7 @@ O arquivo xml é gravado no diretório temporário do mapserver e contém a string d |
| 206 | 206 | Esse gerador, recebe como parâmetro o id da seção atual e transforma o mapfile atual em um webservcie capaz de ser entendido pelo flamingo. |
| 207 | 207 | */ |
| 208 | 208 | case "montaFlamingo": |
| 209 | - $string1 = "<?xml version='1.0' encoding='UTF-8'?>"; | |
| 210 | - $string1 .= | |
| 211 | -'<FLAMINGO xmlns:fmc="fmc" lang="en" languages="en" tooltipdelay="500"> | |
| 212 | -<fmc:Logo id="logo"/> | |
| 213 | -<fmc:Coordinates right="right" top="top" decimals="4" listento="map"> | |
| 214 | -<style id=".xy" font-family="verdana" font-size="10px" color="#555555" display="block" font-weight="normal"/> | |
| 215 | -<string id="xy"> | |
| 216 | -<en> | |
| 217 | -<![CDATA[x:[x]<br>y:[y]]]> | |
| 218 | -</en> | |
| 219 | -</string> | |
| 220 | -</fmc:Coordinates> | |
| 221 | -<fmc:Window skin="g" top="60" right="right -100" width="300" bottom="bottom -70" canresize="true" canclose="true" title="Identificação" visible="false"> | |
| 222 | -<fmc:IdentifyResultsHTML width="100%" height="100%" listento="map"> | |
| 223 | -<style id=".bold" font-family="verdana" font-size="12px" color="#333333" display="block" font-weight="bold"/> | |
| 224 | -<style id=".normal" font-family="verdana" font-size="11px" color="#333333" display="block" font-weight="normal"/> | |
| 225 | -<style id=".uitleg" font-family="verdana" font-size="11px" color="#0033cc" display="block" font-weight="normal" font-style="italic"/> | |
| 226 | -</fmc:IdentifyResultsHTML> | |
| 227 | -</fmc:Window> | |
| 228 | -<fmc:Scalebar id="sbkm" skin="style1" left="30" bottom="bottom" width="200" units=" km" magicnumber="1000" listento="map"> | |
| 229 | -<style id=".label" font-family="verdana" font-size="10px" color="#555555" display="block" font-weight="normal"/> | |
| 230 | -<style id=".units" font-family="verdana" font-size="10px" color="#555555" display="block" font-weight="normal"/> | |
| 231 | -</fmc:Scalebar> | |
| 232 | -<fmc:ToolGroup left="30" top="0" tool="zoom" listento="map"> | |
| 233 | -<fmc:ToolZoomin id="zoom" title="aproxima"/> | |
| 234 | -<fmc:ToolZoomout left="30"/> | |
| 235 | -<fmc:ToolSuperPan left="60"/> | |
| 236 | -<fmc:ToolMeasure left="90" units=" m" magicnumber="1" decimals="0"/> | |
| 237 | -</fmc:ToolGroup> | |
| 238 | -<fmc:ButtonPrev right="210" top="2" listento="map"/> | |
| 239 | -<fmc:ButtonNext right="240" top="2" listento="map"/> | |
| 240 | -<fmc:ButtonFull right="270" top="2" listento="map"/> | |
| 241 | -<fmc:ZoomerV left="5" top="40" height="163" listento="map"/> | |
| 242 | -<fmc:MonitorLayer id="monitor" left="230" top="55" listento="map"> | |
| 243 | -<style id=".text" font-family="verdana" font-size="12px" color="#666666" display="block" font-weight="normal"/> | |
| 244 | -<string id="waiting" en="Criando o mapa..."/> | |
| 245 | -<string id="loading" en="Redesenhando [percentage]%..."/> | |
| 246 | -</fmc:MonitorLayer> | |
| 247 | -<fmc:Map id="overview" movequality="HIGH" right="right" bottom="bottom" width="150" height="150" extent="-79.8713331401,-41.7736536401,-26.2264448599,11.8712346401" fullextent="-79.8713331401,-41.7736536401,-26.2264448599,11.8712346401"> | |
| 248 | -<fmc:LayerOverview listento="map" followfactor="10000"/> | |
| 249 | -<fmc:LayerImage id="brasil" imageurl="http://mapas.mma.gov.br/i3geo/imagens/referencia1.png" extent="-79.8713331401,-41.7736536401,-26.2264448599,11.8712346401" /> | |
| 250 | -</fmc:Map> | |
| 251 | - | |
| 252 | -<fmc:Container borderwidth="0" bordercolor="#b8b8b8" left="left" top="top" bottom="bottom" right="right"> | |
| 253 | - <fmc:BorderNavigation skin="F1" width="100%" height="100%" listento="map"/> | |
| 254 | - <fmc:Map id="map" movequality="HIGH" conform="true" mapunits="DECIMALDEGREES" width="100%" height="100%" fullextent="-180,-90,180,90" extent="-76.5125927,-39.3925675209,-29.5851853,9.49014852081" > | |
| 255 | - <fmc:LayerIdentifyIcon/> | |
| 256 | - <fmc:LayerGrid gridwidth="10" gridheight="10" minscale="11000"/> | |
| 257 | - <fmc:LayerGrid gridwidth="5" gridheight="5" minscale="5000" maxscale="11000"/> | |
| 258 | - <fmc:LayerGrid gridwidth="2" gridheight="2" minscale="1000" maxscale="5000"/> | |
| 259 | - <fmc:LayerGrid gridwidth="1" gridheight="1" minscale= "500" maxscale="1000"/> | |
| 260 | - <fmc:LayerGrid gridwidth="0.5" gridheight="0.5" minscale="100" maxscale="500"/> | |
| 261 | - <fmc:LayerGrid gridwidth="0.1" gridheight="0.1" maxscale="100"/> | |
| 262 | - <fmc:LayerOGWMS id="OG3" format="PNG" url="'; | |
| 263 | - $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
| 264 | - $host = $protocolo[0]."://".$_SERVER['HTTP_HOST']; | |
| 265 | - //include_once("../ms_configura.php"); | |
| 266 | - $string2 = $host."/i3geo/classesphp/flamingoogc.php?g_sid=".$g_sid; | |
| 267 | - $string3 = '&WMS=OGC:WMS&SERVICE=WMS&VERSION=1.1.0&SRS=EPSG:4291&EXCEPTIONS=INIMAGE&BGCOLOR=0xF0F0F0" LAYERS="copyright"/> | |
| 268 | - </fmc:Map> | |
| 269 | -</fmc:Container> | |
| 270 | -</FLAMINGO>'; | |
| 271 | - $stringFinal = $string1.$string2.$string3; | |
| 272 | - $arq = dirname($map_file)."/flamingo.xml"; | |
| 273 | - $fp = fopen($arq,"w"); | |
| 274 | - fwrite($fp,$stringFinal); | |
| 275 | - fclose($fp); | |
| 209 | + include("flamingo.inc"); | |
| 276 | 210 | $cp->set_data($host."/ms_tmp/".basename(dirname($map_file))."/flamingo.xml"); |
| 277 | 211 | break; |
| 278 | 212 | /* | ... | ... |