Pål ,
I use a simple XML-File with CGI-Variables ([myvar]) like this:
<?xml version="1.0" encoding="UTF-8"?>
<sg:FeatureInfoResponse>
<sg:Schutzgebiet>
<sg:Schutzgebietsart>Naturschutzgebiet</sg:Schutzgebietsart>
<sg:Gebietsname>[name]</sg:Gebietsname>
<sg:Gebietsnummer>[objnr]</sg:Gebietsnummer>
<sg:Rechtsgrundlage>http://www.naturschutz.rlp.de/dokumente/rvo/[objnr].htm</sg:Rechtsgrundlage>
<sg:Schutzzone>[schutzzone]</sg:Schutzzone>
<sg:Erfassungsgrundlage>[erfassungsgrundlage]</sg:Erfassungsgrundlage>
<sg:Info_Kontakt>http://www.naturschutz.rlp.de/Impressum.natur?ActiveID=1234</sg:Info_Kontakt>
</sg:Schutzgebiet>
</sg:FeatureInfoResponse>
If there is a request for xml I tell my script to set the response-header
is XML:
...
$buffer = ms_iogetstdoutbufferstring();
header('Content-type: text/xml');
echo $buffer;
...
Greetings Sven
----- Original Message -----
From: "paalkr" <[email protected]>
To: <[email protected]>
Sent: Tuesday, May 05, 2009 11:01 PM
Subject: Re: [mapserver-users] GetFeatureInfo in XML
Hi!
This is something that I'm interested in as well, could I please ask you to
share your featureinfo_nsg.xml? I would like to have a look at it to get
some hints on how to set up a XML template.
BTW: I think you can expose a new InfoFormat by setting the
wms_feature_info_mime_type keyword in the web metadata section of your
mapfile.
Regards,
Pål Kristensen
Sven Schroeter wrote:
Hi all,
I am currently experimenting with Web Map Services and a custom PHP
wrapper.
In this script for a GetFeatureInfo-Request with
info_format=application/vnd.ogc.wms_xml or info_format=text/xml a XML
document is generated.
This works well, a XML-template is set in the mapfile dynamically:
...
if($k == 'info_format' & ($v == 'application/vnd.ogc.wms_xml' || $v ==
'text/xml')){
$layer = $oMap->getLayerByName($layername);
$layer->set("template", "template/featureinfo_nsg.xml");
...
}
...
Two questions:
1. Is it possible to get a featureInfo-Request in xml native by mapserver
(no gml)
2. How can I tell mapserver to enhance the list of capabilities to xml? At
this time there comes only
...
<GetFeatureInfo>
<Format>text/plain</Format>
<Format>text/html</Format>
<Format>application/vnd.ogc.gml</Format>
<DCPType>
...
Thanks
Sven
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-----
Regards,
Pål Kristensen
--
View this message in context:
http://n2.nabble.com/GetFeatureInfo-in-XML-tp2787413p2806255.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users