[mapguide-users] MapGuide Markup app and MgDeleteFeatures

Warren Medernach wmedernach at rand.com
Fri Mar 27 15:22:21 EDT 2009

Thanks Andy,


That's actually how I had it coded originally.  I then saw a sample from
AU I believe, that separated out the MgDeleteFeatures call, so I was
trying that...  Still no go, but now I see that it is happening
intermittently on the original app as well?

I have some digging to do.


Warren M


From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Andy
Sent: Friday, March 27, 2009 11:46 AM
To: 'MapGuide Users Mail List'
Subject: RE: [mapguide-users] MapGuide Markup app and MgDeleteFeatures


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=" +



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/d8e0b33f/attachment.html

More information about the mapguide-users mailing list