0% found this document useful (0 votes)
87 views

Gettingstarted Guide

Uploaded by

girish_pathak123
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views

Gettingstarted Guide

Uploaded by

girish_pathak123
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 102

Autodesk MapGuide® Enterprise 2008

Getting Started

27601-050000-5000A July 2007


Copyright© 2008 Autodesk, Inc.
All Rights Reserved
This publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose.
AUTODESK, INC., MAKES NO WARRANTY, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE REGARDING THESE MATERIALS, AND MAKES SUCH
MATERIALS AVAILABLE SOLELY ON AN "AS-IS" BASIS.
IN NO EVENT SHALL AUTODESK, INC., BE LIABLE TO ANYONE FOR SPECIAL, COLLATERAL, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES IN CONNECTION WITH OR ARISING OUT OF PURCHASE OR USE OF THESE MATERIALS. THE SOLE AND EXCLUSIVE
LIABILITY TO AUTODESK, INC., REGARDLESS OF THE FORM OF ACTION, SHALL NOT EXCEED THE PURCHASE PRICE OF THE
MATERIALS DESCRIBED HEREIN.
Autodesk, Inc., reserves the right to revise and improve its products as it sees fit. This publication describes the state of the product at the time
of publication, and may not reflect the product at all times in the future.

Autodesk Trademarks
The following are registered trademarks of Autodesk, Inc., in the USA and other countries: 3D Studio, 3D Studio MAX, 3D Studio VIZ, 3ds Max,
ActiveShapes, Actrix, ADI, AEC-X, ATC, AUGI, AutoCAD, AutoCAD LT, Autodesk, Autodesk Envision, Autodesk Inventor, Autodesk Map, Autodesk
MapGuide, Autodesk Streamline, Autodesk WalkThrough, Autodesk World, AutoLISP, AutoSketch, Backdraft, Biped, Bringing information down
to earth, Buzzsaw, CAD Overlay, Character Studio, Cinepak, Cinepak (logo), Civil 3D, Cleaner, Codec Central, Combustion, Design Your World,
Design Your World (logo), EditDV, Education by Design, Gmax, Heidi, HOOPS, Hyperwire, i-drop, IntroDV, Lustre, Mechanical Desktop,
ObjectARX, Physique, Powered with Autodesk Technology (logo), ProjectPoint, RadioRay, Reactor, Revit, VISION*, Visual, Visual Construction,
Visual Drainage, Visual Hydro, Visual Landscape, Visual Roads, Visual Survey, Visual Toolbox, Visual Tugboat, Visual LISP, Volo, WHIP!, and WHIP!
(logo).
The following are trademarks of Autodesk, Inc., in the USA and other countries: AutoCAD Learning Assistance, AutoCAD Simulator, AutoCAD
SQL Extension, AutoCAD SQL Interface, AutoSnap, AutoTrack, Built with ObjectARX (logo), Burn, Buzzsaw.com, CAiCE, Cinestream, Cleaner
Central, ClearScale, Colour Warper, Content Explorer, Dancing Baby (image), DesignCenter, Design Doctor, Designer's Toolkit, DesignKids,
DesignProf, DesignServer, Design Web Format, DWF, DWFit, DWG Linking, DXF, Extending the Design Team, GDX Driver, Gmax (logo), Gmax
ready (logo), Heads-up Design, Incinerator, jobnet, ObjectDBX, Plasma, PolarSnap, Productstream, Real-time Roto, Render Queue, Topobase,
Toxik, Visual Bridge, and Visual Syllabus.

Autodesk Canada Co. Trademarks


The following are registered trademarks of Autodesk Canada Co. in the USA and/or Canada and other countries: Discreet, Fire, Flame, Flint,
Flint RT, Frost, Glass, Inferno, MountStone, Riot, River, Smoke, Sparks, Stone, Stream, Vapour, Wire.
The following are trademarks of Autodesk Canada Co., in the USA, Canada, and/or other countries: Backburner, Multi-Master Editing.

Third Party Trademarks


All other brand names, product names or trademarks belong to their respective holders.

Third Party Software Program Credits


ACIS Copyright© 1989-2001 Spatial Corp. Portions Copyright© 2002 Autodesk, Inc.
Copyright© 1997 Microsoft Corporation. All rights reserved.
Flash ® is a registered trademark of Macromedia, Inc. in the United States and/or other countries.
International CorrectSpell™ Spelling Correction System© 1995 by Lernout & Hauspie Speech Products, N.V. All rights reserved.
InstallShield™ 11. Copyright© 1997 InstallShield Software Corporation. All rights reserved.
PANTONE® Colors displayed in the software application or in the user documentation may not match PANTONE-identified standards. Consult
current PANTONE Color Publications for accurate color.
PANTONE® and other Pantone, Inc. trademarks are the property of Pantone, Inc.© Pantone, Inc., 2002
Pantone, Inc. is the copyright owner of color data and/or software which are licensed to Autodesk, Inc., to distribute for use only in combination
with certain Autodesk software products. PANTONE Color Data and/or Software shall not be copied onto another disk or into memory unless
as part of the execution of this Autodesk software product.
Portions Copyright© 1991-1996 Arthur D. Applegate. All rights reserved.
Portions of this software are based on the work of the Independent JPEG Group.
RAL DESIGN© RAL, Sankt Augustin, 2002
RAL CLASSIC© RAL, Sankt Augustin, 2002
Representation of the RAL Colors is done with the approval of RAL Deutsches Institut für Gütesicherung und Kennzeichnung e.V. (RAL German
Institute for Quality Assurance and Certification, re. Assoc.), D-53757 Sankt Augustin.
AutoCAD 2007 is produced under a license of data derived from DIC Color Guide® from Dainippon Ink and Chemicals, Inc. Copyright ©
Dainippon Ink and Chemicals, Inc. All rights reserved. DIC Color Guide computer color simulations used in this product may not exactly match
DIC Color Guide, DIC color Guide Part 2 identified solid color standards. Use current DIC Color Guide Manuals for exact color reference. DIC
and DIC Color Guide are registered trademarks of Dainippon Ink and Chemicals, Inc.
Typefaces from the Bitstream® typeface library copyright 1992.
Typefaces from Payne Loving Trust© 1996. All rights reserved.
AnswerWorks 4.0 ©; 1997-2003 WexTech Systems, Inc. Portions of this software © Vantage-Knexys. All rights reserved.
The Director General of the Geographic Survey Institute has issued the approval for the coordinates exchange numbered TKY2JGD for Japan
Geodetic Datum 2000, also known as technical information No H1-N0.2 of the Geographic Survey Institute, to be installed and used within
this software product (Approval No.: 646 issued by GSI, April 8, 2002).
Portions of this computer program are copyright © 1995-1999 LizardTech, Inc. All rights reserved. MrSID is protected by U.S. Patent No.
5,710,835. Foreign Patents Pending.
Portions of this computer program are Copyright ©; 2000 Earth Resource Mapping, Inc.
OSTN97 © Crown Copyright 1997. All rights reserved.
OSTN02 © Crown copyright 2002. All rights reserved.
OSGM02 © Crown copyright 2002, © Ordnance Survey Ireland, 2002.
FME Objects Engine © 2004 SAFE Software. All rights reserved.

GOVERNMENT USE
Use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in FAR 12.212 (Commercial Computer
Software-Restricted Rights) and DFAR 227.7202 (Rights in Technical Data and Computer Software), as applicable.
Published By: Autodesk, Inc.
111 McInnis Parkway
San Rafael, CA 94903, USA
1 2 3 4 5 6 7 8 9 10
Contents

Chapter 1 Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
PDF Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
The Development Process . . . . . . . . . . . . . . . . . . . . . . . . . 4
Sites and Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Component Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Autodesk MapGuide Studio . . . . . . . . . . . . . . . . . . . . . . . . 12
MapGuide Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
MapGuide Web Extensions . . . . . . . . . . . . . . . . . . . . . . . . 16
MapGuide Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Load and Configure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Feature Sources and Drawing Sources . . . . . . . . . . . . . . . . . . . 22
Load Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Resource Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Feature Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Learning MapGuide . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Chapter 2 Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Chapter 3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
About the Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Create a Folder Structure . . . . . . . . . . . . . . . . . . . . . . . . . 42
Load Shapefiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

v
Load SDF Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Load Geometry from a DWG File . . . . . . . . . . . . . . . . . . . . . 48
Load Styled Data from a DWG File . . . . . . . . . . . . . . . . . . . . 50
Load Raster Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Connect to an Access Database . . . . . . . . . . . . . . . . . . . . . . 54
Set the Style for a Polygon Layer . . . . . . . . . . . . . . . . . . . . . 56
Make Composite Lines . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Define Scale Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Create a New Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Add Layers to a Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Create a New Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Theme from a Database Table . . . . . . . . . . . . . . . . . . . . . . . 68
Organize the Layers in a Map . . . . . . . . . . . . . . . . . . . . . . . 70
Edit Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Create a Symbol Library . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Use Symbols for Points . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Generate Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Add Tooltips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Set Up the Map Legend . . . . . . . . . . . . . . . . . . . . . . . . . . 82
View the Map in a Web Browser . . . . . . . . . . . . . . . . . . . . . 84

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

vi | Contents
Fundamentals
1
MapGuide is a software platform for distributing spatial data In this chapter
over the Internet or on an intranet. There are two versions of ■ PDF Tips
■ The Development Process
MapGuide: MapGuide Open Source, and Autodesk MapGuide
■ Sites and Servers
Enterprise. The concepts in this first chapter of the Getting
■ Installation
Started Guide will help you understand and use either version. ■ Component Overview
■ Autodesk MapGuide Studio
The second chapter summarizes the development process in
■ MapGuide Server
the form of a flow diagram. The final chapter provides ■ MapGuide Web Extensions
examples of authoring tasks, which will give you some initial ■ MapGuide Viewer
■ Load and Configure
hands-on experience, using the sample data included on the
■ Feature Sources and
Autodesk MapGuide Enterprise product CD. Drawing Sources
■ Load Procedures
■ Resource Repository
■ Feature Joins
■ Learning MapGuide

1
2 | Chapter 1 Fundamentals
PDF Tips
NOTE This book is in PDF format, which is optimized for viewing on a
high-resolution monitor (preferably set to 1280x1024), and for printing. To read
this guide online, follow these suggestions for the best viewing experience:

■ Close the bookmarks tab (you can easily open it when you need it).

■ Click the Fit Page icon (this gives you two full pages on most monitors).

■ Use the Dynamic Zoom tool to adjust the view so that you can see as much
of the double-page spread as possible without straining your eyes to read
the text.

■ Use the Hand tool to move the page left and right.

■ Use the Page Up and Page Down keys to go forward and back.

Hand tool
Dynamic Zoom tool
Fit Page icon

Bookmarks tab

PDF Tips | 3
The Development Process
The diagram on the facing page shows the process of developing a Web-based
application using MapGuide. In the diagram, the rectangles represent tasks,
the oval shapes represent entities that are created by the tasks or used by them,
and the arrows indicate the flow of data. You can break down the development
process into five phases (you may also have a Planning and Preparation phase,
not included in this diagram):

On facing page Detailed steps

Load file-based data, configure connections to external databases,


1 and extend feature data by joining one feature source to another.

Build layers that reference, theme, and style the data.


2

Create maps by combining layers.


3

Place the map on the Internet or intranet using layouts for generating
4 web pages and for plotting.

Develop the web application, using the MapGuide APIs to add func-
5 tionality.

Test the web application.


6

See also Chapter 2, “Flow Diagram” for a more detailed diagram of these
phases.

4 | Chapter 1 Fundamentals
Database Data files

Configure Load Load


procedures
1
Feature and drawing data

Extend

2
Tasks
Build layers

Resources managed
by the site server
3
Make map
Application elements
(PHP/ASP/JSP) and
HTML

Maps, layers, styles, symbols


5
Develop

4
Place on internet

Web application

6 Web and print layouts

Test

Overview of the development process

The Development Process | 5


Sites and Servers
The collection of servers that process requests in MapGuide is called a site.
You can divide the processing load between two or more servers within the
site. Each site shares a single resource repository among its servers. The resource
repository stores the resources that map authors use to create maps, for example,
pre-defined layers for features such as roads or land parcels.
In the diagram on the facing page, the site contains two servers, one of which
is designated as the site server. The site server contains the resource repository.
It also connects to any database server or servers.
MapGuide Server provides seven services: Site, Resource, Drawing, Feature,
Mapping, Rendering, and Tile. If you are using a single server, that server
performs all of these services. In any case, the site server always runs the first
two services, because they handle data access and manage the resources for
the site. However, if you have two or more servers, you can split off the other
services and allocate them to another server or servers. For example, the
Mapping and Rendering services are the most processor-intensive operations
and can benefit from having a dedicated server to handle them.

■ The Mapping service creates the view of a map in response to requests


from the clients.

■ The Rendering service creates the final map image for the AJAX viewer
from input provided by the Mapping service.

6 | Chapter 1 Fundamentals
Web server

Site

Server Site server Database server

A typical site with two servers

Sites and Servers | 7


Installation
MapGuide consists of four separate components, which should be installed
in the following order:

■ MapGuide Server

■ MapGuide Web Extensions (for application development)

■ Autodesk MapGuide Studio (for map authoring)

■ MapGuide Viewer

You can access detailed information about hardware and software requirements
for installation from the Installation HTML page of the CD browser that
appears when you insert the Autodesk MapGuide Enterprise product CD. Here
is a short summary:

■ MapGuide Server and MapGuide Web Extensions run on both Linux and
Windows.

■ MapGuide Web Extensions run on IIS and Apache (Windows) and Apache
(Windows and Linux).

■ Autodesk MapGuide Studio runs on Windows. A preview version is provided


for use with MapGuide Open Source. The full version is part of Autodesk
MapGuide Enterprise.

■ The MapGuide Viewers work with Microsoft Internet Explorer and Firefox
browsers.

■ The MapGuide Web Extensions support application development in PHP,


ASP, and JSP.

The diagram on the facing page shows where to install the different
components of the software.

8 | Chapter 1 Fundamentals
Download
AJAX Viewer

Download
Autodesk DWF Vewer Install Studio

Install Web Extensions

Install Server Install Server Database server

Typical site showing where to install the MapGuide components

Installation | 9
Component Overview
The diagram on the facing page provides a high-level overview of how the
four components work together after installation. Each component is described
in more detail in the next four topics of this chapter.
Autodesk MapGuide Studio and the MapGuide Viewer are client applications
of MapGuide Server. Requests coming from these clients, and from the other
client applications that you develop using the API, go to the Web Extensions
by means of HTTP protocol. The WebAgent component of the Web Extensions
processes the requests and forwards them on to MapGuide Server. When you
start Autodesk MapGuide Studio, you enter the name or the IP address of the
web server that is hosting the Web Extensions. For example,
http://144.111.19.94/mapguide2008
When it receives a request, MapGuide Server accesses the resources stored in
the resource repository, builds and renders the map in DWF format or as a
static image for the AJAX viewer, and returns it to the Web Extensions, which
in turn send it back to the client.
Autodesk MapGuide Studio has the MapGuide Viewer built into it. The Viewer
displays the rendered data onscreen and manages the layers and other
properties of the data returned from the server.

10 | Chapter 1 Fundamentals
Viewer
Viewer

Viewers Studio

Requests from Web Extensions to Server


Client requests to Web Extensions
WebAgent

Web Extensions

Services to build
and render map

Site server Server Database server

The four components of MapGuide

Component Overview | 11
Autodesk MapGuide Studio
Autodesk MapGuide Studio is an authoring environment that handles all
aspects of collecting and preparing geospatial data for distribution on the
Internet (except custom coding). When you use Autodesk MapGuide Studio,
you will generally follow these steps:

1 Create resources from your source data, either by loading file-based data
or by connecting directly to external databases.

2 Build styled and themed layers from the resources.

3 Compile the layers into a map.

4 Embed the map in a web page using a web layout.

After you have a web layout, you can customize the appearance and functions
of the web application by adding your own programming code. The final step
is to publish the completed web application to the Internet or intranet for
viewing and interaction.
The Autodesk MapGuide Studio interface is divided into three parts:

■ The Site Explorer

■ The MapGuide Viewer

■ The Editor

When you open Autodesk MapGuide Studio and connect to your site server
(via the WebAgent), the Site Explorer shows you the resources stored in the
resource repository, as shown in the upper image on the facing page.
Double-clicking any resource in the Site Explorer opens the appropriate editor
for that resource. If the resource is a layer or a map, the Viewer also opens and
displays a preview of the data.

12 | Chapter 1 Fundamentals
Site Explorer visible
Map Editor

Preview of map

Preview of layer
Layer Editor with theme
Two views of Autodesk MapGuide Studio

Autodesk MapGuide Studio | 13


MapGuide Server
The MapGuide Server component hosts the MapGuide services and responds
to requests from client applications through TCP/IP protocol.
You can manage your site and its servers with the Site Administrator program.
This program is installed with the Web Extensions. It has a Web-based interface
that you can access from any web browser. To start the program, you open a
browser and enter: http://servername/mapguide/mapadmin/login.php, using
the name or IP address of the server on which you installed the Web
Extensions.
When you log onto the Site Administrator program, you can:

■ Manage your site. For example, you can add and remove servers, or take
them offline for maintenance.

■ Assign services to the servers. For example, one server can process mapping
requests while another handles rendering tasks.

■ Monitor the status of any server.

■ Define users and groups and assign roles and access permissions to them.

The illustration on the facing page shows two views of the Site Administrator
program. The upper image shows the home page, which lists the servers in
the site. The lower image shows a typical list of users and the groups that they
belong to.

14 | Chapter 1 Fundamentals
List of servers in the site
Manage Servers selected

List of users in the site


Manage Users selected
Two views of the Site Administrator program

MapGuide Server | 15
MapGuide Web Extensions
The MapGuide Web Extensions are internal components which can be accessed
through the Web Extensions API. (There is also a forms-based interface which
you can access: http://servername/mapguide/mapagent/index.html). The Web
Extensions expose the services offered by the MapGuide Server to client
applications over the Internet or an intranet using HTTP protocol. The diagram
on the facing page shows the main sub-components of the MapGuide Web
Extensions.
The WebAgent processes requests coming from clients and passes them to the
MapGuide Server. Two of the clients are Autodesk MapGuide Studio and the
MapGuide Viewer. The WebAgent implements the MapGuide services HTTP
Protocol, which it uses when directing requests to the server. The WebAgent
processes incoming request parameters, establishes a connection to the
appropriate server, and calls the service API(s) required to process the request.
When the service API responds, any data returned from the API is streamed
back to the client.
The OpenGIS Agent implements a number of the OpenGIS web-mapping
protocols to expose the services offered by the MapGuide Server to
standards-based OpenGIS clients.
The MapGuide Web Extensions provide a platform for application
development, based on the services offered by the MapGuide Server. The Web
Extensions API supports three languages/environments: ASP, JSP, and PHP.
For more information, see the Developer’s Guide.

16 | Chapter 1 Fundamentals
WEB EXTENSIONS

Web Server

Web Application Server

Web OpenGIS Web


Agent Agent Applications

Web Extensions API

Server

Architecture of the MapGuide Web Extensions

MapGuide Web Extensions | 17


MapGuide Viewer
The MapGuide Viewer provides a means of viewing a map in a web browser.
After you have made your spatial data available on the Internet or on your
intranet, users can use the viewer to display the data and interact with it.
There are two flavors of the MapGuide Viewer:

■ The downloadable viewer (Autodesk DWF viewer) is based on a Microsoft


ActiveX Control and has full support for the DWF format. It works with
the Microsoft Internet Explorer browser only.

■ The AJAX viewer (or “zero-client viewer”) does not need a download. It
works with Microsoft Internet Explorer, running on Windows, or with
Internet Explorer or Firefox on other operating systems, such as MacOS or
Linux.

You can customize the appearance of the MapGuide Viewer and select which
toolbar commands you want to use with a template called a web layout. Of
course, you can also add features and functions to the basic layout using your
own program code.

18 | Chapter 1 Fundamentals
Legend showing layers
Toolbar buttons

Task pane

Task changed to Find

Results of Find shown on map


Two views of the MapGuide Viewer

MapGuide Viewer | 19
Load and Configure
Before you can build maps in MapGuide, you must make your source data
available. There are three ways to make source data available:

■ Load any file-based data, such as DWG, SHP, or SDF, onto the MapGuide
site. You can also load raster files.

■ Connect to SDF, SHP, and raster files not loaded into the MapGuide
resource repository.

■ Configure connections to databases, such as Oracle, ArcSDE, or MySQL.

Load data by converting all, or part of, the source file into a format that
MapGuide can use, and storing it as a resource. For example, you can load all
the layers in a DWG file and create a separate resource for each one.
Connect to SDF, SHP, or raster files without loading them into the MapGuide
resource repository. The files can be located on the same server as MapGuide
or on a different server.
Data stored in a database does not need to be loaded. You simply connect to
it by configuring a data source for it. In this case, the information necessary
to connect to the database is stored as the resource.
If the database is a simple file (Microsoft Access MDB or Microsoft Excel XLS),
Autodesk MapGuide Studio uploads it when you connect to the server. It is
stored on the server as source data for the resource.
MapGuide uses Autodesk and OSGeo FDO providers. An FDO provider is an
implementation of the FDO (Feature Data Objects) API that provides access
to data in a particular DataStore. (For more information about FDO, see the
Open Source Geospatial website at
https://mapguide.osgeo.org/gettingstarted.html.)
Connections to databases are stored as resources in the resource repository
and can be edited just like any other resource.

20 | Chapter 1 Fundamentals
Drag files to Site Explorer

SHP and SDF files

DWG files

Raster files

Configure connections to databases

Points database

Database tables
Loading files and configuring connections to databases

Load and Configure | 21


Feature Sources and Drawing Sources
During the load process, MapGuide transforms source data into formats that
are optimal for serving over the Web. Some formats are already optimal for
use on the Web, including: Autodesk SDF, Autodesk DWF, and ESRI SHP.
These formats are loaded directly without transformation. Other formats are
converted into either SDF or DWF, which are the two native file-formats in
MapGuide. SDF is used for feature sources and DWF is used for drawing sources.

■ Feature sources are the best choice when you simply want to load the raw
geometry and then style or theme it in Autodesk MapGuide Studio.

■ Drawing sources are best when you want to retain any styles or themes
already applied to the source data.

For example, the diagram on the facing page shows four views of a DWG file
in Autodesk Map. The layer containing unstylized polygons (screenshot 1 at
top) is converted to a feature source, because it contains simple geometry. The
Display Manager styles and themes (3 and 4) already have some stylization,
and so they are converted to drawing sources. There is also a polygon layer
that has some stylization (2). In this case, you can choose to convert the layer
either to a feature source (and lose the stylization) or to a drawing source (and
keep it).

22 | Chapter 1 Fundamentals
Layers containing polygons:
feature source

Layers containing
1 colored and hatched
polygons:
drawing source or
feature source

2
Display Manager:
drawing source

Display Manager theme:


drawing source
4

Views of a DWG file in Autodesk Map, showing options for converting to feature sources or drawing
sources

Feature Sources and Drawing Sources | 23


Load Procedures
When you drag a file or a set of files of the same format to the Site Explorer
in Autodesk MapGuide Studio, you get a new load procedure. Load procedures
are essentially saved scripts for reloading data. You can use load procedures
to automate the updating of resources on the server. They capture the location
of the source files, the conversion rules, and where to put the resulting data
on the server.
You can execute these conversion rules (either interactively in Autodesk
MapGuide Studio or through a script) to refresh file-based spatial data on your
site. Scripts can be run overnight or at regular intervals to keep the data
up-to-date.
Load procedures are themselves stored as resources in the repository. Open
them in Autodesk MapGuide Studio whenever you need to add or delete files,
change the destination, or update any of the other parameters.
The illustration on the facing page shows two load procedures open in
Autodesk MapGuide Studio. Both procedures load multiple files at the same
time. One loads SDF files, and the other loads raster files.

24 | Chapter 1 Fundamentals
Drag files to the Site Explorer

SDF files

Raster files

Load procedures for SDF files (top) and raster files (bottom)

Load Procedures | 25
Resource Repository
The resource repository is an XML database that stores the resources created
by loading file-based data or by connecting to databases. There is one repository
per site and it resides on the site server. The diagram on the facing page shows
how the resources are stored in the repository.
Resources are designed to be reused and shared. Some resources reference
other resources. For example, maps and layers are stored as separate resources,
and the map references the layers that are included in the map. Layers reference
feature or drawing sources. When you update the original feature source, the
layer is automatically updated as well.
Other resources, such as print layouts, are self-sufficient and do not reference
any other resources or files. Some resources use associated resource data. For
example, an ArcSDE feature source uses a file which holds the database
credentials. Resource data can be stored as files, streams, or strings.

■ Files are used when the amount of data is large, such as DWF or SDF files.

■ Streams are used for faster access to smaller pieces of binary data, such as
symbols.

■ Strings are used for small pieces of text data, such as database access
credentials.

For information on backing up and restoring the resource repository, see the
document RepositoryAdmin.pdf, installed with MapGuide.

26 | Chapter 1 Fundamentals
Resources

Web layout

Print layout
Resource Data

Map Files Streams Strings

Layer

Symbol library symbols

Drawing source DWF file

Feature sources

SDF SDF file

SHP, DBF files


SHP
config file

TIF, SID files


Raster
config file

Oracle credentials

ArcSDE credentials

file
ODBC credentials
config file

Feature join

Procedure

Folder References other resources


Uses resource data

Contents of the resource repository

Resource Repository | 27
Feature Joins
After you have loaded your data or connected to it, you can establish
relationships between any two feature sources. These relationships are called
feature joins. A feature join is saved as a new resource in the repository. When
you join feature sources, you create a feature-join resource, which is similar
to a relational join in a database, except that you are “extending” a feature
resource to create a new one.
The example on the facing page shows how a feature source containing county
boundaries is joined to another feature source containing census population
data, using the following general steps:

■ Select the primary resource (for example, Counties).

■ Select the secondary resource (for example, Population).

■ Match the feature classes (a feature class is equivalent to a table, for


example, Counties or Population).

■ Enter a name for the extender property (serves as the prefix for the joined
properties, for example, Population).

■ Map the identifying properties (for example, ID and CountyID).

28 | Chapter 1 Fundamentals
Primary feature source Secondary feature source

Population
Counties - CountyID
- ID - CountyName
- Name - LandArea
- State - WaterArea
- Area - CountyPopulation

New feature join

Counties
- ID
- Name
- State
- Area
- Population.CountyID
- Population.CountyName
- Population.LandArea
- Population.WaterArea
- Population.CountyPopulation
Joining two feature sources

Feature Joins | 29
Learning MapGuide
MapGuide provides learning materials to get you started using the software,
and complete documentation to serve as a reference.
The Autodesk MapGuide Enterprise Getting Started Guide introduces the most
important concepts in MapGuide. After reading through it, and perhaps doing
some of the suggested exercises using the sample files provided, you should
feel comfortable enough to start working with your own data.
The Autodesk MapGuide Studio User’s Guide is a Help file in CHM format with
a table of contents, an index, and keyword search. You can print out the Help
topics that interest you.
MapGuide Server Site Adminstrator Help is a set of HTML pages that you can
access from the Site Administrator program.
The MapGuide Developer’s Guide is a book in PDF format that covers all topics
related to developing Web-based applications using the APIs provided with
MapGuide. It includes many practical examples with sample code that you
can copy and use.
The MapGuide Web API Reference and Studio API Reference are HTML pages.
They contain detailed information about all the APIs and include many code
samples.
The MapGuide Sample Application is a web application, written in PHP, that
demonstrates many of the features and services provided by the MapGuide
Server APIs.

30 | Chapter 1 Fundamentals
The phrase you searched for is highlighted.

List of classes
MapGuide Studio API Reference (bottom) and Studio User’s Guide (top)

Learning MapGuide | 31
32 | Chapter 1 Fundamentals
Flow Diagram
2
The detailed flow diagram in this chapter summarizes the

process of developing a Web application using MapGuide.

The numbers of the phases in this flowchart correspond to

the numbered steps in The Development Process topic at the

beginning of Chapter 1, “Fundamentals.” Some of the tasks

in the flow diagram are marked with an asterisk icon (*).

Step-by-step tutorials for these tasks are included in Chapter

3, “Examples.”

33
34 | Chapter 2 Flow Diagram
P H A S E 0: P L A N N I N G

Establish goals Do Web design

Identify users and groups Preliminary interface

Determine source data Colors/look and feel

Specify update frequency Page sequence/forms

Set up site

Decide number of servers

Install software

Configure services

| 35
P H A S E 1: L O A D A N D C O N F I G U R E

0 Create folder structure

Load files

SHP files

SDF files

DWF files

DWG layers

DWG elements

Raster files

Connect to databases

ODBC

Oracle

ArcSDE

Create feature joins 2

Click to jump to exercise in Chapter 3

36 | Chapter 2 Flow Diagram


P H A S E 2: B U I L D L A Y E R S

1 Style layers

Set geometry style

Use symbols for points

Theme from a database

Define scale ranges

Make composite lines

Add maptips and URLs

Generate labels

P H A S E 3: M A K E A M A P

Create a new map

Create a new layer

Add layers to map

Organize layers

Generate a legend

Click to jump to exercise in Chapter 3 4

| 37
P H A S E 4: P L A C E O N I N T E R N E T

3 Compose Web layout Set up print layouts

View in browser 5

PHASES 5 AND 6: DEVELOP AND TEST

4 Develop application Test application

Setup environment Test in browsers

Automate loading Arrange for feedback

Write function code Rollout

Click to jump to exercise in Chapter 3

38 | Chapter 2 Flow Diagram


Exercises
3
The exercises in this chapter cover the whole process of map In this chapter
authoring in Autodesk MapGuide Studio. You can work ■ About the Exercises
■ Create a Folder Structure
through the exercises in this chapter using the sample data
■ Load Shapefiles
provided. By the end of the chapter, you should have a map
■ Load SDF Files
ready to post to the Internet or intranet. You can also skip the ■ Load Geometry from a
DWG File
“tutorial” phase and begin right away using your own data.
■ Load Styled Data from a
DWG File
You can print this chapter and use it as a quick reference to
■ Load Raster Images
common tasks, such as loading source data or theming layers. ■ Connect to an Access
Database
■ Set the Style for a Polygon
Layer
■ Make Composite Lines
■ Define Scale Ranges
■ Create a New Map
■ Add Layers to a Map
■ Create a New Layer
■ Theme from a Database
Table
■ Organize the Layers in a
Map
■ Edit Layers

39
■ Create a Symbol Library
■ Use Symbols for Points
■ Generate Labels
■ Add Tooltips
■ Set Up the Map Legend
■ View the Map in a Web
Browser

40 | Chapter 3 Exercises
About the Exercises
The following exercises are laid out on facing pages. The steps are on the
left-hand page with matching illustrations on the right-hand page. The
illustrations provide a summary of the task while the text includes the detailed
steps for the exercise. The large red numbers relate the two pages.
It is recommended that you read the text carefully the first time you do these
exercises and use the illustrations to confirm that your results are correct.
Later, you may find it useful to print out this chapter and use the illustration
pages as a quick reference to common tasks.

About the Exercises | 41


Create a Folder Structure
In this exercise, you create the recommended folder structure for a new project
in Autodesk MapGuide Studio.

Number Detailed steps

1 Right-click the URL at the top of the Site Explorer (as


1 shown in the illustration on the facing page), and
then click New ➤ Folder.

2 Name the new folder Sheboygan Public.

1 Right-click Sheboygan Public in the Site Explorer and


2 then click New ➤ Folder.

2 Name the new folder Data.

1 Repeat the last two steps to create the folder structure


3 shown on the facing page.

42 | Chapter 3 Exercises
Creating the Recommended Folder Structure

New > Folder

1
Create a root folder

New > Folder

Create a subfolder

3
Repeat to create structure

Result in Site Explorer:


Folder structure

Create a Folder Structure | 43


Load Shapefiles
In this exercise, you load SHP files in the simplest way, by dragging them
directly into a folder in the Site Explorer.

Number Detailed steps

1 In Windows Explorer, navigate to the folder: C:\Pro-


1 gram Files\Autodesk\MapGuideStudio\Sample Data\SHP.

2 Select the four files: HydrographicLines.shp, Hydrograph-


icPolygons.shp, Islands.shp, and Parcels.shp. Drag the
files to the Sheboygan Public folder in the Site Ex-
plorer.

1 In the Load Procedure Editor, select the coordinate


2 system WGS84 datum, Latitude-Longitude; Degrees
(in the Category Lat Longs, code=LL84).

1 Click Load Resources.


3 Note the new feature sources and layer resources in
the Site Explorer Data and Layers folders.

2 Click File ➤ Save and save the load procedure resource


in the Load Procedures folder with the name Load SHP
files.

3 Close the load procedure editor.

44 | Chapter 3 Exercises
Loading Shapefiles

Drag files
to folder

Specify load
procedure

3
Load resources

Result in Site Explorer:


New feature sources
and layers

Load Shapefiles | 45
Load SDF Files
In this exercise, you add more data source files to the site. Like SHP files, you
load SDF files by dragging them directly into a folder in the Site Explorer.

Number Detailed steps

1 In Windows Explorer, navigate to the folder: C:\Pro-


1 gram Files\Autodesk\MapGuideStudio\Sample Data\SDF.

2 Select the four files: buildingsNEW.sdf, CENTLINES.sdf,


CityLimits.sdf, and treepoints.sdf. Drag the files to the
Sheboygan Public folder in the Site Explorer.

1 In the Load Procedure Editor, select the coordinate


2 system WGS84 datum, Latitude-Longitude; Degrees
(in the Category Lat Longs, code=LL84).

2 For Duplicate Records, select Auto-Generate Unique


Keys.

1 Click Load Resources.


3 Note the new feature sources and layer resources in
the Site Explorer.

2 Click File ➤ Save and save the load procedure resource


in the Load Procedures folder with the name Load SDF
files.

3 Close the load procedure editor.

46 | Chapter 3 Exercises
Loading SDF files

Drag files
to folder

Specify load
procedure

3
Load Resources

Result in Site Explorer:


New feature sources
and layers

Load SDF Files | 47


Load Geometry from a DWG File
In this exercise, you load a DWG file and select a subset of the layers in the
file. A feature source and a layer resource are created for each layer in the
DWG.

Number Detailed steps

1 In Windows Explorer, navigate to the folder: C:\Pro-


1 gram Files\Autodesk\MapGuideStudio\Sample
Data\DWG.

2 Select the Sewer.dwg file. Drag the file to the Sheboy-


gan Public folder in the Site Explorer.

1 For Which Components Do You Want To Extract,


2 select AutoCAD Layers (6). Click Select Individual
Components.

2 In the Select Individual Components dialog box, click


Clear All.

3 Select the layers SANIT-LINES and SANIT-MH. Click


OK.

4 For How Do You Want To Transform The DWG Data,


select the coordinate system WGS84 datum, Latitude-
Longitude; Degrees (in the Category Lat Longs).

1 Click Load Resources.


3
2 Click File ➤ Save and save the load procedure resource
in the Load Procedures folder with the name Load
DWG layers.

3 Close the load procedure editor.

4 In the Site Explorer, double-click the new layers to


view the results of the load.

48 | Chapter 3 Exercises
Loading Geometry From a DWG File

Drag file
to folder

Select layers to load

3
Load Resources

Result in Site Explorer:


New feature sources
and layers

Load Geometry from a DWG File | 49


Load Styled Data from a DWG File
In this exercise, you load a DWG file and select Display Manager elements
from the file. A drawing source and a layer resource are created from the
elements plus a map.

Number Detailed steps

1 In Windows Explorer, navigate to the folder: C:\Pro-


1 gram Files\Autodesk\MapGuideStudio\Sample
Data\DWG.

2 Select the Blue Harbor.dwg file. Drag the file to the


Sheboygan Public folder in the Site Explorer.

1 Click Select Individual Components.


2
2 In the Select Individual Components dialog box, click
Clear All.

3 Select the elements footprint and Parcel boundaries.


Click OK.

4 In the Load Procedure Editor, select the coordinate


system WGS84 datum, Latitude-Longitude; Degrees
(in the Category Lat Longs).

5 Under Transform To This Resource Type, select


Drawing Source.

1 Click Load Resources.


3
2 Click File ➤ Save and save the load procedure resource
in the Load Procedures folder with the name Load
DWG elements.

3 Close the load procedure editor.

4 Double-click the Default map to see the results of the


load.

50 | Chapter 3 Exercises
Loading Styled Data From a DWG File

Drag file
to folder

Select elements to load

3
Load Resources

Result in Site Explorer:


New drawing sources,
layers, and map

Load Styled Data from a DWG File | 51


Load Raster Images
In this exercise, you load four raster images as a raster catalog resource A raster
catalog stores the definition of multiple related images.

Number Detailed steps

1 In Windows Explorer, navigate to the folder: C:\Pro-


1 gram Files\Autodesk\MapGuideStudio\Sample
Data\Raster.

2 Select the four TIF files in the folder. Drag the files to
the Sheboygan Public folder in the Site Explorer.

1 In the Load Procedure Editor, select the coordinate


2 system SheboyganWI-F (in the Category USA, Wiscon-
sin).

2 Under Where Do You Want To Load The Resources?


change the Raster Catalog Resource Name to Images.

1 Click Load Resources.


3 Note the new raster catalog and layer resources in the
Site Explorer.

2 Click File ➤ Save and save the load procedure resource


in the Load Procedures folder with the name Load
images.

3 Close the load procedure editor.

52 | Chapter 3 Exercises
Loading Raster Files

Drag files
to folder

Specify load
procedure

3
Load Resources

Result in Site Explorer:


New raster catalog
and layer

Load Raster Images | 53


Connect to an Access Database
In this exercise, you make a connection to the Microsoft Access database for
the Sheboygan parcels data and save the connection as a resource.

Number Detailed steps

1 Right-click the Data folder in the Site Explorer and


1 then click New ➤ Data Connection.

2 In the Connect to Data dialog box, select OSGeo FDO


Provider for ODBC.

1 In the New Feature Source Editor, for Type Of Connec-


2 tion, select Connect To A File And Upload To The
MapGuide Library.

2 Under Data File And Any Associated Files To Be Up-


loaded, click New and then navigate to the folder:
C:\Program Files\Autodesk\MapGuideStudio\Sample
Data\Database.

3 Select Parcels.mdb. Click Open.

1 Click File ➤ Save and save the connection resource


3 in the Data folder with the name Access database con-
nection.

2 It may take a minute for the file to upload to the


server.
Click Test Connection.
You should see a “Successful Connection” message.

3 Close the resource editor.

54 | Chapter 3 Exercises
Connecting to a Microsoft Access Database

New > Database Connection

Select ODBC
provider

2
Specify connection
string and upload file

3
Save, then
test connection

Result in Site Explorer:


New feature source
No layer

Connect to an Access Database | 55


Set the Style for a Polygon Layer
In this exercise, you set a basic style for a polygon layer by selecting a fill color
and a border color.

Number Detailed steps

1 In the Site Explorer, double-click the layer Parcels (not


1 the Parcels feature source).
The Layer Editor is displayed with the default window
split between the Preview panel (below) and Editor
panel (above).

2 Click Refresh in the Preview panel to see the layer.

3 Use the Zoom To Rectangle tool to zoom the Layer


Preview window so that you can see the parcels
clearly.

4 At the top of the Layer Editor, click Style (blue text,


not a button).
The Layer Editor brings the Style panel of the editor
to the top. Scrolling to the Style panel makes it easier
to specify the style for the layer.

1 In the Layer Editor, for Style Of The Geometry, click


2 [...].

2 In the Style Area dialog box, for Fill Foreground Color,


select an orange color. For Border Color, select a dark-
red color.

3 Click OK.

1 In the Layer Preview panel, click Refresh to test the


3 style.

2 On the toolbar, click Save to save the layer resource.

56 | Chapter 3 Exercises
Setting a Style for Polygons

Double-click Parcels layer

Open the Layer Editor

2
Set the style

3
Save the layer

Result in Layer Editor:


Styled polygons

Set the Style for a Polygon Layer | 57


Make Composite Lines
In this exercise, you define a composite line style for a polyline layer. In the
next exercise, you will specify the scale range at which this style appears.

Number Detailed steps

1 In the Site Explorer, double-click the layer CENTLINES


1 (not the CENTLINES feature source).
The Layer Editor is displayed with the default window
split between the Preview panel (below) and Editor
panel (above).

2 Click Refresh in the Preview panel to see the layer.

3 At the top of the Layer Editor, click Style.


The Layer Editor brings the Style panel of the editor
to the top. Scrolling to the Style panel makes it easier
to specify the style for the layer.

1 In the Layer Editor, for Style Of The Geometry, click


2 [...].

2 In the Style Line dialog box, click Create Composite


Lines.

3 For Thickness, select 0.2 and then select a dark gray


color. For Build Up Composite Lines, click New and
then select a yellow color. For Pattern, select Dot.
Click OK.
You should have a thick dark gray line with a thin
dashed yellow line inside it.

1 In the Layer Preview panel, click Refresh.


3
2 Use the Zoom To Rectangle tool to zoom the Layer
Preview panel.

3 On the toolbar, click Save to save the layer resource.

58 | Chapter 3 Exercises
Making Composite Lines

Double-click CENTLINES layer

Open the Layer Editor

2
Set the style

3
Save the layer

Result in Layer Editor:


Styled polylines

Make Composite Lines | 59


Define Scale Ranges
In this exercise, you specify the scale range at which you want a particular
style to appear.

Number Detailed steps

1 In the Site Explorer, double-click the layer CENTLINES


1 to open it, if it is not already open. If it is open, click
its tab to view it.
The Layer Editor is displayed with the default window
split between the Preview panel (below) and Editor
panel (above).

2 At the top of the Layer Editor, click Style.


The Layer Editor brings the Style panel of the editor
to the top. Scrolling to the Style panel makes it easier
to specify the style for the layer.

1 For Style, click Add A Scale Range.


2
2 Set the new scale range to 30000-Infinity. Change the
color and linetype to green-dotted.

3 Set the scale range with the dark-gray and yellow


composite line to 0-30000.

1 In the Layer Preview panel, click Refresh.


3
2 Test the scale ranges using the zoom tools to zoom
in and out.
You can also click the links under Zoom To A Scale
Range.

3 On the toolbar, click Save to save the layer resource.

60 | Chapter 3 Exercises
Defining Scale Ranges

Double-click CENTLINES layer

Open the Layer Editor

2
Define scale ranges

3
Test scale ranges
and save the layer

Result in Layer Editor:


Styles appear at
correct scales

Define Scale Ranges | 61


Create a New Map
In this exercise, you begin a new map and set its properties.

Number Detailed steps

1 In the Site Explorer, right-click the Maps folder, and


1 then click New ➤ Map.
The Map Editor is displayed with the default window
split between the Preview panel (below) and Editor
panel (above).

2 On the MapGuide Studio toolbar, click Edit (in the


row of buttons: Edit, Split, and Preview).
The Map Editor hides the Preview panel and displays
only the Editor panel. Hiding the Preview panel makes
it easier to view and specify the properties for the
map.

1 For Description, enter Sheboygan city map (public).


2
2 For Coordinate System, leave blank (the map will use
the coordinate system of the first layer that you add
to it).

3 For Background Color, select a light color or leave as


white.

1 Click File ➤ Save and save the map resource in the


3 Maps folder with the name Sheboygan city map.

62 | Chapter 3 Exercises
Starting a New Map

New > Map

Begin a new map

2
Specify the
properties
of the map

3
Save the map

Result in Site Explorer:


New map resource

Create a New Map | 63


Add Layers to a Map
In this exercise, you add layers to the map and preview the results.

Number Detailed steps

1 In the Site Explorer, double-click Sheboygan City Map


1 to open it. If it is already open, click its tab to view it.

2 On the MapGuide Studio toolbar, click Edit to hide


the preview panel.

3 Close the Settings panel by clicking the minus (-) sign,


so that you can see more of the Layers panel.

1 In the Site Explorer, select the Parcels layer and drag


2 it to the list of layers in the Layers panel.

2 Drag the CENTLINES layer to the list.

1 On the toolbar, click Split to show the Preview panel.


3
2 Click Refresh in the Preview panel.
The two layers should appear correctly. Zoom in and
out to test the scale ranges that you applied to the
CENTLINES layer.

3 On the toolbar, click Save to save the map resource.

64 | Chapter 3 Exercises
Adding Layers to a Map

Open the Map Editor

2
Drag layers

3
Preview and
then save
the map

Result in Map Editor:


Multiple layers

Add Layers to a Map | 65


Create a New Layer
In this exercise, you create a new layer referencing an existing data source, in
this case, the parcels data that you loaded earlier. You will theme this layer
in the next exercise.

Number Detailed steps

1 Right-click the Layers folder in the Site Explorer and


1 then click New ➤ Layer.

1 In the Layer Editor, for Data Resource Used In This


2 Layer, click [...].

2 Navigate to the folder Sheboygan Public\Data and then


select the data source Parcels.
The parcel polygons appear in the Preview panel.

1 Click File ➤ Save and save the layer resource in the


3 Layers folder with the name Parcels (area).

66 | Chapter 3 Exercises
Reference Data in a New Layer

New > Layer

Open the Layer Editor

2
Select the data
resource and preview

3
Save the layer

Result in Site Explorer:


New layer refers to
Parcels data source

Create a New Layer | 67


Theme from a Database Table
In this exercise, you theme the parcels in your map according to their area in
square feet, using a column (property) from a database table.

Number Detailed steps

1 In the Site Explorer, double-click the layer Parcels


1 (area) to open it, if it is not already open. If it is open,
click its tab to view it.

2 At the top of the Layer Editor, click Style to bring the


Style panel to the top.

1 In the Style panel, click the Theme button.


2
2 Under 0-Infinity: Area Style, click the Theme button.

3 In the Theme dialog box, for Property, select RSQFT.


For Distribution, select Quantile.

4 For Rules, enter 6 for the number of rules to create.

5 For Style Ramp, click the Browse button and then, for
Foreground Color, select yellow and red for the start
and finish colors. Click OK.

6 Select Create Legend Labels, and then for Label Text,


enter Area. Click OK.

1 In the Layer Preview panel, click Refresh to test the


3 theme.

2 Save and close the layer resource.

68 | Chapter 3 Exercises
Theming from a Database Table

Double-click Parcels (area) layer

Open the Layer Editor

2
Select the property and
set up the theme

3
Test and then save
the layer

Result in Layer Editor:


Parcels are themed

Theme from a Database Table | 69


Organize the Layers in a Map
In this exercise, you add more layers to your map, and use the Drawing Order
and Layer Group tools to organize them.

Number Detailed steps

1 Double-click Sheboygan City Map in the Site Explorer


1 to open it. If it is already open, click its tab to view it.

1 On the MapGuide Studio toolbar, click Edit to hide


2 the preview panel.

2 In the Site Explorer, select the layer buildingsNew and


drag it to the list of layers in the Layers panel (CENT-
LINES and Parcels should already be in the list).

3 Repeat to drag the layers shown in the illustration on


the facing page to the list.
You should have a list of layers in no particular order,
as shown in the illustration.

1 Click the Drawing Order tab, then use the arrow but-
3 tons to move the layers into the order shown in the
illustration, with the layer Images at the bottom and
treepoints at the top.

2 Click the Layers By Group tab. Right-click in the list


and select New Group.

3 Name the new group Hydrology and drag the hydro-


logy layers plus Islands into it.

4 Save the changes to the map resource.

70 | Chapter 3 Exercises
Organizing the Layers in a Map

Open the Map Editor

2
Drag layers to
layers list

3
Set draw order and
make layer groups

Result in Map Editor:


Layers organized

Organize the Layers in a Map | 71


Edit Layers
In this exercise, you provide styles for some of the layers that have not yet
been edited, so that the layers in the map are displayed in color and at the
appropriate scales.

Number Detailed steps

1 In the Site Explorer, double-click the layer Hydrograph-


1 icPolygons to open it.

2 At the top of the Layer Editor, click Style to bring the


Style panel to the top. In the Layer Editor, for Style
Of The Geometry, click [...].

3 In the Style dialog box, for Fill Foreground Color, se-


lect a mid-blue color. For Border color, select a dark-
blue color.

4 Save and close the resource.

1 In the Site Explorer, double-click the layer buildings-


2 NEW to open it.

2 In the Style dialog box, for Fill Foreground Color, se-


lect a red color. For Border color, select a brown color.
For Scale Ranges, edit the To field so that the scale
range is from 0-30000.

3 Save and close the resource.

1 In the Site Explorer, double-click the layer treepoints.


3
2 In the Style dialog box, Width and Height enter 0.1.
For Fill Color and Edge Color, select a green color. For
Scale Ranges, edit the To field so that the scale range
is from 0-10000. Note: ten thousand not thirty thou-
sand.

3 Save and close the resource.

72 | Chapter 3 Exercises
Editing the Style of the Layers

Scale range = 0-Infinity


1

Edit Hydrographic
Polygons
and save. Scale range = 0-30000

2
Scale range = 0-10000
Edit buildingsNEW
and save.

3
Edit treepoints and save.

Result in
Map Editor:
Styled layers

Edit Layers | 73
Create a Symbol Library
In this exercise, you create a new symbol library. You will use one of the
symbols from it in the next exercise.

Number Detailed steps

1 In the Site Explorer, right-click the folder Symbol


1 Libraries and then click New ➤ Symbol Library.

1 In the Symbol Library Editor, for Description, enter


2 Trees in top view.

2 Click New.

3 Navigate to the folder: C:\Program


Files\Autodesk\MapGuideStudio\Sample Data\Symbols.

4 Select all five tree files and click Open.

1 Click File ➤ Save and save the symbol library resource


3 in the Symbol Libraries folder with the name Trees.

74 | Chapter 3 Exercises
Creating a Symbol Library

New > Symbol Library

Open the Symbol Library Editor

2
Select the files to
include
in the library

3
Save the symbol
library

Result in Site Explorer:


New symbol library

Create a Symbol Library | 75


Use Symbols for Points
In this exercise, you replace a point style with a symbol from a symbol library.

Number Detailed steps

1 In the Site Explorer, double-click the treepoints layer


1 to open it.

2 Under Zoom To A Scale Range, click 0-10000 to zoom


the Layer Preview window so that the points are vis-
ible.

3 At the top of the Layer Editor, click Style to bring the


Style panel to the top.

1 In the Layer Editor, for Style Of The Geometry, click


2 [...].

2 In the Style dialog box, for Symbol, Select Symbol


Library.

3 Navigate to the Trees Symbol Library.

4 Select tree3 and click OK.

5 In the Style Point dialog box, for Width and Height


enter 0.3 and click OK.

1 In the Layer Preview panel, click Refresh.


3
2 Save the layer resource.

3 View the updated layer in the map.

76 | Chapter 3 Exercises
Using Symbols for Points

Double-click treepoints layer

Open the Layer Editor

2
Select the symbol

3
Save the layer

Result in Layer Editor:


Symbols replace points

Use Symbols for Points | 77


Generate Labels
In this exercise, you define the labels that appear on the major streets in your
map.

Number Detailed steps

1 In the Site Explorer, double-click the layer CENTLINES


1 to open it.

2 At the top of the Layer Editor, click Style to bring the


Style panel to the top.

1 In the Layer Editor, click the 0-30000 scale range to


2 select it.

2 for Feature Label, click [...].

3 In the Style Label dialog box, select Create A Label.

4 For Property To Display, select Name.

5 For Units, select points.

6 For Size, enter 10.

7 For Format, select Bold and then click OK.

1 In the Layer Preview panel, click Refresh.


3
2 Under Zoom To A Scale Range, click 0-30000 to zoom
the Layer Preview window so that the labels are vis-
ible.

3 Save and close the layer resource.

4 View the updated layer in the map.

78 | Chapter 3 Exercises
Generating Labels

Double-click CENTLINES layer

Open the Layer Editor

2
Select the property to use
as a label

3
Test and then save
the layer

Result in Map Editor:


Streets are labeled

Generate Labels | 79
Add Tooltips
In this exercise, you select properties to display in Tooltips. Tooltips are pop-up
boxes that contain information about the features in the map.

Number Detailed steps

1 In the Site Explorer, double-click the Parcels layer to


1 open it (do not open Parcels (area).

1 In the Settings panel, for Tooltip Displayed For Fea-


2 ture, click [...].

2 In the Text Expression dialog box, click Property and


then select Name.
The Name property is added to the list on the left.

3 Click New.

4 Click Constant and then enter \n (to indicate a line


break).

5 Click New.

6 Click Property and select RBILAD (for address).

7 Click OK.
The completed expression is displayed in the Settings
panel.

1 In the Preview panel, click Refresh.


3
2 Move the mouse pointer over the parcels in the Pre-
view panel to test the tooltips.

3 Save and close the layer resource.

80 | Chapter 3 Exercises
Adding Tooltips

Double-click Parcels layer

Open the Layer Editor

2
Select the properties
to display

3
Test and then
save the layer

Result in Layer Editor:


Tooltips appear for the
parcels

Add Tooltips | 81
Set Up the Map Legend
In this exercise, you specify how you want the legend to appear. Some layers
are initially turned on while others are turned off. You will be able to view
the legend in the Web browser in the next exercise.

Number Detailed steps

1 In the Site Explorer, double-click the map Sheboygan


1 City Map to open it.

2 On the MapGuide Studio toolbar, click Edit.

1 Drag the Parcels (area) layer from the Layers folder to


2 the list of layers in the Layers panel.

2 Click the Drawing Order tab and move the Parcels


(Area) layer up until it is next to the Parcels layer.

3 Click the Layers By Group tab and make sure that the
Parcels (Area) layer is still selected. Clear the check-
boxes for Layer Is Initially Displayed In The Map and
Layer (If Themed) Is Initially Expanded.
The layer will be turned off when the map is displayed
in the viewer and the color-key for the theme will not
be expanded.

1 On the MapGuide Studio toolbar, click Split.


3
2 In the Map Preview panel, click Refresh to test the
legend.

3 Clear the checkbox next to Parcels and select the one


next to Parcels (area). Expand the Parcels (area) layer
to view the key to the theme.

4 Save the map resource.

82 | Chapter 3 Exercises
Setting Up the Legend for the Map

Double-click Sheboygan
City Map

Open the Map Editor

2
Specify which layers
are visible

3
Preview and then
save the map

Result in Map Editor:


Preview of legend

Set Up the Map Legend | 83


View the Map in a Web Browser
In this exercise, you create a new Web layout and embed the map in it. Finally,
you test the map by viewing it in a Web browser.

Number Detailed steps

1 Right-click the folder Web Layouts and then click


1 New ➤ Web Layout.

1 On the toolbar, click Edit to hide the Preview panel.


2
2 In the Web Layout Editor, for Text For Browser Title
Bar, enter Sheboygan City Map. For Map Resource Used
In This Layout, navigate to the Sheboygan Public/Maps
folder and select Sheboygan City Map.

1 Click File ➤ Save and save the Web layout in the Web
3 Layout folder with the name City Map.
You need to save the Web layout before you can test
it in the browser.

2 In the Web Layout Editor, scroll down until you can


see Preview In Browser Using DWF Viewer. Click Go.
Your Web browser starts and displays the map in the
DWF Viewer.

3 Test your map, using the tools provided by the DWF


Viewer.
You should be able to see tooltips for the parcel layer.
You should also see the CENTLINES and buildingsNew
layers appear as you zoom in beyond 1-30000, and
the treepoints layer at 1-10000.

84 | Chapter 3 Exercises
Viewing the Map in a Web Browser

New > Web Layout

Create a new Web layout

2
Select the map
to use

3
Save the web layout
and then test

Result in Web browser:


Map with DWF Viewer
controls

View the Map in a Web Browser | 85


86
Glossary

AJAX viewer See MapGuide viewer (AJAX viewer).

attributes Tabular data that describes the characteristics of a feature. For


example, the number of lanes and pavement-type belonging to a road feature.
See also feature, property.

Autodesk MapGuide Studio The MapGuide component that handles all


aspects of collecting and preparing geospatial data for distribution on the
Internet (except custom coding).

blocks In AutoCAD or Autodesk Map, compound objects that have been saved
for reuse in the drawing or in multiple drawings, for example, a North arrow.
In MapGuide, blocks are converted into symbols when they are loaded. See
also symbol.

CD Browser The program that appears when you insert the product CD, and
which provides access to installation instructions and other information.

credentials The user ID and password needed to connect to a database.

data store In FDO, a collection of feature classes contained in a single data


storage location. The data store consists of an integrated set of objects, which
are modeled by classes or feature classes defined within one or more schemas.
Data stores can be either file-based, such as SDF, or a database, such as Oracle
Spatial.

Display Manager In Autodesk Map, the component that handles the styling
and theming of features in a DWG file.

Display Manager element A set of features that has been assigned a specific
style or theme in Display Manager and which can be selected individually for
loading into Autodesk MapGuide Studio.

display map A map presentation, consisting of Display Manager elements,


that can be stored in a DWG file.

Drawing service The service that allows low level access to DWF data stored
in a resource repository as part of a drawing source.

Glossary | 87
drawing source One of the two types of resources created by loading file-based
data. Drawing sources are stored in the repository in DWF format and retain
any styles or themes already applied to the source data. Compare with feature
source.

drive alias In Autodesk Map, the mechanism that points to the folder where
attached DWG files are stored.

DWF Design Web Format. An Autodesk file format for sharing 2D, 3D, and
spatially-enabled design data.

DWF Viewer The free viewer for the DWF file format. The DWF Viewer can
be used to preview layers and maps in Autodesk MapGuide Studio and to
display the completed map in MapGuide Viewer.

DWG The Autodesk file format for storing 2D, 3D, and spatially-enabled
design data.

expression An automatic calculation used to specify values for URL, tooltip,


and feature labels. For example, you might create a text expression that
specifies a state name and population for a label. To express the population
in millions, you might apply a number expression that divides the population
value by 1,000,000.

FDO Feature Data Objects. An Autodesk software standard and general purpose
API for accessing features and geospatial data regardless of the underlying data
store. See also feature, feature class.

FDO provider An implementation of the FDO API that provides access to data
in a particular data store, such as an Oracle or ArcSDE database, or to a
file-based data store, such as SDF or SHP.

feature An abstraction of a natural or man-made real world object. A spatial


feature has one or more geometric properties. For example, a road feature
might be represented by a line, and a hydrant might be represented by a point.
A non-spatial feature does not have geometry, but can be related to a spatial
feature which does. For example, a road feature may contain a sidewalk feature
that is defined as not containing any geometry.

feature class A schema element that describes a type of real-world object. It


includes a class name and property definitions. Commonly used to refer to a
set of features of a particular class, for example, the feature class “roads” or
the feature class “hydrants.” See also schema.

feature join A relationship that joins one feature source to another, similar
to a relational join in a database.

88 | Glossary
Feature service The service that allows low level access to SDF 3 data stored
in a resource repository as part of a feature source.

feature source One of the two types of resources created by loading file-based
data or by connecting to a spatial database. Feature sources are stored in the
repository in SDF 3 format or as database connections and contain raw
geometry only. Compare with drawing source.

generalization In a load procedure, a method of reducing the number of


vertices in the source data by a specific percentage.

layer A resource that references a feature source or a drawing source. The layer
contains styling and theming information, and a collection of scale ranges.

Load procedure A saved script for reloading file-based data. You can use load
procedures to automate the updating of resources on the server. They capture
the location of the source files, the conversion rules, and where to put the
resulting data on the server.

map A resource that references a collection of layers and displays them within
a consistent coordinate system and extents.

MapGuide A software platform for distributing spatial data over the Internet
or on an intranet. Exists in two versions: Open Source (supported by the
community) and Enterprise (supported by Autodesk). (www.osgeo.org)

MapGuide Server The MapGuide component that hosts the MapGuide


services and responds to requests from client applications through TCP/IP
protocol.

MapGuide Viewer (AJAX viewer) The version of the MapGuide Viewer


component that does not need a download (also known as “zero-client
viewer”). It works with Microsoft Internet Explorer, running on Windows, or
with Internet Explorer or Firefox on other operating systems, such as MacOS
or Linux.

MapGuide Viewer (DWF viewer) The version of the MapGuide Viewer


component that is based on a Microsoft ActiveX Control and has full support
for the DWF format. It works with the Microsoft Internet Explorer browser
only.

MapGuide Web Server Extensions The MapGuide component that exposes


the services offered by the MapGuide Server to client applications over the
Internet or on an intranet using HTTP protocol.

Mapping service The service that creates the view of a map in response to
requests from the clients.

Glossary | 89
OpenGIS Agent The component of the MapGuide Web Extensions that
implements a number of the OpenGIS web-mapping protocols to expose the
services offered by the MapGuide Server to standards-based OpenGIS clients.

package A compressed file that can speed up the process of loading data onto
the server. Large source-data files can be zipped up in this file format and
saved to a network location or copied to a CD.

print layout An XML template for customizing the appearance of printed


maps.

property A single attribute of a class. A class is described by one or more


property definitions. For example, a Road feature class may have properties
called Name, NumberLanes, or Location. See also feature class.

query In Autodesk Map, executable statements that retrieve specific objects,


for example, a layer-based query that displays only the objects on the layers
that contain state and district boundaries.

raster catalog A list of image files and their lower-left and upper-right
coordinates. MapGuide scans the catalog file to find the images that correspond
to the area being viewed, and then sends only the data for that area.

reference point For a symbol, the point that controls the position of a symbol
over a feature in a map. The default reference point is the center of the symbol.

Rendering service The service that creates the final map image for the HTML
viewer from input provided by the Mapping service.

resource A feature source, drawing source, or application component that is


stored in the resource repository and which can be reused and shared.

resource repository An XML database that stores the resources created by


loading file-based data or by connecting to databases.

Resource service The service that manages repositories and resources.

schema The definition of multiple feature classses and the relationships


between them. The logical description of the data types used to model
real-world objects. A schema does not reference the actual data instances (a
particular road or land parcel), rather it is metadata. See also feature class.

SDF (SDF 3) Spatial Database Format. The current version of the SDF format.
It is the native format for MapGuide Enterprise and MapGuide Open Source
and is new in Autodesk Map 3D 2007. Each SDF 3 file can contain multiple
feature classes or types of data stored in tables with attributes and geometry.

90 | Glossary
SDF 2 The previous version of the SDF file format. It was the native file format
for Autodesk MapGuide (the last release was Autodesk MapGuide 6.5). Each
SDF 2 file generally contained one feature or type of data, for example points,
lines, polygons, or text.

services The software modules that reside on the MapGuide Server and which
implement its core functions. See also Site service, Resource service, Drawing
service, Feature service, Mapping service, Rendering service, and Tile service.

sheet In a DWF file, a plot layout containing a specific view of the original
data.

site The collection of servers that process MapGuide requests.

Site Administrator A Web-based application, installed with MapGuide Server,


for managing a site and its servers.

Site Explorer The tree view in Autodesk MapGuide Studio that shows you
the resources stored in the resource repository.

site server The server that contains the resource repository.

Site service The service that provides basic site-related functionality, such as
enumerating users and creating user sessions.

spatial context The general metadata or parameters within which geometry


for a collection of features resides. In particular, the spatial context includes
the definition of the coordinate system, spheroid parameters, units, spatial
extents, etc. for a collection of geometries owned by features.

styling The process of assigning display characteristics (such as line color, line
pattern, fill color, fill pattern, and so on) to a feature (points, polylines,
polygons). See also theming.

symbol A bitmap or vector image that is used to represent a point.

symbol lbrary A collection of related symbols. Image files are converted into
symbols when they are brought into the symbol library. The symbol library
is stored in the resource repository.

task bar In MapGuide Viewer, a pane that contains tools and controls for
specific tasks, such as searching or buffering.

theme In Autodesk Map, pre-defined thematic elements stored in the Display


Manager, for example, a theme that colors district polygons according to their
population.

theming The process of styling features according to an attribute value. See


also styling.

Glossary | 91
Tile service The service that supports smooth pans and zooms in the AJAX
viewer.

tooltips Pop-up boxes that contain information about the features in the map.

web layout A template for customizing the appearance of the MapGuide


Viewer and for specifying which toolbar commands will be available.

web surround The extra functionality that is automatically built for a web
layout, which resides outside of the map itself.

WebAgent The component of the MapGuide Web Extensions that processes


requests and forwards them on to the server.

zero-client viewer See HTML viewer.

92 | Glossary
Index
A
Access database, connecting to
D
(exercise) 54 data conversion during load 22
add layers to a map (exercise) 64 databases 20, 28, 68
add tooltips (exercise) 80 configure connections 20
API Reference, description of 30 relationships 28
authoring maps 12 supported by providers 20
Autodesk Map 22 theming from (exercise) 68
styles and themes 22 upload file 20
automating update of source data 24 define scale ranges (exercise) 60
Developer’s Guide, description of 30
B development process 4–5, 33
flow diagram 33
backing up the resource repository 26 overview 5
building maps, steps for 12 phases of 4
summary diagram 4
Display Manager 22
C documentation, list of 30
CD browser 8 drawing sources, definition of 22
client applications 10, 16 DWF Viewer 10, 12
components 8, 10–12, 14, 16, 18 used by Studio and Viewer 10
diagram of 11 used for preview 12
overview of 10 DWF, as rendered map 10
Server 14 DWG file, styles and themes in 22
Studio 12 DWG geometry, loading (exercise) 48
Viewer 18 DWG styled data, loading (exercise) 50
Web Extensions 16
where to install 8 E
composite lines, making (exercise) 58
concepts 30 edit layers (exercise) 72
learning 30 exercises 39, 42, 44, 46, 48, 50, 52, 54,
configure connections to databases 20 56, 58, 60, 62, 64, 66, 68, 70, 72,
connect Access database (exercise) 54 74, 76, 78, 80, 82, 84
connecting to databases 20 add layers to a map 64
connections to databases 20 add tooltips 80
create a folder structure (exercise) 42 connect to an Access database 54
create a new layer (exercise) 66 create a folder structure 42
create a new map (exercise) 62 create a new layer 66
create symbol library (exercise) 74 create a new map 62
create a symbol library 74

Index | 93
define scale ranges 60 H
edit layers 72
generate labels 78 Help system, introduction to 30
load DWG geometry 48 HTML viewer 10, 18
load DWG styled data 50 compatibility 18
load raster files 52 static image for 10
load SDF files 46 HTTP protocol 16
load SHP files 44
make composite lines 58
organize layers 70
I
overview of 39 installation, where to find steps 8
set style for a layer 56 interface, Autodesk MapGuide Studio 12
set up the legend 82 Internet Explorer browser 18
theme from a database 68 IP address, log into Studio 10
use symbols for points 76
view in Web browser 84
L
F labels, generating (exercise) 78
layer style, setting (exercise) 56
FDO (Feature Data Objects) 20 layers 26, 64, 66, 70, 72
definition of 20 adding (exercise) 64
providers 20 as resources 26
FDO providers 20 create new (exercise) 66
feature join 28–29 editing (exercise) 72
definition of 28 organizing (exercise) 70
diagram of 29 learning MapGuide 30
feature sources 22, 28 legend, setting up (exercise) 82
definition of 22 Linux 8, 18
joining 28 components that run on 8
files 20, 22, 26 supported browser 18
conversion process 22 load 20, 22
database 20 conversion process 22
in resource repository 26 data from files 20
Firefox browser 18 load and configure, diagram 21
flow diagram 33 load DWG geometry (exercise) 48
folder structure, creating (exercise) 42 load DWG styled data (exercise) 50
formats, optimized for Web 22 load procedures 24–25
definition of 24
G screenshots of 25
load raster files (exercise) 52
generate labels (exercise) 78 load SDF files (exercise) 46
Getting Started Guide 1, 30 load SHP files (exercise) 44
overview of contents 1 log in 10, 14
suggested use 30 to Site Adminstrator 14
to Studio 10

94 | Index
M definition of 26
diagram of 27
MacOS 18 resources 6, 12, 20, 26, 28
making composite lines (exercise) 58 and site server 6
map authoring 39 database connection 20
tutorials for 39 relationships between 28
MapGuide 1, 8, 30 reuse and sharing of 26
components of 8 view of 12
introduction to 1 restoring the resource repository 26
learning 30
sample application 30
Mapping service, definition of 6
S
maps 10, 12, 62 sample application 30
authoring 12 scale ranges, defining (exercise) 60
creating (exercise) 62 screenshots 13, 15, 19, 25
rendered in DWF format 10 load procedures 25
Site Administrator 15
O Studio 13
Viewer 19
OpenGIS Agent 16 scripts for reloading data 24
organize layers (exercise) 70 SDF files, loading (exercise) 46
Server 10, 14, 16
and client requests 10, 16
P and Site Adminstrator 14
PDF tips 3 and Web Extensions 16
phases of development 4–5, 33 overview of 14
flow diagram 33 servers 14
summary diagram 4 managing 14
programming 12, 16 services 6, 14, 16
adding to Web layout 12 and Web Extensions 16
languages supported 16 assigning to servers 6, 14
providers, FDO 20 list of 6
providers, for database support 20 set layer style (exercise) 56
set up the legend (exercise) 82
sharing resources 26
R SHP files, loading (exercise) 44
site 6–7, 14
raster files, loading (exercise) 52 definition of 6
refreshing source data 24 diagram of 7
relationships, database 28 managing 14
Rendering service, definition of 6 Site Administrator 14–15, 30
requests from clients to server 10, 16 documentation for 30
resource repository 6, 12, 26–27 purpose of 14
and Site Explorer 12 screenshots of 15
and site server 6 Site Explorer, purpose of 12
backing up 26

Index | 95
site server 6, 10, 26 Viewer 10, 16, 18–19
and resource repository 26 as client application 10, 16
connecting to 10 compatibility 18
definition of 6 flavors of 18
source data 22, 24 overview of 18
conversion during load 22 screenshots of 19
refreshing 24
static image, HTML viewer 10
streams, in resource repository 26
W
strings, in resource repository 26 Web browser 8, 14, 18, 84
Studio 10, 12–13, 16 and Site Administrator 14
as client application 10, 16 and viewer compatibility 8
overview of 12 and Viewer component 18
parts of 12 Firefox 18
screenshots of 13 Internet Explorer 18
styles and themes, retain from DWG viewing in (exercise) 84
file 22 Web Extensions 8, 10, 16–17
symbol library 74, 76 and client requests 10, 16
creating (exercise) 74 diagram of 17
using (exercise) 76 languages supported by 8
overview of 16
T Web layout 12, 18
and programming 12
template for Web layout 18 for customizing Viewer 18
theme from a database (exercise) 68 steps to build 12
tooltips, adding (exercise) 80 WebAgent 10, 16
tutorial exercises 39 purpose of 10, 16
Windows, components that run on 8
U
X
use symbols for points (exercise) 76
User’s Guide, description of 30 XML database, for resource repository 26
users and groups 14
Z
V
zero-client viewer 18
view in Web browser (exercise) 84

96 | Index

You might also like