[mapguide-users] Adding a dynamic layer BEFORE displaying the map

Jackie Ng jackie.ng at aecsystems.com.au
Mon Jan 14 16:56:58 EST 2008

What does the feature source xml look like? It seems that feature source xml
is an invalid document.

- Jackie

uXuf wrote:
> Hi all,
> I am trying to add a dynamic layer to a map but before loading the map in
> the map frame. It is supposed to work on some query string parameters and
> should add a dynamic layer based on that information. I can add the Map to
> the session. I want to query the map from the Session Repository and work
> on a copy, however I keep getting the
> Session:xxxx//PointPlotter.FeatureSource Exception occurred in method
> MgResourceDefinitionManager.GetDocument at line 476 in file
> c:\build_bond_area\mapguide_open_source_v1.2\build_18.1\mgdev\server\src\services\resource\ResourceDefinitionManager.cpp 
> error.
> Here is how I constructed the logic:
> 1- Make a new MgSite object
> 2- Use MgSite->Open with a new MgUserInformation object
> 3- store the session ID in a variable
> 4- Check GET parameters
> 5- if records exists depending on the GET parameters, make a new
> MgSiteConnection object
> 6- Open this MgSiteConnection object with the session ID
> 7- Create a ResourceService by using MgSiteConnection->CreateService
> 8- Open the map by using $map->Open($resourceService, 'MapName') (EDIT: I
> used the $map->Create() function)
> 9- Verify and add layers (building upon the Sheboygan Find Parcel example
> from MG 1.1 samples)
> Do I need to explicity add a feature source to the session repository? But
> I think that's what exactly the CreatePointPlotterFeatureSource function
> does from the findparcelsfunctions.php does in the samples.
> And this error occurs when I call the CreatePointPlotterFeatureSource
> function. When I add a new FeatureSource in the form of
> MgResourceIdentifier it works fine (i.e. no errors generated), but on the
> first call to the above-mentioned function it crashes. Apparently it
> doesn't execute even the first line which I changed into an "echo" for
> debugging purposes.
> Anybody got any tips?
> Regards,
> uXuf

View this message in context: http://www.nabble.com/Adding-a-dynamic-layer-BEFORE-displaying-the-map-tp14780079s16610p14815881.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

More information about the mapguide-users mailing list