[mapguide-users] MapGuide Markup app and MgDeleteFeatures

Warren Medernach wmedernach at rand.com
Fri Mar 27 12:30:28 EDT 2009


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 =
(MgFeatureService)app_Markup.site.CreateService(MgServiceType.FeatureSer
vice);

MgResourceIdentifier featureSourceId = new
MgResourceIdentifier(app_Markup.GetFullMarkupName());

 

MgFeatureCommandCollection commands = new MgFeatureCommandCollection();

MgDeleteFeatures deleteFeat = new MgDeleteFeatures("Markup", "ID=" +
ID);

commands.Add(deleteFeat);

 

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


More information about the mapguide-users mailing list