[mapguide-users] Question on MapStudio OS (for Kenneth)
Kenneth, GEOGRAF A/S
ks at geograf.dk
Fri Feb 15 08:23:51 EST 2008
The code for the MapGuideNativeAPI.dll is present in the sourcecode for
MapStudioOS (look in MapGuideAPI/NativeAPIWrapper).
This code is generated with the MapGuide Open Source SWiG build, but I
removed all .Net 2.0 stuff, and replaced it with .Net 1.1 counterparts.
Recently I have modified the generated code a bit, so that it will run
on both 1.2 MapGuide dll's and 2.0 dll's.
The MapGuideNativeAPI.dll is almost the same as the one distributed as
MapGuideDotNetApi.dll (with the diffs mentioned above).
If you wish to use some of the more "advanced" stuff, where you can
modify classes instead of Xml, you have to reference the MapGuideAPI.dll.
This DLL offers two connections to the MapGuide Server, namely
HttpServerConnection and LocalNativeConnection.
The first one is 100% managed and does not use/need the Binaries shipped
The second one uses the MapGuideNativeAPI.dll to access the MapGuide
binaries (dll files), and connects with those.
Both types of connection offers an identical set of methods to
read/write MapGuide data as classes, rather than Xml.
Unfortunately the Http interface does not support all the features of
the NativeAPI, so some features are only accessible
by calling that directly (missing methods are mainly related to FDO
You can mix and match as you like, I see no problems in using both API
models at the same time.
I have tested the code with both MGOS and MGE, I even have special code
to handle MGE 2007 runtime maps :).
FYI, the HttpServerConnection is more extensively tested than the
Regards, Kenneth, GEOGRAF A/S
Maksim Sestic skrev:
> Hi Kenneth,
> I'm working on a managed server component leaning on MapGuide Enterprise
> 2008. For my previous MG-related projects I've been using native
> MapGuideDotNetApi.dll wrapper to access server in first place. Since it's
> far from perfect (had to parse resource XML by hand, etc.) I decided to
> write the wrapper all over again, but then noticed that MapStudio OS already
> implements such functionality in more ".NET-oriented" :-) fashion.
> I'm planning to use it for resource access only, and have few questions
> about it... Firstly, I noticed that MapStudio OS references
> MapGuideNativeAPI.dll. Is this native MGOS .NET wrapper? I'm not sure, since
> it differs a bit when compared to Autodesk's MapGuideDotNetApi.dll (MGE 2008
> was built on MGOS 1.2.0). Where does MapGuideNativeAPI.dll come from? MGOS?
> Secondly, I'm still intending to use native MGE .NET wrapper library
> MapGuideDotNetApi.dll. Is it possible to mix the two, meaning - is it
> possible to reference both native MGE MapGuideDotNetApi.dll and your
> MapGuideAPI.dll for managed resource access? It would be great to lean
> overall MG access only on MapStudio OS' MapGuideNativeAPI.dll and
> MapGuideAPI.dll, but I have to be very cautious since Autodesk's MGE
> implementation may differ a bit and introduce possible compatibility issues.
> Maksim Sestic
More information about the mapguide-users