[mapguide-users] MapGuide Markup app and MgDeleteFeatures

Warren Medernach wmedernach at rand.com
Mon Mar 30 10:26:00 EDT 2009


Thanks for the info Kenneth!


Warren

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Kenneth
Skovhede, GEOGRAF A/S
Sent: Sunday, March 29, 2009 7:06 AM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] MapGuide Markup app and MgDeleteFeatures

 

The "UpdateFeatures" call does not throw an exception:
http://trac.osgeo.org/mapguide/ticket/649

You have to parse the results to see what went wrong.



Regards, Kenneth Skovhede, GEOGRAF A/S



Warren Medernach skrev: 

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
Morsell
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.

www.SpatialGIS.com

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Warren
Medernach
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 =
(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

   

 

 


________________________________



 
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090330/c3d1efe2/attachment.html


More information about the mapguide-users mailing list