[mapguide-users] MapGuide Markup app and MgDeleteFeatures

Andy Morsell amorsell at spatialgis.com
Fri Mar 27 13:46:04 EDT 2009

Try this:
MgFeatureCommandCollection commands = new MgFeatureCommandCollection();
 commands.Add(new MgDeleteFeatures("Markup", "ID = " + ID));
featureService.UpdateFeatures(featureSourceId, commands, false);
Andy Morsell, P.E.
Spatial Integrators, Inc.
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Warren
Sent: Friday, March 27, 2009 9:30 AM
To: MapGuide Users Mail List
Subject: [mapguide-users] MapGuide Markup app and MgDeleteFeatures
Hello all,
I am trying to port some of the GT Markup app to code-behind aspx classes.
When I do this, the Delete Markup Feature functionality is not functioning
from code behind?  
The only changes I made to the code that was working in the original markup
app are:
I'm calling a function to retrieve the markup name (GetFullMarkupName) and
I'm passing in the ID I'm trying to delete.
MgFeatureService featureService =
MgResourceIdentifier featureSourceId = new
MgFeatureCommandCollection commands = new MgFeatureCommandCollection();
MgDeleteFeatures deleteFeat = new MgDeleteFeatures("Markup", "ID=" + ID);
featureService.UpdateFeatures(featureSourceId, commands, false);
Through debugging I have verified that the featureSourceId is pointing to
the correct FeatureSource, the ID is getting passed through and the
DeleteFeatures statement is correct, but when it calls UpdateFeatures, it
spins away for a while, and eventually ends without deleting the feature,
and doesn't throw an error?  Would there be anything in the logs I could
look for?
Fyi, when I run the original markup app side-by-side, the features are
deleted with no problems.
Thanks for any suggestions.
Warren M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090327/386c0f29/attachment.html

More information about the mapguide-users mailing list