Hi list, I am trying to use a WMC document generated by Ionic in Mapserver, but cannot get it to work (no layers in map object). The Ionic context validates in Oxygen.
First problem, Ionic does not use a XML header for the context, so Mapserver comes back with: PHP Warning: [MapServer Error]: msLoadMapContext(): Invalid XML file (/data/geoservices/apps/geoservices/htdocs/ionic.cml) in /data/geoservices/apps/geoservices/htdocs/wmc_ionic.php on line 5 So I added the XML header by hand. Then the following problem occurs: PHP Warning: [MapServer Error]: msLoadMapContext(): Unable to set units for projection '' Could it be that the Mapserver code assumes a 5 letter SRS EPSG code? If I use e.g. 28992 it runs fine. sprintf(pszProj, "init=epsg:%s", pszValue+5); I have seen a few other potential problems in the Mapserver code: 1) the parsing code for queryable etc. assumes to get a 0 or 1, whereas true or false are also valid values for xs:boolean 2) when outputting a WMC, Mapserver uses WMS for the value of the service attribute of Server, whereas the OGC example (on schemas.opengis.net) as well as Ionic use OGC:WMS <Server service="OGC:WMS" I have attached the context if somebody is interested to try this out. Best regards, Bart
<ViewContext xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/context http://schemas.opengis.net/context/1.0.0/context.xsd" xmlns="http://www.opengis.net/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="none" version="1.0.0"> <General> <Window width="600" height="300"></Window> <BoundingBox SRS="EPSG:4326" miny="28.200000000000017" maxy="58.80000000000001" maxx="41.39999999999999" minx="-19.799999999999994"></BoundingBox> <Title>World view</Title> <Abstract>Example Context</Abstract> </General> <LayerList> <Layer hidden="0" queryable="false"> <Server service="OGC:WMS" title="WORLD" version="1.1.1"> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://webservices.ionicsoft.com/worldData/map/WORLD" xlink:type="simple"></OnlineResource> </Server> <Name>WORLD</Name> <Title>WORLD</Title> <Abstract></Abstract> <StyleList> <Style current="1"> <Name>default</Name> <Title>default</Title> </Style> </StyleList> </Layer> </LayerList> </ViewContext>
