[mapguide-users] MapGuide Markup app and MgDeleteFeatures

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Sun Mar 29 09:05:35 EDT 2009


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.FeatureService);
>
> 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/20090329/34acc7f6/attachment.html


More information about the mapguide-users mailing list