Pima County MapGuide MWF Wrapper - Linking to the Wrapper and your MapGuide Map Pima County Geographic Information Systems logo

Pima County GIS - Pima County MapGuide MWF Wrapper

Linking to the Wrapper and your MapGuide Map

To use the Wrapper on your web site, your web page links specify the mgmap.cfm file, passing the path to the MWF as a parameter and other optional parameters, such as a path to custom MapGuide API code. See Wrapper mgmap.cfm URL Parameters.

The Wrapper mgmap.cfm file passes all parameters to the map frame (mgmapframe.cfm) and from there to the map object or applet. The Wrapper accepts its own Wrapper parameters in addition to all MWF parameters defined by Autodesk, such as LAT, LON and WIDTH.

All paths values for path parameters (path, scriptpath, etc.) work just like paths in web page links. They may be relative to the Wrapper's installation directory, can start with / at the root of the site, or be a complete URL starting with the protocol and site name (http://gis.pima.gov/maps/...etc.).

Example of Basic Wrapper URL Parameters

Required path to Wrapper frameset.
Required path to an MWF file. Must be the first parameter.
Optional path to an include file that includes API code.
Optional. mgmaptitleframe may use this application name to customize the title.
Any and all optional parameters allowed by the MapGuide Viewer.

When adding parameters to the mgmap.cfm URL, note that there should only be one question mark in the URL, just before the path= parameter which must be the first parameter. Like all URLs, subsequent parameters should be delimited with ampersands. When copying parameters from another map URL, such as the URL generated by right-click Copy…, Copy as URL in MapGuide, it's easy to make the mistake of copying and using the question mark from that URL. A leading question mark on any added parameter string should be changed to an ampersand.

Sample links

  1. Bare MWF - Not recommended! That's why we have the Wrapper.


  2. The same map using the base Wrapper


    Or, using a relative path to dotmap65.mwf which is in our Wrapper installation directory:

  3. ...with our site's default API customization


    Both dotmap65.mwf and mgmapinitnullAPI.inc are in our Wrapper's installation directory and therefore don't need more explicit paths. Unlike our site, it's probably better practice to keep your MWF's and other files separate from your Wrapper installation directory.

  4. ...with standard MapGuide MWF parameters added


  5. Our site's Wrapper, title frame (saying "Pima County"), and default API customization with another site's MWF!


    This example shows a complete URL (http://www... etc) as the value for the path parameter. We show this to show what's possible, not to suggest or imply that you should actually do this with another site's map! This particular map MWF file shown is from the Maricopa County Parcel Maps and displays their Pinal County map, despite that fact that it's shown with Pima County's title frame and controls.

Back button Pima County MapGuide MWF Wrapper Main Page