<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
There is a class map together with the documentation:<br>
<a class="moz-txt-link-freetext" href="http://mapguide.osgeo.org/2.0/documentation.html">http://mapguide.osgeo.org/2.0/documentation.html</a><br>
<br>
This can be found in the Web API documentation:<br>
<a class="moz-txt-link-freetext" href="http://mapguide.osgeo.org/files/mapguide/docs/webapi/index.htm">http://mapguide.osgeo.org/files/mapguide/docs/webapi/index.htm</a><br>
<br>
The specific class is here:<br>
<a class="moz-txt-link-freetext" href="http://mapguide.osgeo.org/files/mapguide/docs/webapi/d5/d10/class_mg_feature_service.htm">http://mapguide.osgeo.org/files/mapguide/docs/webapi/d5/d10/class_mg_feature_service.htm</a><br>
<br>
And the "CreateService" is here:<br>
<a class="moz-txt-link-freetext" href="http://mapguide.osgeo.org/files/mapguide/docs/webapi/df/d57/class_mg_site_connection.htm">http://mapguide.osgeo.org/files/mapguide/docs/webapi/df/d57/class_mg_site_connection.htm</a><br>
<br>
<br>
As for dll, that depends... the class you are seeing is in
MapGuideDotNetApi.dll, but it is actually a wrapper<br>
for the other dll files in that folder.<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Marius_360 skrev:
<blockquote cite="mid:18528953.post@talk.nabble.com" type="cite">
<pre wrap="">Where does the OSGeo.MapGuide.MgService come from, in other words, in which
dll in the bin folder?
Kenneth Skovhede, GEOGRAF A/S wrote:
</pre>
<blockquote type="cite">
<pre wrap="">So you are using JScript .Net?
In that case you might have to typecast it:
var featureService =
(MgFeatureService)siteConnection.CreateService(MgServiceType.FeatureService);
Not completely familiar with JScript.Net, but the error seems to
indicate that the object (featureService) is of type MgService.
MgService is a base class, and also the signature return type for
CreateService.
The actual type of the object returned is MgFeatureService.
Regards, Kenneth Skovhede, GEOGRAF A/S
Marius_360 skrev:
</pre>
<blockquote type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">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);
}
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>