[fusion-users] Maptips on Mapserver

Jason Birch Jason.Birch at nanaimo.ca
Sat Aug 30 20:07:47 EDT 2008


Hi Marc,
 
The MapGuide QueryMapFeatures call returns a FeatureInformation XML doc.
Here's an example:

<?xml version="1.0" encoding="UTF-8"?>
<FeatureInformation>
 <FeatureSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="FeatureSet-1.0.0.xsd"> <Layer
id="dabba2fe-ffff-ffff-8000-005056b512c0"> <Class id="Default:Parks">
<ID>YAEAAA==</ID> </Class> </Layer></FeatureSet>
 <Tooltip>Goldfinch Park</Tooltip>
 <Hyperlink />
 <Property name="parkName" value="Goldfinch Park" />
 <Property name="parkAddress" value="" />
</FeatureInformation>

Which then gets passed through XML2JSON to give this:

{"FeatureInformation":{"FeatureSet":[{"@noNamespaceSchemaLocation":["Fea
tureSet-1.0.0.xsd"],"Layer":[{"@id":["dabba2fe-ffff-ffff-8000-005056b512
c0"],"Class":[{"@id":["Default:Parks"],"ID":["YAEAAA=="]}]}]}],"Tooltip"
:["Goldfinch
Park"],"Property":[{"@name":["parkName"],"@value":["Goldfinch
Park"]},{"@name":["parkAddress"],"@value":[""]}]}};

I can't find a schema for FeatureInformation, but the schema for one of
its components (FeatureSet) can be found here:
 
http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Common/Schema

There's all kinds of complexity around the feature ID encoding, but I
don't think that's important for a MapServer implementation.

Jason 

________________________________

From: Marc Pfister
Subject: RE: [fusion-users] Maptips on Mapserver

I have bodged maptips to work with Mapserver and have the code kicking
back the string I want to display in the tooltip. However, the code
seems like it expects some XML generated by MapGuide. Can someone who
runs MapGuide post an example of the XML so I can reproduce it and pass
it on to the _display function and keep it all happy?


More information about the fusion-users mailing list