Migrating from Autodesk MapGuide 2007 to Autodesk MapGuide 2008
Applies to:
Autodesk MapGuide Enterprise 2007
Autodesk MapGuide Enterprise 2008
Autodesk MapGuide Studio 2007
Autodesk MapGuide Studio 2008
Issue:
You want to know how to migrate your Autodesk MapGuide 2007 installation to Autodesk MapGuide 2008.
Solution:
To migrate from Autodesk MapGuide 2007 to Autodesk MapGuide 2008, follow the steps outlined below. Before you start this process, make sure that you back up your data.
Repository
The Autodesk MapGuide 2007 Site and Library repositories are compatible with Autodesk MapGuide 2008. To use these repositories in MapGuide 2008, copy the Library and Site repositories from your 2007/Server/Repositories directory to the 2008/Server/Repositories directory.
Application Folders
The directory layout in MapGuide 2008 is similar to that of 2007. Relative references to the mapagent, mapviewernet, mapviewerjava, and mapviewerphp folders should be the same in 2008. Copy the 2007 application directory into the 2008/WebServerExtensions/www directory.
For .Net:
- Copy the 2008/WebServerExtensions/www/mapviewernet/bin directory and the Web.config file to your application directory.
- Create an application out of the virtual directory in IIS using the IIS management console.
- Make sure that the ASP .Net version for the application is 2.0.
For Java:
Add your application directory to the Apache conf (mapguide.conf/httpd.conf) file in the 2008/WebServerExtensions/apache2/conf directory.
URL and Port Number Changes
To reduce application conflicts between MapGuide 2007 and MapGuide 2008, the HTTP URLs have changed from /mapguide to /mapguide2008. Also, the Apache port number has changed from 8008 to 8700. You need to modify your code and WebLayouts to reflect the new URLs.
New Base Classes
MgLayer, MgMap and MgSelection now have the following superclasses: MgLayerBase, MgMapBase and MgSelectionBase. No new methods were added by this refactoring, but the methods are now distributed between the subclass and superclass. For .NET or Java applications, if the following APIs are used then casts will need to be done:
When Using
MgLayerCollection.GetItem(Int32 index)
MgLayerCollection.GetItem(CREFSTRING name)
MgReadOnlyLayerCollection.GetItem(Int32 index)
the returned object has type MgLayerBase. This object can always be safely cast to a MgLayer object.
For Example:
MgLayer myLayer = myCollection.GetItem(i);
For .NET, needs to be changed to:
MgLayer myLayer = myCollection.GetItem(i) as MgLayer;
For Java, needs to be changed to:
MgLayer myLayer = (MgLayer)myCollection.GetItem(i);
When Using
MgMapCollection.GetItem(Int32 index)
MgMapCollection.GetItem(CREFSTRING name)
the returned object has type MgMapBase. This object can always be safely cast to a MgMap object.
Note: When MgMapBase, MgLayerBase or MgSelectionBase is the parameter type, the respective objects of type MgMap, MgLayer and MgSelection can be used instead
back to top |