Pima County GIS - Pima County MapGuide MWF Wrapper
Benefits and Features
Using the Wrapper accomplishes a number of beneficial things:
The Wrapper makes it easy to support multiple MapGuide maps with the same code.
- Detection and prompting for installation or update of the MapGuide Viewer as needed by the user.
Tells the user in advance if an upgrade is recommended or needed and guides the user's Viewer installation or upgrade.
Upgrades are not forced on the user and the user can defer a recommended upgrade.
(The user may not have the time or the required administrator rights.)
- Supports all versions of the MapGuide Viewer: ActiveX control, plugin and Java Viewer
on all platforms supported by Autodesk including the Java Viewer
for Mac and UNIX users.
Uses the Java Viewer as best it can to show a map on other, not-supported platforms.
Ease of adding application-specific API function.
API customization can added with one or two small files where all code is specific to the customization.
The Wrapper's API approach makes it near trivial to add API code to existing maps without
having to copy or re-write all the supporting page code.
You just write the API portion and nothing else.
The Wrapper has URL parameters that allow you to point to API code to be included.
- Reduced code for each map application as common code is shared.
New maps can be implemented with nothing more than a new MWF.
- Ability to use common custom API functions on all maps.
For instance, we add map drawing tools, legend width adjustment, and print page setup default changes
to all our maps as easily as adding those functions to one map.
(These custom API functions are not part of the Wrapper.)
- The map fills browser windows of all sizes with no white space around the map, even with the Java Viewer.
- Because the MWF is encapsulated by the Wrapper, there are no site links directly to MWFs.
This allows for adding function and communicating with users when things change (such as the moving the MWF location).
- Common, centralized maintenance. Wrapper and shared API code improvements and fixes apply to all maps.
Without some kind of wrapper or web page encapsulating page your MWF files there are immediate and future problems:
- Users get no guidance installing or upgrading the MapGuide Viewer.
There is no way to auto-install the ActiveX control with Internet Explorer.
- There is no way to use the MapGuide Viewer API.
- If you should move or rename the MWF,
your users are simply in the dark and there is no way you can say anything to them in code.
- If you save your MWF with a newer version of MapGuide Author,
the map simply breaks with no explanation for the users
(except maybe something saying the map was saved with a newer version of MapGuide than their Viewer.)
Making your own simple web page for your MWF isn't too hard to do, but it forces new versions on users.
The Wrapper solution is much more user friendly.
The user never gets surprised with a forced Viewer installation and
it explains and warns users about upgrades and installation.
The Wrapper supports the Internet Explorer ActiveX Control, Netscape 4.x plugin,
and the Java Edition of the MapGuide Viewer on any platform supported by Autodesk.
These days many ask What about Firefox and other new browsers?
The MapGuide MWF Wrapper is fully Java Viewer compatible,
but Viewer version checking and installation support is not implemented for the Java Edition Viewer.
Read more about Java Viewer Support in the Wrapper.
The Wrapper was developed with the assumption that if the user has Internet Explorer or Netscape, they are at least version 4.
In other words, older versions like IE 2.0 and 3.0, and Netscape 2.0 and 3.0 are not supported by the Wrapper.
Also, only MapGuide MWF's version 5.0 and later are supported.
This isn't to say it won't work with these older versions, but rather it hasn't been
tested and is likely to fail.
For our purposes, the world begins with version 4 browsers and MapGuide version 5.
Read more about our experience using the Wrapper here at Pima County.
Pima County MapGuide MWF Wrapper Main Page