[mapguide-users] Adding a dynamic layer BEFORE displaying the map
yousuf.hassan at gmail.com
Tue Jan 15 13:15:04 EST 2008
Its just a copy of the parcelmarker.xml from the samples. It works otherwise
with tasks, but I couldn't seem to get it work before the map is loaded.
Jackie Ng wrote:
> 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
>> 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?
View this message in context: http://www.nabble.com/Adding-a-dynamic-layer-BEFORE-displaying-the-map-tp14780079s16610p14843786.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users