Re[mapguide-users] dlining error

Marius_360 marius at openspatial.co.za
Fri Jul 18 08:41:58 EDT 2008


This is exactly how I had it from the beginning, but it gives me “Objects of
type 'OSGeo.MapGuide.MgService' do not have such a 
member” error



Carl Jokl wrote:
> 
> I will assume this must be JScript .Net because what you are doing could
> not work at all otherwise but I see the problem in the code:
> 
> var featureService = new MgFeatureService(); //You explicity create a new
> feature service. This is wrong
> //This method call retrieves the feature service from the site connection
> but you are not storing the //returned value
> siteConnection.CreateService(MgServiceType.FeatureService);
> //This will not work because you explicity created this feature service
> instead of getting it from the feature ///service
> featureService.CreateFeatureSource(resourceIdentifier, sdfParams) 
> 
> I am not completely familiar with JScript .Net but I would think that this
> should be
> 
> //Get the feature service from the site connection, don't create it
> explicity.
> var featureService =
> siteConnection.CreateService(MgServiceType.FeatureService);
> //Assuming you correctly created the resource identifier and the sdf
> params elsewhere this should work
> if (featureService) //Checking the returned feature service was not null
> just in case.
> {
>      featureService.CreateFeatureSource(resourceIdentifier, sdfParams);
> }
> 

-- 
View this message in context: http://www.nabble.com/Redlining-error-tp18524267p18528370.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list