Pitney Bowes MapXtreme User Manual

4.5 (2)
Pitney Bowes MapXtreme User Manual

MapXtreme

v7.1

DEVELOPER GUIDE

Information in this document is subject to change without notice and does not represent a commitment on the part of the vendor or its representatives. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, without the written permission of Pitney Bowes Software Inc., One Global View, Troy, New York 12180-8399.

© 2012 Pitney Bowes Software, Inc. All rights reserved.Pitney Bowes Software Inc. is a wholly-owned subsidiary of Pitney Bowes Inc. Pitney Bowes, the Corporate logo, MapInfo, Group 1 Software, and MapXtreme are trademarks of Pitney Bowes Inc. or a subsidiary. All other trademarks are the property of their respective owners.

United States: Phone: 518.285.6000 Fax: 518.285.6070 Sales: 800.327.8627

Government Sales: 800.619.2333 Technical Support: 518.285.7283 Technical Support Fax: 518.285.6080 www.pb.com/software

Canada:

Phone: 416.594.5200 Fax: 416.594.5201 Sales: 800.268.3282

Technical Support:.518.285.7283 Technical Support Fax: 518.285.6080 pbinsight.ca

Europe/United Kingdom:

Phone: +44.1753.848.200

Fax: +44.1753.621.140

Technical Support: +44.1753.848.229

www.pb.co.uk/software

Asia Pacific/Australia: Phone: +61.2.9437.6255 Fax: +61.2.9439.1773

Technical Support: 1.800.648.899 www.pbi.com.au/software

Contact information for all Pitney Bowes Software Inc. offices is located at:: www.pb.com/contact-us/

This product contains SpatiaLite v 3.1.0, which is licensed under GNU Lesser General Public License, Version 2.1, February 1999. The license can be downloaded from: http://www.gnu.org/licenses/lgpl-2.1.html. The source code for this software is available from http://www.gaia-gis.it/gaia-sins/win-bin- x86-test/spatialite-3.1.0b-test-win-x86.zip and http://www.gaia-gis.it/gaia-sins/win-bin-amd64-test/spatialite-3.1.0b-test-win-amd64.zip.

This product contains Feature Data Objects v 3.6.0, which is licensed under GNU Lesser General Public License, Version 2.1, February 1999. The license can be downloaded from: http://fdo.osgeo.org/lgpl.html. The source code for this software is available from http://fdo.osgeo.org/content/fdo-360-downloads.

This product contains HelpLibraryManagerLauncher.exe v 1.0.0.1, which is licensed under Microsoft Public License. The license can be downloaded from: http://shfb.codeplex.com/license. The source code for this software is available from http://shfb.codeplex.com.

July 2012

Table of Contents

Chapter 1: Introduction to MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Overview of MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22

Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22

Migrating to MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 Learning to Use MapXtreme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26

Support Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26

Chapter 2: Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Installation Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29

Minimum System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30

Types of Installations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30

Development (SDK) Installations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 Deployment (Runtime) Installations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 Side-By-Side Installations and Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31

MapXtreme Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31

Types of Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 Obtaining a License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 Locations of License Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 Known Issues with Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37

Before You Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37

Administrator Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Install .NET Framework and Visual Studio First. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 IIS 7.x and IIS 6 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38 Default Install Directories for MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39 Additional Installation Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39

Installing MapXtreme in Your Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 Upgrading to MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 Migrating Web Sites to 64-bit Web Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43

Updating Existing Web Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 Updating Existing Desktop Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44

Creating Applications in Visual Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46

MapXtreme

3

Developer Guide

Table of Contents

Map Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 ASP.NET Web Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48 MapXtreme Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50

Building ASP.NET Web Applications Without a Template . . . . . . . . . . . . . . . . . . . . . .50 Deploying Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52

Deploying With the Runtime Installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52 Deploying With Your Own Installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53 Deploying a Web Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 Deploying Applications that Access Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 MapXtreme Web Applications Behind Proxy Servers . . . . . . . . . . . . . . . . . . . . . . . . . .57 Permissions to Temp Directory for Deployed Web Applications . . . . . . . . . . . . . . . . . .57 Application Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 Deployment Installation Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58

Chapter 3: Mapping Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

Mapping and MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60

Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61 Labels and Legends. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61 Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 Coordinate Systems and Projections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63

Geocoding with MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64 Routing with MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65

Chapter 4: Understanding the MapXtreme Architecture . . . . . . . . . . . . . . . . . . . 66

MapXtreme Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67

Object Model Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68

MapInfo.Data Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68

MapInfo.Data.Find Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69

MapInfo.Engine Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69

MapInfo.Geometry Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69

MapInfo.Mapping Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69

MapInfo.Mapping.Legends Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69

MapInfo.Mapping.Thematics Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69

MapInfo.Persistence Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69

MapInfo.Raster Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70

MapInfo.Styles Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70

MapInfo.WebControls Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70

MapXtreme

4

Developer Guide

Table of Contents

MapInfo.Windows Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70

MapInfo.Tools Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70

MapInfo.Geocoding Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70

MapInfo.Routing Namespace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71

Application Architectures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71

Web Application Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72

Desktop Application Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74

Chapter 5: Web Applications, Controls, and Tools . . . . . . . . . . . . . . . . . . . . . . . 75

Web Application Request/Response Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76 Components of a MapXtreme Web Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76

MapXtreme Session. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76 Background Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 MapControl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 Map Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 State Management and Pooling Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80

MapXtreme Web Controls and Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80

Description of Web Controls and Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81

Web Control Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83

Map Tools Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84 How a Map Tool Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85

Using the MapXtreme Web Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86 Managing Your Web Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87

Event Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 Error Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 State Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88

Creating a Custom Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 Using and Distributing Custom Web Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90

Creating a Web Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91

Adding an InfoTool to a Web Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92 ASP.NET AJAX and MapXtreme Web Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . .92

Adding ASP.NET AJAX Controls to a MapXtreme Web Application . . . . . . . . . . . . . . .93

MapXtreme Tile Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94

Using the MapXtreme Tile Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97

HTML/XHTML Validation Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 Migrating Post-back Web Controls to JavaScript Web Controls . . . . . . . . . . . . . . . . .99

Loading Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 Replacing Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100 State and Event Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100

Specialized Topics for Web Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100

Using Web Controls in Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100

MapXtreme

5

Developer Guide

Table of Contents

Using the MapControl in Table Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101

Web Control Localization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101

Chapter 6: Understanding State Management . . . . . . . . . . . . . . . . . . . . . . . . . . 102

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103 Terminology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103 What is State Management?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105

What State Management Options are Available? . . . . . . . . . . . . . . . . . . . . . . . . . . . .105 Questions to Ask Before Writing Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . .105

InProc Development Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107

Pros and Cons of the InProc Development Model . . . . . . . . . . . . . . . . . . . . . . . . . . . .108 InProc Management: A Walk-Through. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108 Configuring an Application to Use the InProc Development Model . . . . . . . . . . . . . . .109 Using the MapXtreme Template with the InProc Development Model. . . . . . . . . . . . .110

State Management For Pooled Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110

What is Pooling? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110 Pros and Cons of Pooling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 Saving State for Pooled Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 Manual State Management: A Walk-Through . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113 Configuring a Pooled Application to Use Manual State Management . . . . . . . . . . . . .114

A Detailed Look at Manual State Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115

Overview of the Thematics Sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115 Application Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116 Implementing a StateManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117 Serializing MapXtreme Objects in the Proper Order . . . . . . . . . . . . . . . . . . . . . . . . . .119 Automatically Deserializing MapXtreme Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 Handling Initial Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 Handling Subsequent Requests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121

A Closer Look at the MapXtreme Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121

Configuring Microsoft COM+ Object Pooling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122

Chapter 7: Desktop Applications, Controls, Dialogs, and Tools . . . . . . . . . . . 124

Planning a Desktop Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125

Best Practices for Desktop Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 MapXtreme and COM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 Sample Applications and Project Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126

MapInfo.Windows.Controls Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126 Key Controls to Use in Desktop Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128

MapControl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128 MapToolStripButtons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129 The MapToolBar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130 Layer Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133

MapXtreme

6

Developer Guide

Table of Contents

MapInfo.Windows.Dialogs Namespace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134

CreateThemeWizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135

Customizing Controls and Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139 Overview of the MapInfo.Tools Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140 MapXtreme Desktop Tools API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141

View Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142 Select Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142 Add Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 Custom Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 Shape Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144 Using InfoTips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145

Customizing Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146 Tool Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147 Editing a FeatureGeometry with the Select Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148

Reshaping a Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148 Adding Nodes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150 Reshaping and Adding Nodes Programmatically. . . . . . . . . . . . . . . . . . . . . . . . . . . . .151

Chapter 8: Working with Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Overview of MapInfo.Data Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160 Catalog and Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161

Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161 Catalog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165

Supported Table Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166 Working with Catalog and Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169

Locating Open Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169 Closing a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170 Packing a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170 Listening to Table and Catalog Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171

Table Metadata (TableInfo) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172

Examining TAB File Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173 Creating a New Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173 Adding Expression Columns to a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176 Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177 Choosing the Correct Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177 Methods for Accessing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178 Data Readers, MemTables and Result Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179 Using an ADO.NET Data Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179 Data Binding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 Making Tables Mappable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186

MapInfo ADO.NET Data Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189

MIConnection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189

MapXtreme

7

Developer Guide

Table of Contents

MICommand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190 MIDataReader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 MapInfo SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193

Features and Feature Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193

Feature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193 Feature Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194 Searching for Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194 Catalog Search Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .195 SearchInfo and SearchInfoFactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196

Analyzing Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .200 Improving Data Access Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202

Chapter 9: Working with Core MapXtreme Classes . . . . . . . . . . . . . . . . . . . . . . 203

Session Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204

Session Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204 Using Session.Dispose Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205 ISessionEventHandlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206

Serialization and Persistence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206

Serialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207 Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .208

Opening and Saving a Workspace Containing Named Resources . . . . . . . . . . . . . .208

Opening an MWS: ResolveResource() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Saving an MWS: GetResourceName() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Registering Your Implementation with MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Setting Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209

Selection Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209

Using Selection Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 Selection Highlighting and Exporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 SelectionChangedEvent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 ISerializable Interface on Selection and Selections Classes . . . . . . . . . . . . . . . . . . . .211

Selection Code Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211

Selecting Features Within Another Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211 Checking a Table for Selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211 Returning All Columns From a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 Changing the Map View Following a Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212

Event Arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213

Chapter 10: Creating Expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

Expressions Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215

Creating Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215

Where Clause – Boolean Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216

MapXtreme

8

Developer Guide

Table of Contents

Functions In Expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216

DateTIme and Time Expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217

Expression Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217

Chapter 11: Accessing Data from a DBMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

Accessing Remote Spatial Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222 Accessing Remote Tables Through a .TAB File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222 Accessing Remote Tables Without a .TAB File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222 Mapping DBMS Data with X/Y Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223 Accessing Data from Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223

Geometry Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223 Oracle Support for Z and M Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224 SDO_GEOMETRY Arc and Circle Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225 Visualization of Non-translatable Oracle Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . .225 Centroid Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225 Oracle Spatial Reference Support (SRID) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225 OCI Connection Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226

Accessing Data from MS SQL Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226

SQL Server 2008 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226

DBMS Connection String Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229

ODBC Connection String Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229 ODBC Layers and Pooling in Web Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230 Oracle Spatial Connection String Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230 Sample Connection Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230

Defining Mappable Tables in Server Table Queries. . . . . . . . . . . . . . . . . . . . . . . . . . .231

The Geometry Column. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231 The Key Column(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232

Accessing Attribute Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233 Performance Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233 Working with the Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234

What Is the Cache? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234 How the Cache Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234 The TableInfoServer Object and the CacheSettings Property . . . . . . . . . . . . . . . . . . .235

The MapInfo_MapCatalog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236

Loading Spatial Data to DBMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237 Manually Creating a MapInfo MapCatalog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237

Adding Rows to the MapInfo_MapCatalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239 Per-Record Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243

Symbol, Pen, Brush Clause Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244 Text Objects Limitation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244

Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .245

MapXtreme

9

Developer Guide

Table of Contents

Chapter 12: Adding Mapping Capability to Your Applications . . . . . . . . . . . . . 246

Introduction to the MapInfo.Mapping Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . .247 Base Mapping Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247

MapExport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247 Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248 MapFactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248 MapLoader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249 MapViewList, MapView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249 MapControl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249

Layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250

FeatureLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250 Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250 MapLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251 UserDrawLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251 ObjectThemeLayer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251 GroupLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251 LabelLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251 GraticuleLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251 Layer Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251 IVisibilityConstraint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .252 Code Example: Animation Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .252

Labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253

LabelLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254 LabelSource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254 LabelModifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254 ILabelSourceFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255 LabelProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255 Generating Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255 Label Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256 Label Layer Selectability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256 Code Example: Creating a LabelLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256 Curved Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257

Adornments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257

Legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258 ScaleBar Adornment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258 Title Adornment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259

Feature Style Modifiers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259

FeatureStyleModifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .260 FeatureStyleModifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .260 FeatureOverrideStyleModifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .260

Printing Your Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261

MapXtreme

10

Developer Guide

Table of Contents

Chapter 13: Finding Locations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

Functional Overview of Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263

The Find Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263 Matching Address Numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265 Matching with a Refining Boundary Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265 Find Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265

Overview of the Data.Find Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266

Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266

.FindAddressRange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .268 FindCloseMatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269 FindResult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270

Fine Tuning the Find Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272

Editing the Mapinfow.abb File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272

Chapter 14: Using Themes and Legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

Thematics Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279

Mapping.Thematics Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279 Modifier Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279 Object Themes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280

GraduatedSymbolTheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280

When To Use a Graduated Symbol Theme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281

PieTheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282

When To Use a Pie Theme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282 Printing a Map Containing Pie/Bar Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283

BarTheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283

When To Use a Bar Theme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283 Controlling Display Size for Pie and Bar Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . .284

RangedTheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284

When To Use a Ranged Theme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284 Types of Ranged Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .285

RangedLabelTheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286

When To Use a RangedLabelTheme Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286

Ranged Themes and Serialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287 IndividualValueTheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287

When To Use an IndividualValueTheme Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287

Creating an IndividualValueTheme with Custom Bitmap Symbols . . . . . . . . . . . . . .288 IndividualValueLabelTheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289

When To Use an IndividualValueLabelTheme Class. . . . . . . . . . . . . . . . . . . . . . . . . .289

IndividualValue Themes and Serialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289 DotDensityTheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290

When To Use a DotDensityTheme Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290

MapXtreme

11

Developer Guide

Table of Contents

Bivariate Thematic Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291

Legends Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291

Theme Legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292

Cartographic Legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292

Formatting a Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293

Chapter 15: Stylizing Your Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294

Overview of the MapInfo.Styles Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295

StyleFactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296

Style Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296

AreaStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296

BitmapPointStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296

CompositeStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297

SimpleInterior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297

Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297

FontPointStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297

GridStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297

RasterStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298

Hillshade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298

Inflection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298

SimpleLineStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298

BasePointStyle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298

BaseLineStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298

BaseInterior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298

StockStyles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299

TextStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299

SimpleVectorPointStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299

Pre-defined Styles and the StyleRepository Class . . . . . . . . . . . . . . . . . . . . . . . . . . .299

StyleRepository Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299

Using Styles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300

Styles and Layer Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300

Creating a Custom Bitmap Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300

Overriding Styles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301

FeatureOverrideStyleModifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301

Chapter 16: Spatial Objects and Coordinate Systems. . . . . . . . . . . . . . . . . . . . 302

Introduction to MapInfo.Geometry Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303 Geometries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303

Geometry Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304 FeatureGeometry Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305 Geometry Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .309

Including Your FeatureGeometry in a Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310

MapXtreme

12

Developer Guide

Table of Contents

Checking for Points in Polygons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311 Coordinate Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312

Creating a CoordSys Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313 Changing the Coordinate System of a Geometry Object . . . . . . . . . . . . . . . . . . . . . . .314 Determining the Coordinate System of a Map in MapControl . . . . . . . . . . . . . . . . . . .314 Adding Coordinate Systems to MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .315

Chapter 17: Working with Rasters and Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

Overview of the MapInfo.Raster Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .319 Raster Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .319

Raster Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .320 Raster Images and Coordinate Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321 Raster Reprojection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321 Raster Image Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321 Code Sample: Adding a Raster Image to a Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321

Raster Handlers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .322 Raster Handler Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323 Configuring Custom Raster Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324 Grid Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325

Grid Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326 Code Sample: Adding a Grid Image to a Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326 Code Sample: Retrieving Data from a Grid Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326

Grid Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .327 Grid Interpolators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .328

Inverse Distance Weighted (IDW) Interpolator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .328 Triangulated Irregular Network (TIN) Interpolator . . . . . . . . . . . . . . . . . . . . . . . . . . . .329 IInterpolator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329

Grid Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329

Grid Images and Inflections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .330 Inflection Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .330 Calculating Inflection Values and Colors for a Grid Layer . . . . . . . . . . . . . . . . . . . . . .331 Relief Shading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .331 Grid Style Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332 GridInfoForm Sample Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334

Chapter 18: Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335

Overview of the MapInfo.Geocoding Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . .336

Main Geocoding Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .336

GeocodeRequest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337

GeocodeResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337

GeocodeClientFactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337

GeocodingConstraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338

MapXtreme

13

Developer Guide

Table of Contents

AddressCandidates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338 BaseGeocodeMatchCode and GeocodeMatchCode . . . . . . . . . . . . . . . . . . . . . . . . . .338 CandidateAddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338

Understanding the Geocoding Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338

Geocoding Trade-offs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338 A Few Words About Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .339 What are Custom User Dictionaries?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340 What is World Geocoding? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340

Geocoding a Location. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340

Street Address Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341 Street Intersection Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .342 Postal Code Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343 Gazetteer Type Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343 Batch Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343

Using Constraints for Accurate Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343

What are the Match Constraints?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .344 Impact of Relaxing Match Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346

Understanding Accuracy for Close Matches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346

Single Close Match (S Category). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .347 Best Match from Multiple Candidates (M Category) . . . . . . . . . . . . . . . . . . . . . . . . . .348 Postal Code Centroid Matches (Z Category) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .348 Geographic Centroid Matches (G category) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .348 Non-Match Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349

Chapter 19: Web Map Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350

Introduction to MapXtreme’s Web Map Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351 Understanding WMS Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351

Using MapXtreme as a WMS Client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352

Code Example: Requesting a WMS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354 WMS and Coordinate Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354

Map and Image Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354

MapXtreme WMS and Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355

Basic Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355

Setting up a MapXtreme WMS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356

Step 1: Create a Web.config File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356 Step 2: Create a Valid WMS Configuration File for Hosted Data. . . . . . . . . . . . . . . . .357 Step 3a: Configure and Test the WMS Server using IIS7 . . . . . . . . . . . . . . . . . . . . . .361 Step 3b: Configure and Test the WMS Server with IIS6 . . . . . . . . . . . . . . . . . . . . . . .362

Configuring Layer Information for a WMS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . .365

MapXtreme

14

Developer Guide

Table of Contents

Chapter 20: Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369

Overview of MapInfo.Routing Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370

Main Routing Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370

Calculating Routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371

Point-to-Point Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371

Multi-Point Routing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .372

Matrix Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373

Advanced Route Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374

Routing Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374

Driving Directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375

Route Geometry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .376

Avoiding Points, Features, and Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .376

Time-Based Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377

Iso Routing (Drive-Time and Drive-Distance) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .378

Creating an IsoChrone (Drive-Time) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .379

Creating an IsoDistance (Drive-Distance) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .382

Updating a Request Using Routing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383

Returning Segment Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383

Transient Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .384

Chapter 21: Linear Referencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388

What is Linear Referencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .389 Using M values for Linear Referencing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .389

Measure Value Determination Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391 Linear Referencing Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391 Dynamic Segmentation Operation (PerpendicularOffset) . . . . . . . . . . . . . . . . . . . . . .392

Curve Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .392 Linear Referencing Sample Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393

Chapter 22: Web Feature Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394

Web Feature Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395 Understanding WFS Server Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395 Configuring a WFS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .400

Step 1: Create a Web.config File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .400 Step 2: Create a Valid WFS Configuration File for Hosted Features . . . . . . . . . . . . . .401 Step 3: Configuring and Testing the WFS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . .403

Using the MapXtreme WFS Client Programmatically . . . . . . . . . . . . . . . . . . . . . . . . .406

Using Filters in WFS Queries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .406

Creating a Map Layer from a WFS Response. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .409

MapXtreme

15

Developer Guide

Table of Contents

Chapter 23: Workspace Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413

Features of the Workspace Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .414

Workspace Format and Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .415

Workspace Manager Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .415

File Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .415

View Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .418

Map Menu Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .418

Tools Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .421

Extensions Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .424

Layer Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425

Layer Control Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425

Layer Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425

Layer Control Tabs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427

Map Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427

Layer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .431

Theme Layer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .432

Label Layer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .433

Group Layer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .436

Style Override Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .436

Graticule Layer Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .436

Using Workspace Manager Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .438

Enhanced Rendering with GDI+ Translucency and Anti-Aliasing . . . . . . . . . . . . . . . .438

Creating Translucent Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .440

Curved Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443

Graticule Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .446

Chapter 24: Using the GeoDictionary Manager . . . . . . . . . . . . . . . . . . . . . . . . . 449

Using the GeoDictionary Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450 Changes in the GeoDictionary Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450 The GeoDictionary Manager’s User Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450

Run GeoDictionary Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450

The GeoDictionary File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453

Sample .dct file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453

Appendix A: How to Create and Deploy a MapXtreme Application . . . . . . . . . 456

Customizing MapXtreme Samples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .457

Building a Desktop Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .457

Running a Sample Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .457

Modifying Your Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .458

Building Under Release Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .464

Packaging Your Desktop Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .465

Deploying Your Desktop Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467

MapXtreme

16

Developer Guide

Table of Contents

Building a Web Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467

Running a Sample Web Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467 Modifying Your Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .469 State Management Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .471 Configuring for Release Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .472 Packaging Your Web Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .472 Deploying Your Web Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .475

Appendix B: Customizing MapXtreme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

Customizable Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .478

MapInfo.Data.Provider Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .478 ADO.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .478 Engine.CustomProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .478 Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .479 FeatureStyleModifier or FeatureOverrideStyleModifier . . . . . . . . . . . . . . . . . . . . . . . .479 UserDrawLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .480 Windows.Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .481 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .482 Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .483 GmlFeatureCollection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484 WorkSpacePersistence and WorkSpaceLoader . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484

Workspace Manager Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .485

Creating a Workspace Extension. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .485 Loading Your Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .487 Unloading Your Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .488 Sample Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .488

Location of Application Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .489 Find Abbreviation File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .491

Appendix C: Understanding the MapInfo Workspace . . . . . . . . . . . . . . . . . . . . 492

What is the MapInfo Workspace? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .493 Structure of a Workspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .493

Header Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .494 Connection Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .494 DataSource Definition Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .495 Map Definition Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .495

Creating an .MWS Workspace Programmatically from a .GST . . . . . . . . . . . . . . . . . .497

Appendix D: Extensible Data Providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .500

Extensible Data Provider Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .500

Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .502

Required Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .504

MapXtreme

17

Developer Guide

Table of Contents

Optional Building Blocks: Base Classes, Helpers and Utilities . . . . . . . . . . . . . . . . .506 Sample: COTW (Center of the World) Data Provider . . . . . . . . . . . . . . . . . . . . . . . . . .507 Optional Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .509

IDataSource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .509 IDataSourceDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .509 ITableModifyProcessor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .509

Building and Testing Your Data Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .510 SpatiaLite Sample Data Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .511 Advanced Topics / Important Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .512

Creating Geometries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .513 Coordinate Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514 Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514 Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .515 Persistence Providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .516 Serialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .518 Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .521 Thread safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .524

Appendix E: Printing From MapXtreme Applications . . . . . . . . . . . . . . . . . . . . 526

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .527 Understanding the Print Options in MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . .527

Printing Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .528 Special Transparent Raster Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .528 Special Transparent Vector Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .528 Display Raster in True Color When Possible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .529 GDI+ Translucency and Anti-Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .529 Dither Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530 Special Polygon Hole Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530 Scale Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530 Print Directly to Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531 Print Using Enhanced Metafile (EMF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531

Implementing Printing in Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531 General Printing Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .533

Printing a Legend in Your Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .533

Resolutions to Known Printing Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .536

Platform Independent Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .536 Platform-Specific Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .537

Appendix F: Style Lookups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540

Fill Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .541

Understanding the Index Numbering Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .541

Line Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555

MapXtreme

18

Developer Guide

Table of Contents

Vector Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556

MapInfo Arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556

MapInfo Cartographic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556

MapInfo Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557

MapInfo Oil &Gas. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557

MapInfo Shields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557

MapInfo Real Estate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .558

Map Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .558

MapInfo Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .558

MapInfo Transportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .559

MapInfo Weather . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .559

Custom Symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .560

MapXtreme Icons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .562

Appendix G: Defining the MapInfo Codespace. . . . . . . . . . . . . . . . . . . . . . . . . . 565

Defining the MapInfo Codespace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .566

Appendix H: Elements of a Coordinate System . . . . . . . . . . . . . . . . . . . . . . . . . 571

Projections and Their Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .572

Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .573

Projection Datums. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .576

Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .585 Coordinate System Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .586

Datum Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .588 Custom Datums. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .588

Defining Custom Datums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .589

National Transformation v. 2 (NTv2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .593 Information on Coordinate Systems and Projections . . . . . . . . . . . . . . . . . . . . . . . . .596

Appendix I: User-Defined Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598

Metadata and the MapCatalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .599 User-Defined Metadata Support for TableInfoServer Queries . . . . . . . . . . . . . . . . . .599

ColumnHints Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .599

Appendix J: Migrating to MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603

Comparing MapXtreme’s Object Model to MapX . . . . . . . . . . . . . . . . . . . . . . . . . . . . .604

Specific Object Model Implementation Differences . . . . . . . . . . . . . . . . . . . . . . . . . . .604

Appendix K: Localization Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614

Localization Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .615

System Requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .617

How to Use the Localization Kit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .617

Building the Satellite Assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .618

MapXtreme

19

Developer Guide

Table of Contents

Building from the Command Line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .618

Private Key Signing for Satellite Assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .620

Appendix L: Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621

Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .622

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629

MapXtreme

20

Developer Guide

1

Introduction to MapXtreme

Welcome Developers to Pitney Bowes Software’s latest offering in the world of

.NET programming. In support of Microsoft’s .NET Framework for Windows, MapXtreme reflects a single object model for developing or extending mapping applications for the desktop, traditional client/server environments or the Web.

MapXtreme is an application development tool for organizations who recognize that data visualization and mapping can help you make better business decisions and manage assets and operations more effectively. MapXtreme is for organizations that need to incorporate location analysis or definition into desktop, client/server and web-based products. MapXtreme can be used as a powerful analysis toolkit to make critical business decisions such as optimal locations for sales offices, how to transport products most efficiently, and how to manage and protect assets. Developers can use MapXtreme to shorten their development time and improve performance, reliability, and security.

In this chapter:

Overview of MapXtreme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22Migrating to MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24Learning to Use MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26

Chapter 1: Introduction to MapXtreme

Overview of MapXtreme

Overview of MapXtreme

MapXtreme is Pitney Bowes Software’s premier Windows software development toolkit that allows

.NET-experienced developers to create powerful location-enhanced desktop and client/server applications.

From this single SDK, you can develop applications using your favorite .NET programming language, share and reuse code between desktop and web deployments, access data from a wide variety of sources using standard protocols, and more.

This is all possible through MapXtreme’s object model, an API of 100 percent managed code that was developed on Microsoft’s .NET Framework. The Framework’s Common Language Runtime (CLR) provides the foundation that makes simplified development a reality.

The following components and features are included in MapXtreme:

Product framework: The MapXtreme Object Model is built using the Microsoft .NET Framework 4.0. See Object Model Overview for more information.

Development Environment Tools: A variety of templates, controls, sample code and tools help you develop Windows Forms and ASP.NET applications within Visual Studio. You can extend some of these components to provide more advanced functionality available through the object model. Two data management utilities are included for managing tables that you will use in your application (Geodictionary Manager) and manage workspaces for ease of use and portability (Workspace Manager). See Chapter 5: Web Applications, Controls, and Tools and

.Chapter 7: Desktop Applications, Controls, Dialogs, and Tools.

Full Mapping and Analytical capabilities: Map creation and display, data access, thematic mapping, raster and grid handling, object processing and presentation, and more.

Scalable Infrastructure: Session object pooling and caching capabilities offer big performance gains for web applications. Maintain session and user information by saving information to MapXtreme’s XML-based workspace format. See Chapter 9: Working with Core MapXtreme Classes.

Runtime Deployment: MapXtreme uses Windows Installer technology (merge modules) that developers can use to install or redistribute runtime components used in deployed applications. See Deploying Your Application.

Extensive Documentation: Product documentation is at your fingertips as integrated components in the Visual Studio development environment. The MapXtreme Learning Resources page keeps you connected to all product resources, including what’s new and changed in this release. It’s available from the Start menu.

Key Features

MapXtreme is packed with features and conveniences to help you build your Windows Forms or ASP.NET Web applications efficiently. Regardless if you are making the map the cornerstone of your application or are adding some basic mapping functionality to support your existing application, the framework and tools you use are the same. Here is an overview of MapXtreme’s capabilities:

If you are new to Pitney Bowes Software’s mapping products, be sure to also see Chapter 3: Mapping Concepts for additional help on the basics.

MapXtreme v7.1

22

Developer Guide

Chapter 1: Introduction to MapXtreme

Overview of MapXtreme

For developers upgrading to MapXtreme, see the Release Notes for what’s new and changed in the product. See also Migrating to MapXtremefor a mapping of features in MapX to features in MapXtreme .NET.

Feature *

Purpose

Tables, Layers, Features

Maps in MapXtreme consist of geographic features like point

 

locations, boundaries and street networks. The feature information

 

is stored in tables and display in the map as layers.

 

 

Data access

MapXtreme supports data from a wide variety of sources, including

 

spatial and non-spatial RDBMS, MS Access, dBase and ASCII, as

 

well as its own native type the MapInfo Table (.TAB). All data

 

operations are carried out via the MapInfo.Data namespace.

 

Operations include adding and removing tables, and inserting,

 

updating and deleting records from a variety of data sources.

 

.NET Dataset Provider support: allows any ADO.NET dataset

 

provider to be treated as a table in MapInfo.Data. This will allow you

 

to use external non-mappable data.

 

 

Web Services

MapXtreme provides clients and APIs for you to access several

 

popular web services: geocoding, routing, WMS and WFS.

 

 

Selections and Searches

This common mapping operation allows you to find just the data

 

that matches your criteria, by using attributes or spatial queries.

 

 

Thematic mapping

One of the most widely used ways of analyzing your data is to show

 

the visual relationship and underlying data through theme maps.

 

MapXtreme supports the creation and use of six themes: ranged,

 

individual value, graduated symbol, dot density, and pie and bar

 

charts.

 

 

Labeling

MapXtreme provides a sophisticated labeling capability for you to

 

label features with names or other information (column data or

 

expressions), and create ranged and individual value themes on

 

the labels themselves to impart your message without relying on

 

text alone.

 

 

Map Styling

Labeling is one form of map styling that you can control on your

 

map in nearly infinite ways. Style also refers to the color, patterns,

 

fonts, line styles and symbols of map features that is used in many

 

areas of MapXtreme, including features, adornments (map titles),

 

dialog boxes and text.

 

 

MapXtreme v7.1

23

Developer Guide

 

 

Chapter 1: Introduction to MapXtreme

 

 

Migrating to MapXtreme

 

 

 

 

Feature *

Purpose

 

Geographic processing and

This refers to making new features from existing ones, such as

 

analysis

combining postal code boundaries to create sales territories. It also

 

 

refers to using the feature’s location coordinates to learn more

 

 

about its relationship to other features. For example, create a buffer

 

 

around a point that measures five miles in radius to find out what

 

 

other points fall within the buffer zone.

 

 

 

 

Projections and Coordinate

These are ways of representing locations on a two-dimensional

 

Systems

map. Knowing the coordinate system of your data allows you to line

 

 

up features properly for accurate display and measurement.

 

 

MapXtreme supports a wide variety of projections and coordinate

 

 

systems and provides information for creating your own.

 

 

 

 

 

 

* Some features or tools in this product may not be supported for some languages or in some regions. Please consult your local customer service representative for details.

Migrating to MapXtreme

The following is a table that compares features and functionality from MapX and MapXtreme v3.0 with that of MapXtreme .NET. As with any new architecture of a product, note that the equivalent may not be exact. Use the MapXtreme topics in the right column of this list to find further details elsewhere in this Developer Guide and in the online help and object model. A full list of the MapX object model and the equivalent functionality in MapXtreme is covered in Appendix J: Migrating to MapXtreme.

 

MapX5.0 /MapXtreme3.0

MapXtreme

 

 

 

 

Map object

Map class: holds collection of Layers.

 

 

MapControl: way to view a map on a form.

 

 

MapInfo.Mapping namespace

 

 

 

 

MapXBroker

Session class: starting point for all MapXtreme-based

 

 

applications.

 

 

Related topics: MICommand, Catalog, Pooling

 

 

MapInfo.Engine namespace

 

 

 

 

Layer-centric model

Tablecentric model

 

 

Related topics: Table metadata (TableInfo class), Feature class,

 

 

Column class (MI_Geometry, MI_Style, MI_Key), MapInfo

 

 

ADO.NET data provider.

 

 

MapInfo.Data namespace

 

 

 

 

 

 

MapXtreme v7.1

24

Developer Guide

 

 

Chapter 1: Introduction to MapXtreme

 

 

Migrating to MapXtreme

 

 

 

 

MapX5.0 /MapXtreme3.0

MapXtreme

 

 

 

 

Datasets, data binding

Add a temporary column to an Table using the

 

 

Table.AddColumns() method.

 

 

Related topic: Geodictionary Manager

 

 

MapInfo.Data namespace

 

 

 

 

Geosets. Geoset Manager

Workspaces (.MWS): XML format. Geosets are supported.

 

 

Related topics: Workspace Manager.

 

 

MapInfo.Persistence namespace

 

 

 

 

Annotations

Adornments: a Legend, a Title, a Scalebar, or some other similar

 

 

user-defined object in a single map.

 

 

MapInfo.Mapping namespace

 

 

 

 

Thematic mapping

Same thematic map types. Themes are no longer layers.

 

 

Related topics: ModifierThemes (graduated symbol, pie and bar

 

 

themes), ObjectThemes (ranged, individual value, dot density

 

 

themes.

 

 

MapInfo.Mapping.Thematic namespace

 

 

 

 

Feature layer and Feature

FeatureGeometry: all geometries are now objects. Includes point,

 

Collections

multipoint, curve, multicurve, polygon, multipolygon ring.

 

 

Geometries include rectangle, rounded rectangle, ellipse, legacy

 

 

arcs, legacy text.

 

 

Related topics: CoordSysFactory (registered coordinate systems),

 

 

object processing (see FeatureProcessor, below)

 

 

MapInfo.Geometry namespace

 

 

 

 

FeatureFactory

FeatureProcessor class: object processing Buffer, Combine,

 

 

Intersection, ConvexHull.

 

 

Related topic: Difference (formerly Erase) in FeatureGeometry

 

 

class.

 

 

MapInfo.Geometry namespace

 

 

 

 

Tools

Desktop tool SelectRegion can assign to mouse buttons and

 

 

configure mouse wheel for zooming.

 

 

MapInfo.Tools namespace

 

 

 

MapXtreme v7.1

25

Developer Guide

 

 

Chapter 1: Introduction to MapXtreme

 

 

Learning to Use MapXtreme

 

 

 

 

MapX5.0 /MapXtreme3.0

MapXtreme

 

 

 

 

Raster and Grid Images

New table structure, RasterImageInfo, GridImageInfo.

 

 

Related topics: controllable styles: brightness, contrast,

 

 

color/grayscale, translucency, one-color transparency.

 

 

MapInfo.Raster namespace

 

 

 

 

Label objects and Label

LabelLayer: allows the separate ordering of labels and layers.

 

collections

LabelSource: information from the data source that is used for

 

 

labeling.

 

 

MapInfo.Mapping namespace

 

 

 

 

Selection object

Selection class: a multi-feature collection of lists of features that

 

 

are tied to a table.

 

 

MapInfo.Engine namespace

 

 

 

 

Spatial Server connectivity

MI ADO.NET data providers, MapInfo SQL language.

 

 

MapInfo.Data namespace

 

 

 

 

Style Object

Style class: new object model. Styles are now objects, not

 

 

properties of other objects; information is stored in column

 

 

MI_Style.

 

 

Related topics: FeatureStyleModifiers,

 

 

FeatureOverrideStyleModifiers in the MapInfo.Mapping

 

 

namespace.

 

 

MapInfo.Styles namespace

 

 

 

 

 

 

Learning to Use MapXtreme

MapXtreme has a lot to offer beginning and experienced .NET developers alike. This section describes several support mechanisms we have created to get you up and running quickly and with minimal disruption in your development timetable.

Support Resources

MapInfo is committed to supporting new MapInfo developers as well as our long time customers. We provide a wide variety of tools to help you make the transition or get up and running quickly in the Visual Studio environment with the following resources.

MapXtreme v7.1

26

Developer Guide

Chapter 1: Introduction to MapXtreme

Learning to Use MapXtreme

MapXtreme Learning Resources Page

Accessible from the Start Menu after you install MapXtreme, the Learning Resources Page brings together a wide variety of information about MapXtreme, including best development practices, code samples, tutorial web applications, links to all documentation and online resources on the MapInfo website, and much more. Refer to this page often to get comfortable with MapXtreme and as you continue to develop mapping applications that match your business needs.

Documents and Help Systems

This MapXtreme Developer Guide provides an overview of the MapXtreme development environment and namespaces. The Visual Studio-integrated Help System provides the more specific API-level information you need to use these tools to develop integrated Windows desktop and web-based applications with the MapInfo powerful mapping components. If you have comments regarding the documentation, you can send them to support.pbbi@pb.com.

The above-mentioned email address should not be used for questions specific to the software or clarification about subjects contained in the documentation. Please send those questions to Technical Support (see below).

If you are new to using or developing with MapInfo mapping products, be sure to see Chapter 3: Mapping Concepts.

To get the latest release information, be sure to download a copy of the MapXtreme Release Notes from the Pitney Bowes Software website.

Technical Support

Pitney Bowes Software offers unparalleled technical support for users of MapInfo software products. Our Technical Support department provides technical assistance to registered users of MapInfo software – so you don't need to be an expert in all aspects of our products in order to get results. See the Pitney Bowes Software Web site at www.pb.com/software for information on the tech support offerings.

MapXtreme v7.1

27

Developer Guide

2

Getting Started

This chapter provides all the information you need to install, configure, and deploy your first MapXtreme application.

In this chapter:

Installation Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29Types of Installations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30MapXtreme Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31Before You Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37Installing MapXtreme in Your Environment . . . . . . . . . . . . . . . . . .40Upgrading to MapXtreme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43Migrating Web Sites to 64-bit Web Applications . . . . . . . . . . . . . .43Creating Applications in Visual Studio . . . . . . . . . . . . . . . . . . . . .46Building ASP.NET Web Applications Without a Template . . . . . .50Deploying Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52

Chapter 2: Getting Started

Installation Requirements

Installation Requirements

Pitney Bowes Software Inc.has tested and supports MapXtreme on the following.

Architecture

64-bit

 

32-bit

 

 

 

Operating Systems

Windows 7 (x86, x64)

 

• Windows Vista with SP2 (x86 , x64)

 

• Windows Server 2008 R2 (x64)

 

• Windows Server 2008 with SP2 (x86 , x64)

 

• Windows Server 2003 R2 with SP2 (x86 , x64)

 

• Windows Server 2003 with SP2 (x86 , x64)

 

• Windows XP with SP3 (x86 , x64)

 

 

 

Development Framework and IDE

Microsoft .NET Framework 4.0

Support *

Visual Studio 2010 with SP1 (Professional, Premium,

 

 

Ultimate)

 

 

 

Browsers

Internet Explorer 8.0 , 9.0**

 

• Firefox 3.5 , 13 and higher

 

Chrome 20

 

 

 

For web application and deployment:

IIS 6 (Windows Server 2003)

 

• IIS 7 (Windows Vista, Windows Server 2008, and

 

 

Windows 7)

 

 

 

Supported databases

Microsoft Access 2007 and Excel 2007

 

Microsoft Access 2003

 

• Oracle 11G (11.1.0.6.0 and 11.1.0.7.0)

 

Oracle 10G, 10GR2

 

• Microsoft SQL Server 2012 (with SQL Native Client 11)

 

• Microsoft SQL Server 2008 (with SQL Native Client 10)

 

• MapInfo SpatialWare® 4.9 and 4.9.2 for Microsoft SQL

 

 

Server 2005

 

• MapInfo SpatialWare® 4.9.2 for Microsoft SQL Server

 

 

2008 32and 64 bit editions

 

 

 

For data access:

MDAC 2.8

 

 

 

 

 

 

*Recommended development environments (IDE). Others can be used, however, the MapXtreme installer will not integrate its templates, samples, and help system.

**The MapXtreme Learning Resources displays in Internet Explorer automatically, regardless of your default browser setting. This will not change your default browser setting.

MapXtreme v7.1

29

Developer Guide

Chapter 2: Getting Started

Types of Installations

MapXtreme does not support the Express Editions of Microsoft Visual Studio.

MapXtreme does not support the Borland Delphi development framework, nor does it support the Cold Fusion or HAHT Web development frameworks.

Minimum System Requirements

Memory

Windows 7: 1 gigabyte (GB) RAM (32-bit), 2 GB RAM (64-bit)

 

Windows Vista: 1 GB RAM

 

Windows Server 2008: 512 megabytes (MB) RAM

 

Windows Server 2003: 256 MB RAM

 

Windows XP: 256 MB RAM

 

 

Processor

Windows Vista, Windows 7: 1 GHz processor

 

Windows Server 2008: 1.6 GHz (x64) processor

 

Windows XP: 800-MHz Pentium III-class processor

 

 

Video Card

Graphics card that supports at least 256 colors

 

 

 

 

Types of Installations

MapXtreme provides two installation types: one for Development (SDK) and one for Deployment (Runtime). Each is selectable from the product CD Browser.

Development (SDK) Installations

The Development Installation installs the MapXtreme Software Development Kit (SDK) on your computer. Choose this installation to develop your desktop and web applications. Upon installation, this SDK is automatically integrated with Microsoft Visual Studio and works in conjunction with the

.NET Framework. The SDK provides C# and VB application templates for simplified development.

For instructions on how to install the SDK, see Installing MapXtreme in Your Environment. Instructions are also available from the Help buttons on the installation dialog boxes.

MapXtreme v7.1

30

Developer Guide

Loading...
+ 610 hidden pages