Professional Documents
Culture Documents
Version 6.8
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 MapInfo Corporation, One Global View, Troy, New York 12180-8399. 2008 Pitney Bowes Software Inc. All rights reserved. MapInfo, MapInfo Professional, the MapInfo logo and MapXtreme are trademarks of Pitney Bowes Software Inc. and/or its affiliates. Corporate Headquarters: Phone: 518 285 6000 Fax: 518 285 6070 Sales: 800 327 8627 Government Sales: 800 619 2333 Technical Support: 518 285 7283 www.mapinfo.com Contact information for all Pitney Bowes MapInfo offices is located at: www.mapinfo.com/contactus. Adobe Acrobat is a registered trademark of Adobe Systems Incorporated in the United States. ECW by ER mapper 19982001. LEAD Technologies, Inc. 1996. Products named herein may be trademarks of their respective manufacturers and are hereby recognized. Trademarked names are used editorially, to the benefit of the trademark owner, with no intent to infringe on the trademark. April 2008
Table of Contents
Chapter 1: Introduction to MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Overview of MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 Migrating to MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 Learning to Use MapXtreme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 Support Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
Developer Guide
Table of Contents
Upgrading to MapXtreme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Updating Existing Web Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Updating Existing Desktop Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Creating Applications in Visual Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Map Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 ASP.NET Web Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 MapXtreme Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Building ASP.NET Web Applications Without a Template . . . . . . . . . . . . . . . . . . . . . . 48 Deploying Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Deploying With the Runtime Installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Deploying With Your Own Installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Deploying a Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Deploying Applications that Access Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 MapXtreme Web Applications Behind Proxy Servers . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Permissions to Temp Directory for Deployed Web Applications . . . . . . . . . . . . . . . . . . 54 Application Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Table of Contents
MapInfo.Raster Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 MapInfo.Styles Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 MapInfo.WebControls Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 MapInfo.Windows Namespaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 MapInfo.Tools Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 MapInfo.Geocoding Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 MapInfo.Routing Namespace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 Application Architectures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 Web Application Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69 Desktop Application Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
Developer Guide
Table of Contents
Specialized Topics for Web Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Using Web Controls in Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Using the MapControl in Table Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Web Control Localization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Table of Contents
Developer Guide
Table of Contents
Selection Code Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Selecting Features Within Another Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Checking a Table for Selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Returning All Columns From a Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Changing the Map View Following a Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Event Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Table of Contents
Developer Guide
Table of Contents
Per-Record Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 Symbol, Pen, Brush Clause Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 Text Objects Limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
10
Table of Contents
Feature Style Modifiers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .242 FeatureStyleModifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243 FeatureStyleModifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243 FeatureOverrideStyleModifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243 Printing Your Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244
Developer Guide
11
Table of Contents
DotDensityTheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 When To Use a DotDensityTheme Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Bivariate Thematic Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Legends Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Theme Legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Cartographic Legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 Formatting a Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
12
Table of Contents
Developer Guide
13
Table of Contents
Understanding the Geocoding Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 Geocoding Trade-offs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 A Few Words About Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 What are Custom User Dictionaries?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 What is Geocoding World? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 Geocoding a Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 Street Address Geocoding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 Street Intersection Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 Postal Code Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 Gazetteer Type Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 Batch Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 Using Constraints for Accurate Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 What are the Match Constraints? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 Impact of Relaxing Match Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 Understanding Accuracy for Close Matches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 Single Close Match (S Category). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Best Match from Multiple Candidates (M Category) . . . . . . . . . . . . . . . . . . . . . . . . . . 330 Postal Code Centroid Matches (Z Category) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 Geographic Centroid Matches (G category) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 Non-Match Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
14
Table of Contents
Developer Guide
15
Table of Contents
16
Table of Contents
Other Customizable Aspects of MapXtreme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .464 ADO.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .464 Location of Application Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .464 Find Abbreviation File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .466
17
Table of Contents
MapInfo Shields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 MapInfo Real Estate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 Map Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 MapInfo Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 MapInfo Transportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 MapInfo Weather . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 Custom Symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
18
Introduction to MapXtreme
Welcome Developers to Pitney Bowes MapInfos latest offering in the world of .NET programming. In support of Microsofts .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: