Working With Autodesk MapGuide

November 8, 2000
Share

Sharing is Caring

Overview

MapGuide Server Requirements
Windows NT 4.0 Server with SP 4, 5, or 6, or Windows 2000 Server
Web server: Netscape Enterprise Server 3.5 or later, or Microsoft IIS 4.0 or later
Pentium-based PC
128 MB of memory
22 MB of free disk space
VGA or better video display
Mouse
TCP/IP network protocol
IP address assigned to the server computer
Autodesk MapGuide is an "out of the box" solution for publishing maps over the Internet.You won't need to spend development time in Visual Basic or C to get your maps online.You'll be using a suite of software products that will allow you to visually create, publish, and display your maps online.

How MapGuide Works

There are three parts to MapGuide: the MapGuide Server, MapGuide Author, and MapGuide Viewer.MapGuide Author is used to develop maps, which then are published to a web server.Maps are published by copying the map file to the web server and either embedding the map in an html page or pointing users directly to the file.The maps are viewed and manipulated using the MapGuide Viewer plug-in.This plug-in is available as an ActiveX control, Netscape plug-in, and Java applet.MapGuide Server handles requests made by the web browser and returns the required data to the map.All three components of MapGuide work well together and create an excellent environment in which to conduct GIS work.

A Real Project

I wanted to use MapGuide in a real world project; we decided to use MapGuide to map our Events directory.After using other Internet map servers I was surprised at how easy it was to get my data on the map and displayed to the world.

Authoring Maps

MapGuide Author Requirements
Windows 98, NT 4.0, or 2000 Professional
Pentium-based PC
32 MB of memory
20 MB of free disk space
Super VGA or better video display
Mouse
MapGuide Author can combine spatial data like state boundaries, roads, and grids with resource data from a database; this resource data adds real power to the implementation.Dynamic data can be pulled from a database server like Microsoft SQL, Oracle, or MySQL.In fact any ODBC source can be used.This data can then be pulled into a layer and displayed over the top of your spatial data.

Editing the properties of a dynamic layer inside of MapGuide Author.Notice that the SQL WHERE clause can be defined here.
Click to enlarge

Pulling data from an ODBC source works great, but could be even more powerful.Let's say I want to display a map of sales for the year.If I wanted a layer to display only the sales in January and then a layer with combined sales for June and July I would have to either write a server side program to manipulate the data directly or make a layer and define a SQL string inside MapGuide Author for each query.I would like to see a method for passing an SQL string to the map from within an html file.Yes, I understand that this could be a

SIDEBAR
Using the MapGuide Viewer API
security issue; after all you don't want some devious user passing a "DELETE" query to your database server.So I would like to see the ability to pass part of the SQL string, like the WHERE clause.This would improve the power of the maps and make them more dynamic.

All the data you use in your maps is accessed from the MapGuide Server.You connect to the map server by hostname or IP address using TCP/IP.Therefore you can run the map server on the same machine you author maps on or the map server can be on the other side of the world.

With your data now available to many people you need some security features for protection.MapGuide comes through nicely with several methods for securing your data.The first is the ability for the system administrator to create users and groups on the server side.So anyone connecting to your map server using the Author program will need a valid user name and password to access data sources.Also on the server side is a menu for setting permissions on data.On the client side you get protection by password protected files.If someone saves your map file to their computer and opens it they will be prompted for a password.This prevents unauthorized use of or changes to your maps.

MapGuide Author is extremely easy to use, even for those with little or no GIS software experience.The manuals are thorough and easy to understand.When I had a problem or question I found the built in help to be very easy to understand and concise; in fact I didn't even have to consult the paper manuals for MapGuide Author.Autodesk is right on the money with an interface that is easy to understand and navigate.If you're coming from any other GIS software you'll feel right at home.

Viewing Maps

You've made a great map in the Author program, now how do you let everyone else enjoy it? Its as simple as copying the map file (MWF) over to your web server and pointing users to the URL.Pointing directly to the MWF file is the most direct way for users to view your map.All they need is the correct viewer for their browser.The viewer provides basic functionality such as zoom, pan, info, and search tools.

MapGuide Viewer.
Click to enlarge

The other method is to embed the map into an html file.This can be done using the <OBJECT> or <EMBED> tag.With the <OBJECT> tag you can have the ActiveX version of the viewer automatically installed onto Internet Explorer browsers.Here's some example code:

<OBJECT ID="Map1" WIDTH=392 HEIGHT=312
CLASSID="CLSID:62789780-B744-11D0-986B-00609731A21D"
codebase="http://www.server.com/
mgaxctrl.cab#Version=5,0,0,0">
<PARAM NAME="URL" VALUE="http://www.server.com/map1.mwf">
<PARAM NAME="LayersViewWidth" VALUE="75">
</OBJECT>
You'll see that I've defined a parameter that sets the width of the layer pane.There are about 20 other parameters that can be defined either as <PARAM> tags or in the URL query string.If I wanted to set it in the URL query string I would use this bit of HTML:
<EMBED SRC="http://http://www.server.com/
map1.mwf?LayerViewWidth=75" WIDTH=392 HEIGHT=312>
MapGuide Viewer is also available as a Netscape plug-in and Java Applet.I should also mention that Autodesk has an optional extension to the MapGuide Server called LiteView Extension.This is a Java servlet (runs on the server) that will return a raster image in PNG format.However, none of the regular functions from the plug-in versions such as zoom and pan are supported.I didn't get a chance to play with LiteView, but it does sound interesting for users who need to return only raster versions of their maps.

The Server Side

Behind the authoring and viewing of maps is the MapGuide Server.It handles requests from the Author and Viewer programs, determines which data to provide, and then returns the data to the clients.The data can come from several sources such as native MapGuide SDF files and a database server like Microsoft SQL.

The interface between the web server and MapGuide server is called a MapAgent.There are three different types of MapAgents; ISAPI, NSAPI, and CGI.ISAPI is the best choice if you're using Microsoft Internet Information Server (IIS).NSAPI is used for Netscape Enterprise Servers (now iPlanet).The CGI version works on most other web servers like Apache.Use the native API's if you can because they scale better.Upon installing the server you have the option of selecting which MapAgents you'd like to install.I'm running Microsoft IIS 4.0 so I went with ISAPI version.

After installing the MapAgent and MapGuide Server you'll have to do a little bit of setup to get the system ready for MapGuide Author users.You'll need to define

Click to enlarge
users/groups that will have access to the map server data sources.Then setup the data sources.To the left is a screen shot of the dialog box for selecting the data source type you'd like to add.

I was fairly disappointed with the sample data Autodesk provided.Luckily we have lots of data lying around here, but not in the native SDF format.Not to worry; MapGuide comes with a nifty data converter called SDF Loader.SDF Loader is a command-line utility that converts data from many different formats into the native SDF format.I set it to work on some ArcView SHP files and the results were impressive.The command-line utility is very fast and easy to use.Sure, it doesn't have all of the fancy drop down boxes and radio buttons of other GIS data converters, but this is not a weakness, it's a benefit.You see, with a command-line utility like SDF loader you can write scripts to automate the task of converting large amounts of data.This is very powerful.

Here I've used SDF Loader to find out the table structure of the DBF file.I was interested in finding which column contained the state name.You can see that it's Column 1.
Click to enlarge

SDF Loader in action.I'm converting an ArcView SHP file to the native SDF Format.I'm also defining which column I want to be the "NAME" or label column by using the /NAME: switch.
Click to enlarge

Conclusion

Where does MapGuide fit in relation to other Internet map servers and how does it compare? I found that Autodesk MapGuide has separated itself from other map server software by providing a product that works well within a workgroup or Intranet environment.MapGuide is not meant to be used in a consumer website where casual Internet users would find the nearest dealer.That's not what MapGuide is best at.Instead MapGuide provides an excellent platform for managing large amounts of data centrally and serving it to many users through a standard, easy to use GIS application.

Ask yourself these questions.Do you need a map server that is easy to setup, administer and get running out of the box? How about a map server that won't require hiring a group of programmers? Do you need something that even the most green GIS user can use, yet provides enough functionality for more advanced users? If this describes your task, you'll really like what Autodesk has done with MapGuide.

Relevant Links

MapGuide MapGuide In Use Web Servers Database Servers
Share

Sharing is Caring


Geospatial Newsletters

Keep up to date with the latest geospatial trends!

Sign up

Search DM

Get Directions Magazine delivered to you
Please enter a valid email address
Please let us know that you're not a robot by using reCAPTCHA.
Sorry, there was a problem submitting your sign up request. Please try again or email editors@directionsmag.com

Thank You! We'll email you to verify your address.

In order to complete the subscription process, simply check your inbox and click on the link in the email we have just sent you. If it is not there, please check your junk mail folder.

Thank you!

It looks like you're already subscribed.

If you still experience difficulties subscribing to our newsletters, please contact us at editors@directionsmag.com