[mapguide-internals] Intergrating DWF Viewer of MapGuide Enterprise 2009 into Windows Forms

Carl Jokl carl.jokl at keynetix.com
Thu Aug 28 04:27:58 EDT 2008


I have a task in migration of a Windows Forms based Application which embeds
the DWF Viewer of MapGuide 6. The Migration is basically just to swap out
the MapGuide 6 DWF Viewer ActiveX Control and instead replace it with the
MapGuide Enterprise 2009 DWF Viewer ActiveX control. I am having some
difficulty in this due to working slightly blind on this without complete
documentation on how to do something like this. I am using the
EMapViewer.dll library and examining the classes within it but am not
certain that this is the correct library or whether this library has other
dependencies (though that I may be able to check with a dependency walker
utility). I manage to create an instance of the CEmapViewerClass which I am
guessing is what should be instantiated. I need to point this to a map
though and tried using the NavigateTo method to supply the URL to be used.
This action threw a COM Exception which I think may be due to no map being
loaded (though this is what I am trying to do anyway). I am able to see some
of the internal state of the viewer as I have turned on native debugging. 

Item 1 which I need to get working is getting the Map Viewer to load a map
at a given URL. 

My second problem is that as this application is Windows Forms based (ableit
written in C# .Net) I need to be able to cast the ActiveX control to be some
kind of component which can be added to a form as well as do things like set
the position and size and docking etc. 

Item 2 be able to use DWF ActiveX control as Windows Forms Component.

I could be going about this whole process wrongly but I am somewhat working
blind at the moment without guidence. I have a document about the DWF Viewer
API which shows me the methods available and events and some coverage of
what the classes are. The guide I have is not detailed enough to cover items
1 and 2 which I am trying to figure out. I am aware that the DWF Viewer has
wider scope usage than MapGuide alone and can be intergrated in many types
of applications. I have looked a bit on Autodesks site for documentation.
There is some but it can be patchy. For example when I try and download code
examples some deny access another one was a zip download file 0 bytes in
size. I would appreciate any help anyone may be able to provide.
-- 
View this message in context: http://www.nabble.com/Intergrating-DWF-Viewer-of-MapGuide-Enterprise-2009-into-Windows-Forms-tp19196339p19196339.html
Sent from the MapGuide Internals mailing list archive at Nabble.com.



More information about the mapguide-internals mailing list