[mapguide-users] Bypassing initial view at startup - and adding a layer

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Thu Sep 4 09:20:31 EDT 2008


The FeatureSource looks ok.

You need to look at how it is all built up:

1 x WebLayout -> 1 x MapDefintion -> 1+ x LayerDefinition -> 
FeatureSource (one pr. layer)

So, your LayerDefinition references the FeatureSource, which is allright.
The MapDefinition references the maps, but does not replicate the 
content of the LayerDefinition.

To look at the Xml, I reccomend that you try out Maestro:
http://trac.osgeo.org/mapguide/wiki/maestro

Within Maestro, you can click the "Edit Xml" button, and see how a 
working MapDefinition looks.

Regards, Kenneth Skovhede, GEOGRAF A/S



gingerbbm skrev:
> Kenneth, thankyou for your continued help (and patience)!
>
> The key point I was missing is:
>
> Kenneth Skovhede, GEOGRAF A/S wrote:
>   
>> 2. Insert the polygon layer into the Xml
>>
>>     
>
> I guess I can do a GetResourceContent() on my polygon layer and insert its
> XML into my Map Definition XML. But the polygon layer's XML references a
> feature source defined as:
>
> <FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd" version="1.0.0">
> <Provider>OSGeo.SDF</Provider>
>   <Parameter>
>     <Name>File</Name>
>      <Value>%MG_DATA_FILE_PATH%RedlineLayer.sdf</Value>
>      </Parameter>
>   <Parameter>
>     <Name>ReadOnly</Name>
>     <Value>FALSE</Value>
>   </Parameter>
> </FeatureSource>
>
> 1. Does this look right?
> 2. Do I need to insert this XML anywhere?
>
> Thanks
> Stuart
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20080904/445c338f/attachment.html


More information about the mapguide-users mailing list