Tải bản đầy đủ (.pdf) (400 trang)

Hướng dẫn Map xtreme NT

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (3.43 MB, 400 trang )

MapInfo
MapXtreme
for NT Edition
Developer’s Guide
v2.5
MapInfo Corporation
Troy, NY


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 MapInfo Corporation,
One Global View, Troy, New York 12180–8399.
©1992–2000

MapInfo Corporation. ALL RIGHTS RESERVED.

MapInfo Help ©1992–2000 MapInfo Corporation. ALL RIGHTS RESERVED.
MapInfo, MapInfo Professional, MapBasic, MapXtreme, MapInfo MapX, and the MapInfo Logo are registered trademarks of MapInfo Corporation. All other marks used herein are the property of their respective owners.
Contact MapInfo Corporation on the Internet at:

MapInfo Corporate Headquarters:

MapInfo Europe Headquarters:

Germany:

Voice: (518) 285-6000

Voice: +44 (0)1753.848.200


Voice: +49 (0)6142-203-400

Fax: (518) 285-6060

Fax: +44 (0)1753.621.140

Fax: +49 (0)6142-203-444

Sales Info Hotline: (800) 327-8627

email:

email:

US Government Sales: (800) 619-2333
Technical Support Hotline: (518) 285-7283
Technical Support Fax: (518) 285-6080

Toll-free telephone support is available in the U.S. and Canada.
Contact your MapInfo sales representative for details. For international
customers, please use the Technical Support Fax number.

WARNING: This software uses patented LZW technology for .GIF image compression and/or decompression. (Unisys United States patent No. 4,558,302 and corresponding patents in Canada, France, Germany, Italy, Japan and the
United Kingdom). GIF images compressed or decompressed for transmission via the Internet or via any other on–
line communication capability may not be sold or licensed for revenue, or used by an Internet Service Provider or in
paid advertisements unless the user first enters into a written license agreement with Unisys. For information concerning licensing, please contact: Unisys Corporation Welch Licensing Department C1SW19 Township Line & Union
Meeting Roads P.O. Box 500 Blue Bell PA 19424 Fax: 215–986–3090
Portions of the data are the proprietary information of Roadnet Technologies, Inc., a United Parcel Service Company,
and are Copyright 1993. Roadnet Technologies, Inc. Portions of the software are derived from the Standard C Library,
and are Copyright 1992, by P.J. Plauger, published by Prentice-Hall, and are used with permission.

This documentation reflects the contributions of almost all of the women and men who work for MapInfo Corporation. It was specifically produced by Max Morton. Colleen Cox, Editor. Juliette Funiciello-Vunk, Associate Editor.
These members of the Documentation Department are indebted to MapInfo’s Quality Assurance Department and, of
course, to all the members of the Engineering team who labored on this project.
MapInfo welcomes your comments and suggestions.

MapInfo MapXtreme
2000

2

MapInfo MapXtreme Developer’s Guide v2.5


New in MapXtreme 2.5 9
Welcome to MapXtreme 15
Hardware and Software Requirements . . . . . . 16
Learning to Use MapXtreme . . . . . . . . . . . . . . . 16
MapXtreme Information Resources . . . . . . . . . 18

Getting Started With MapXtreme 19
About MapX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
MapXtreme Components . . . . . . . . . . . . . . . . . 22
How MapXtreme Applications Run . . . . . . . . 26
MapXtreme Installation . . . . . . . . . . . . . . . . . . . 29
Installing MapXtreme for a Production Environment 33
Testing your Installation . . . . . . . . . . . . . . . . . . 34
Fine Tuning and Performance Testing . . . . . . 39

"Hello World'' Tutorial 43
Creating the Most Basic "Hello World" Application (HAHT) 44

Creating the Most Basic "Hello World" Application (ASP) 50

The Map Engine 55
MapX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
MapXServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
MapXBroker . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
MapXCourier. . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Developing Your Applications 67
Sample Applications . . . . . . . . . . . . . . . . . . . . . 68
Server Administrator . . . . . . . . . . . . . . . . . . . . . 72
The Geoset Manager and the Geodictionary Manager 81
BaseMap Data Manager. . . . . . . . . . . . . . . . . . . 82

HAHT Code Library 83
miMapEngine 84
AddMapLayer( ) function 84
AddMapServerLayer( ) function 85
CalcMapDistance( ) function 86
ConvertMapCoordsToScreen( ) function 86
ConvertScreenCoordsToMap( ) function 87
CreateMapAffineTransform( ) function 88
CreateMapBindLayer( ) function 88
CreateMapBitmapSymbols( ) function 88
CreateMapCoordSys( ) function 89

MapInfo MapXtreme Developer’s Guide v2.5

1



CreateMapDatum( ) function 89
CreateMapFeature( ) function 90
CreateMapFields( ) function 90
CreateMapNotesQueryInfo( ) function 91
CreateMapNotesViewInfo( ) function 91
CreateMapODBCQueryInfo( ) function 92
CreateMapParts( ) function 92
CreateMapPoint( ) function 93
CreateMapPoints( ) function 93
CreateMapRectangle( ) function 94
CreateMapStyle( ) function 94
ExportMapTo*( ) function 94
ExportMapToFile( ) function 95
FindMapLocation( ) function 95
GetMapAutoRedraw( ) function 97
GetMapBounds( ) function 97
GetMapCenter( ) function 98
GetMapDistanceUnits( ) function 99
GetMapDistanceUnitsAsString( ) function 99
GetMapGeoDictionary( ) function 99
GetMapGeoset( ) function 100
GetMapGeosetWidth( ) function 100
GetMapTitleText( ) function 101
GetMapVersion( ) function 101
GetMapVersionAsString( ) function 101
GetMapZoom( ) function 102
InitMapEngine( ) function 103
ReleaseMapEngine( ) function 104
ReleaseMapXCourier( ) function 104

RemoveMapLayer( ) function 105
SetMapAutoRedraw( ) function 105
SetMapBounds( ) function 105
SetMapCenter( ) function 106
SetMapCenterAndZoomIn( ) function 106
SetMapCenterAndZoomOut( ) function 107
SetMapCenterAndZoomTo( ) function 107
SetMapDistanceUnits( ) function 108
SetMapGeoset( ) function 108
SetMapLayerSymbolStyle( ) function 109
2

MapInfo MapXtreme Developer’s Guide v2.5


SetMapSize( ) function 110
SetMapTitleText( ) function 110
SetMapZoom( ) function 111
SyncMapLabelVisibility( ) function 111
ValidateZoom( ) function 112
miUtilities 113
BuildDynamicURL( ) function 113
CleanTempDir( ) function 113
CreateSemaphoreFile( ) function 113
CreateUniqueFileName( ) function 114
DeleteFiles( ) function 114
GetDirNameAsURL( ) function 115
GetTempDir( ) function 115
InsertReservedHTML( ) function 115
Normalizetime( ) function 116

ProperCaps( ) function 116
RemoveQuotes( ) function 116
ReplaceReservedHTML( ) function 117
WriteToFile( ) function 117
PutGIFImage( ) 118
miDebug 119
PrintEnvironmentVars( ) function 119
PrintFormFields( ) function 119
PrintMapEngine( ) function 119
PrintWebApp( ) function 120
WriteEnvironmentVars( ) function 120
WriteFormFields( ) function 120
WriteMapEngine( ) function 120
WriteWebApp( ) function 121
miErrorSystems.hbs 122
ClearError( ) function 122
DisplayError( ) 122
GetErrorDesc( ) function 122
GetErrorFuncName( ) function 123
GetErrorLogFile( ) function 123
GetErrorNum( ) function 123
HaveError( ) function 123
InitErrorSystem( ) function 124
SetError( ) function 124

MapInfo MapXtreme Developer’s Guide v2.5

3



SetErrorDesc( ) function 125
SetErrorFuncName( ) function 125
SetErrorLogFile( ) function 126
SetErrorNum( ) function 126
WriteErrorToLogFile( ) function 126
miJavaMapplet 128
PrintJavaApplet( ) function 128
SendJavaResponse( ) function 129
SetButtonVisibility( ) function 130
milayerUtilities 131
ShowLayersDialog( ) function 131
ApplyLayerSettings() function 131
miMapMarker 133
ConnectGeocoder( ) function 133
DisconnectGeocoder( ) function 133
Get_AddrMatches( ) function 133
Release_AddrMatches( ) function 134
MatchAddr_MM3( ) function 134
SetMatchRestrictions( ) function 134
SetOffset( ) function 135
ErrorDescription( ) function 135
ASP Code Library 137
miMapEngine 138
AddMapLayer( ) function 138
AddMapServerLayer( ) function 139
CalcMapDistance( ) function 139
ConvertMapCoordsToScreen( ) function 140
ConvertScreenCoordsToMap( ) function 141
CreateMapAffineTransform( ) function 141
CreateMapBindLayer( ) function 142

CreateMapBitmapSymbols( ) function 142
CreateMapCoordSys( ) function 143
CreateMapCourier( ) function 143
CreateMapDatum( ) function 144
CreateMapFeature( ) function 144
CreateMapFields( ) function 145
CreateMapNotesQueryInfo( ) function 145
CreateMapNotesViewInfo( ) function 146
CreateMapODBCQueryInfo( ) function 146
4

MapInfo MapXtreme Developer’s Guide v2.5


CreateMapParts( ) function 147
CreateMapPoint( ) function 147
CreateMapPoints( ) function 147
CreateMapRectangle( ) function 148
CreateMapStyle( ) function 148
ExportMapTo*( ) function 149
ExportMapToFile( ) function 149
FindMapLocation( ) function 150
GetMapAutoRedraw( ) function 151
GetMapBounds( ) function 152
GetMapCenter( ) function 152
GetMapDistanceUnits( ) function 153
GetMapDistanceUnitsAsString( ) function 153
GetMapGeoDictionary( ) function 154
GetMapGeoset( ) function 154
GetMapGeosetWidth( ) function 154

GetMapTitleText( ) function 155
GetMapVersion( ) function 155
GetMapVersionAsString( ) function 156
GetMapZoom( ) function 156
InitMapEngine( ) function 157
MapCourierExists( ) function 158
MapObjectExists( ) function 158
ReleaseMapEngine( ) function 159
RemoveMapLayer( ) function 159
SetMapAutoRedraw( ) function 159
SetMapBounds( ) function 160
SetMapCenter( ) function 160
SetMapCenterAndZoomIn( ) function 161
SetMapCenterAndZoomOut( ) function 161
SetMapCenterAndZoomTo( ) function 162
SetMapDistanceUnits( ) function 162
SetMapGeoset( ) function 163
SetMapLayerSymbolStyle( ) function 163
SetMapSize( ) function 164
SetMapTitleText( ) function 165
SetMapZoom( ) function 165
SyncMapLabelVisibility( ) function 166
UnInitMapEngine( ) function 166

MapInfo MapXtreme Developer’s Guide v2.5

5


ValidateZoom( ) function 166

miUtilities 168
CreateUniqueFileName( ) function 168
DeleteFiles( ) function 168
miDebug 170
PrintMapEngine( ) function 170
miErrorSystem 171
ClearError( ) function 171
GetErrorDesc( ) function 171
GetErrorFuncName( ) function 172
GetErrorLogFile( ) function 172
GetErrorNum( ) function 172
HaveError( ) function 172
InitErrorSystem( ) function 173
SetError( ) function 173
SetErrorDesc( ) function 174
SetErrorFuncName( ) function 174
SetErrorLogFile( ) function 175
SetErrorNum( ) function 175
WriteErrorToLogFile( ) function 176
WriteToFile( ) function 176
miJavaMapplet 177
PrintJavaApplet( ) function 177
SendJavaResponse( ) function 178
SetButtonVisibility( ) function 179
ShowLayersDialog() 179
ApplyLayerSettings() 180
miMapMarker 181
ConnectGeocoder( ) function 181
DisconnectGeocoder() function 181
Get_AddrMatches() function 181

Release_AddrMatches() function 182
MatchAddr_MM3() function 183
SetMatchRestrictions() function 183
SetOffset( ) function 184
ErrorDescription( ) function 185
Geocoding Your Locations 187
Using Remote Geocoder . . . . . . . . . . . . . . . . . . 188
Understanding Result Codes . . . . . . . . . . . . . . 195

6

MapInfo MapXtreme Developer’s Guide v2.5


Using MapMarker Locally. . . . . . . . . . . . . . . . 199
Using an Existing MapInfo Table . . . . . . . . . . 199

Java Mapping Applet 201
Features of the Java Mapping Applet . . . . . . 203
Learning the Java Mapping Applet . . . . . . . . 204
How the Java Mapping Applet Works . . . . . 206
Initialization of the Java Mapping Applet . . 206
Receiving Information Back from JMA . . . . . 210
Responding to the Applet . . . . . . . . . . . . . . . . 211

Appendix A: Glossary 213
Appendix B: Sample Data for MapXtreme 229
North American Geoset . . . . . . . . . . . . . . . . . . 230
World Geoset. . . . . . . . . . . . . . . . . . . . . . . . . . . 238
U.S Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

Australian Geoset . . . . . . . . . . . . . . . . . . . . . . . 247
Asia Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Japan Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
China Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
South Korea Geoset . . . . . . . . . . . . . . . . . . . . . 258
Europe Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . 260
France Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . 264
UK Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Germany Geoset . . . . . . . . . . . . . . . . . . . . . . . . 270
Italy Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Portugal Geoset . . . . . . . . . . . . . . . . . . . . . . . . . 276
Spain Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Israel Geoset. . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Argentina Geoset . . . . . . . . . . . . . . . . . . . . . . . 284
Brazil Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Canada Geoset. . . . . . . . . . . . . . . . . . . . . . . . . . 288
Mexico Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . 291
DC Geoset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Mid-Atlantic Geoset . . . . . . . . . . . . . . . . . . . . . 298
Other Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Demographics (DBF, Oracle DMP) . . . . . . . . 305
Copyright Information for MapXtreme Data 311

Appendix C: Code Library Quick Reference 321
MapInfo MapXtreme Developer’s Guide v2.5

7


HAHT Code Library Functions . . . . . . . . . . . . 321

ASP Code Library Functions . . . . . . . . . . . . . . 328

Appendix D: Troubleshooting 333
General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Active Server Pages . . . . . . . . . . . . . . . . . . . . . . 337
HAHTsite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

Appendix E: Find Nearest Widgets 341
Find Nearest Pages . . . . . . . . . . . . . . . . . . . . . . 342
Widgets and Forms . . . . . . . . . . . . . . . . . . . . . . 344
Search Page Widgets . . . . . . . . . . . . . . . . . . . . . 345
Map Page Widgets . . . . . . . . . . . . . . . . . . . . . . . 353
Java Map Page Widgets . . . . . . . . . . . . . . . . . . 361
Handler Page Widget . . . . . . . . . . . . . . . . . . . . 362

Appendix F: The MapXstress Utility 363
Session Configuration . . . . . . . . . . . . . . . . . . . . 363
Session Execution. . . . . . . . . . . . . . . . . . . . . . . . 372

8

MapInfo MapXtreme Developer’s Guide v2.5


What’s New in MapXtreme 2.5

New in MapXtreme 2.5
The following section descriptions of the new functionality added to MapXtreme 2.5.



MapX v4.5



MapXBroker Functionality Changes and Additions



MapXCourier Functionality Changes and Additions



MapXstress Utility



MapXtreme Server Administrator Updates

MapX v4.5
MapX is the mapping OCX from MapInfo Corporation that lets you easily embed fullpower mapping into applications. MapX is much more than a "map viewer." With
MapX it is easy to add powerful mapping capabilities to your application. You can
analyze and visualize your business data, create or edit map features, and display
results geographically. MapXtreme v2.5 now ships with MapX v4.5. For a detailed
overview of all functionality added to MapX since the MapX v3.52 release (the version
of MapX shipped with MapXtreme v2.0), see the "What’s New in MapX" section of the
MapX Developers Guide or The MapX Online Help System.

MapXBroker Functionality Changes and Additions
New Pause/Resume Functionality
The MapXBroker now has the ability to be Paused/Resumed through its

programming interface. The purpose behind this new functionality is to give users
(System Administrators, etc.) the ability to pause the MapXBroker, which prevents
elements from getting MapXServer objects, and then resume it again. One common
use of this would be to allow Sys Admins to update mapping data (the tables being
used by the instances of MapX inside the MapXServers) on the server when the
MapXBroker is paused.


What’s New in MapXtreme 2.5
New methods to support the Paused/Resume functionality are listed below.
Method

Description

MapXBroker::SetRunMode

The sRunMode input parameter can be set to one
of two values: 0 = PAUSE and 1 = RESUME
If the function succeeds, HRESULT will equal
S_OK, else it will equal an error code. If this
function fails, an error message will also be
logged to the Event Log.

MapXBroker::GetRunModeStatus

The pRunModeStatus output parameter can have
one of three values: 0 = PAUSED, 1 = PAUSING
and 2 = RUNNING

New Methods to Support the MapXBroker


10

Method

Description

GetServerGroupCount

Gets the number of server groups that are currently
running.

GetServerGroupName

Gets the name of a running MapXBroker server group at
the specified index location. The index is from 0 to
GetServerGroupCount()-1.The name of each server group
configured is located in the registry. However, they can
change in the registry after the MapXBroker has been
started. This method has been added in order to get the
names of the server groups the MapXBroker has while it is
running.

MapInfo MapXtreme Developer’s Guide v2.5


MapXCourier Functionality Changes and Additions
New Server Group Utility Functions
Method


Description

GetServerGroupCount()

Gets the number of server groups that are currently
running in the MapXBroker. The number of server
groups configured is located in the registry. However,
this number can change in the registry after the
MapXBroker has been started. This method has been
added in order to determine how many server groups
the MapXBroker has while it is running

GetServerGroupName

Gets the name of a running MapXBroker server group
at the specified index location. The index is from 0 to
GetServerGroupCount()-1.The name of each server
group configured is located in the registry. However,
they can change in the registry after the MapXBroker
has been started. This method has been added in order
to get the names of the server groups the MapXBroker
has while it is running.

New methods for accessing the MapXBroker's Pause/Resume
functionality
Two new methods have been added to the MapXCourier to Pause/Resume the
MapXBroker.
Method

Description


SetBrokerRunMode

There are two valid parameters for this method: 0 =
PAUSE and 1 = RESUME. If this function succeeds,
True is returned. If this function fails, False is returned
and an error is raised.

GetBrokerRunModeStatus

There are three values that can be returned from this
method: 0 = PAUSED, 1 = PAUSING and 2 =
RUNNING. If this function succeeds, True is
returned. If this function fails, False is returned and
an error is raised.

MapInfo MapXtreme Developer’s Guide v2.5

11


What’s New in MapXtreme 2.5

New Object creation Methods
Four new object creation methods have been added to MapXCourier:


CreateMapXLayerInfo()




CreateMapXRowValue()



CreateMapXRowValues()



CreateMapXVariables()

MapXstress Utility
MapXstress will help the MapXtreme server administrator determine the correct
number of MapXServers to configure per MapXBroker server group. The application
will simulate the execution of 1 or more clients against the MapXtreme server. You
will be able to configure a series of commands (such as zoom in, zoom out, pan, add
layer, export map image etc.) for each client to emulate the execution conditions of
your application. You will then be able to execute all the clients at once to determine
the number of MapXServers and/or the broker maximum wait time (the maximum
time a client waits for a MapX object from the broker).

XML Dataset Support
MapXtreme 2.5 includes a new MapX dataset driver for XML data. Based on the
emerging standards of the XML community, the new XML Dataset Driver allows
access to data obtained via native XML support built into such popular database
systems as Oracle and SQL Server. The new XML Dataset Driver allows integration
with OLAP services, which are useful for extending business to business and
customer relationship applications with spatial analysis and display.

MapXtreme Server Administrator Updates

The MapXtreme Server Administrator user interface has undergone a slight "face lift".
The following changes have been made to improve performance and usability:


The Courier/Broker and Geocoding property pages will be consolidated into
one called Runtime Status.



The Runtime Status property page will now use the streetlight

icon to

reflect the runtime status of the MapXBroker service. Other status (such as the

12

MapInfo MapXtreme Developer’s Guide v2.5


MapXCourier, MapXServer and the MapMarker OCX) will continue to use
the

icon to reflect creation status.

MapInfo MapXtreme Developer’s Guide v2.5

13



What’s New in MapXtreme 2.5

14

MapInfo MapXtreme Developer’s Guide v2.5


Welcome to MapXtreme
MapXtreme is a mapping application server for
organizations who recognize that data visualization
and mapping can help them make better business

1

Chapter

decisions and manage assets and operations more
effectively. Why use mapping on your Internet/

➤ Welcome to MapXtreme

Intranet site? MapXtreme's powerful functionality

➤ Hardware and Software
Requirements

enables you to create applications that help your
company decide where to market and sell, manage
and protect physical assets, and transport products
efficiently. Applications running on a managed

server network offer huge economies of scale
(lower hardware and administrative costs) while
dramatically improving application performance,
reliability, and security. Companies who once found
mapping cost prohibitive, can now deploy
applications at a lower cost per user than ever
before.

➤ Learning to Use MapXtreme
➤ MapXtreme Information
Resources


Hardware and Software Requirements
MapXtreme requires the following:
1. Windows NT 4.0 with no lower than service pack 1 on the Web server
machine.
2. Windows NT or Windows 2000 on the development machine with the ability
to move files to the server using either file copy (on a LAN) or using FTP.
3. A Web server installed and tested.
4. Internet Explorer or Netscape (version 4.0 or later) installed on the
development machine.
5. You must be logged onto the server using the administrator account.
6. You must know the following information for your Web server:


The physical location of the static pages on your Web server machine, also
referred to as the document tree directory.




The physical location of the CGI scripts directory on your Web server
machine, also referred to as the CGI-BIN Directory.



The logical location of CGI scripts on your Web server, e.g., Microsoft
Internet Information Server has a Scripts directory under the Web server
root, also referred to as the CGI-BIN URL



The base URL of your Web server, (e.g., www.MapXtreme.com), also
referred to as the server root URL.

Learning to Use MapXtreme
It is important to get your bearings on how you can best arrive at your completed
application. This User's Guide was created with the goal of giving you all of the
appropriate information to accomplish your task. First, you should read the "Getting
Started" chapter. The concepts discussed in this chapter must be understood prior to
installation because of the combination of software used to deliver a MapXtreme
solution. This chapter will help orient you to the basic workings of MapXtreme. Once
you understand the overview material, you should use it as you install MapXtreme.
At the end of the installation, you will publish a sample application to verify that all
components have installed correctly.

16

MapInfo MapXtreme Developer’s Guide v2.5



Learning to Use MapXtreme
Once you know that MapXtreme applications can be successfully published, the next
step is to understand how MapXtreme functions can accomplish your mapping tasks.
Novice Web developers may want to start with the tutorials in this User's Guide.
These tutorials demonstrate the most basic way to get a map to the user's Web
browser. For experienced Web developers, there are a series of MapXtreme sample
applications. Each sample application includes a tutorial in HTML that steps through
the application. For detailed descriptions of the tasks that each tutorial covers, see the
Sample Applications section of the Developing Your Application chapter of this book.
As you go through the tutorials, you will become aquainted with the MapXtreme
code libraries. The code libraries were developed to make your programming tasks
easier. For specific information on the code libraries, see the code library chapters in
this book. Use the code libraries to begin modifying the sample applications to fit
your needs.
After you have become comfortable with programming MapXtreme, the next step is
to create the appropriate maps to display. The MapXtreme Data chapter explains the
various maps included with the product. You may rearrange any of these maps. To
learn about arranging your data, see the Geoset Manager section of the Developing
Your Application chapter. To incorporate your own data in the maps, see the
Geocoding chapter. The Geocoding chapter explains how you can turn one of your
databases into a layer of points on the map using MapMarker, MapInfo's street-level
geocoding product (U.S. only).
Once you have created your application and added the appropriate data, you can
refer to the Developing Your Application chapter for information on managing your
site and application. The User's Guide is the best resource to start learning
MapXtreme. There are several other sources of information useful to MapXtreme
developers. They are listed in the next section.

MapInfo MapXtreme Developer’s Guide v2.5


17


MapXtreme Information Resources
MapXtreme Developer’s Guide
Use this as your primary hard copy reference for MapXtreme. Before trying to
develop your own MapXtreme application, you should read the "Getting Started"
chapter.

MapX Developer’s Guide
The MapX Developer’s Guide contains detailed descriptions of the properties and
methods of the MapX OCX and User/Reference Guide .

MapX Online Help
For further information on the MapX OCX, use the online help system. The online
help contains detailed descriptions of the properties and methods of MapX. It also
includes MapX User's Guide chapters and a Reference section.

MapXtreme Knowledgebase
The MapXtreme Knowledgebase is a database of collected information on MapXtreme
topics and other information that will be relevant to your application. You should
review this before running your application. You may access the Knowledgebase on
the MapInfo Test Drive Center ( />
MapXtreme Discussion Area
The MapXtreme Discussion Area is available over the Web and is hosted by the
MapInfo Test Drive Center ( />
Remote Geocoder Online Help
The Remote Geocoder online help includes step-by-step instructions on using the
geocoding wizard to give your data locations on the map.


18

MapInfo MapXtreme Developer’s Guide v2.5


Chapter Two: Getting Started with MapXtreme

Getting Started With
MapXtreme

2

Chapter

The World Wide Web is being used in every aspect
of modern society. To better serve the developers

➤ About MapX

and users of the Web, MapInfo developed

➤ MapXtreme Components

MapXtreme, software that enables you to create
Web pages with integrated mapping capability.
Using MapXtreme, Web users can display a map to
visualize data that would otherwise be lost in the
rows and columns of a typical database.
MapXtreme 2.5 is a server application development


➤ How MapXtreme
Applications Run
➤ MapXtreme Installation
➤ Installing MapXtreme for a
Production Environment

tool that helps experienced Web developers create

➤ Testing your Installation

exciting and useful Web pages. With MapXtreme,

➤ Fine Tuning and
Performance Testing

you will be able to deliver robust mapping
applications via the Internet or a corporate intranet.
Suppose that you are building a Web site for a real
estate company. One of the features they would like
to offer their customers is the ability to enter an
address and locate properties around that address.
Additionally, you could add an option to shade the
locale according to demographic data on crime,
economics, population, or even add an option to
locate schools, churches, hospitals, etc. As a user
enters this information, the application could be
used to gather the user's preferences, which could
then be used to create a profile.



Chapter Two: Getting Started with MapXtreme
The core of the mapping capability is MapX, MapInfo Corporation's industry leading
mapping component. It is a server side ActiveX control for Windows 2000 and NT
that supports Active X compatible environments. Because MapXtreme allows MapX
to run on the server side, no plug-ins are required in the client's Web browser.

About MapX
MapX is the mapping OCX from MapInfo Corporation that lets you easily embed fullpower mapping into applications. MapX is much more than a "map builder." With
MapX it is easy to add powerful mapping capabilities to your application. You can
analyze and visualize your business data, create or edit map features, and display
results geographically. The key features of MapX are listed below.

Oracle OCI
Communicate with Oracle databases through OCI.

XML Support
There is a new MapX dataset driver for XML data. Based on the emerging standards
of the XML community, the new XML Dataset Driver allows access to data obtained
via native XML support built into such popular database systems as Oracle and SQL
Server. The new XML Dataset Driver allows integration with OLAP services, which
are useful for extending business to business and customer relationship applications
with spatial analysis and display.

Seamless Maps
Seamless Maps allows you to extract specific data from multiple tables without
having to open each table in a single pass with a seamless map.

Thematic Mapping
Visualize your data with thematic mapping. Associate data with each feature on the

map, then use thematic styles to present your data visually. With thematic mapping,
you can see your data using any of seven different styles (bivariate, colored ranges,
dot density, individual values, graduated symbols, pie charts, and bar charts).

20

MapInfo MapXtreme Developer’s Guide v2.5


About MapX

Data Binding
Your map can incorporate data from your remote data sources into your application.

Annotations
Provide orientation, highlight specific data, and make your map more informative by
adding text, symbols, and labels.

Layering
Control the display of a map layer so that it displays only when a map's zoom level
falls within a preset distance. Certain types of applications are supported by special
layer types, such as UserDraw layer (for drawing special map elements, such as logos,
on top of the map).

Raster Images
Include a raster image (bitmap) underlay to give your map an attractive, detailed
background.

Automatic Labeling
Add labels to your maps automatically, as well as control their attributes and display.


Geographic Queries
Unleash MapX's analytical features by grouping and organizing data. Select map
features within a specific radius, rectangle, or specific points.

Projections and Coordinate Systems
MapX provides full support of coordinate systems and map projections, allowing you
to fine-tune the map's display and process X-Y data in native coordinates.

FeatureFactory
The FeatureFactory object allows you to combine, buffer, or erase point, line, and
region features.

Drill-down Mapping
Explore your data with point-and-click simplicity. For OLAP/Decision Support
Systems, users can drill down into a region on the map by pointing and clicking.

MapInfo MapXtreme Developer’s Guide v2.5

21


Chapter Two: Getting Started with MapXtreme

SpatialWare Connectivity
Connect to live data stored in MapInfo SpatialWare running on Oracle, Informix, or
other supported SpatialWare databases. Spatial servers allow companies to host their
map data in their enterprise databases for central management and security. Spatial
servers like SpatialWare offer advanced query processing and increased performance
on the server for an organization's spatial data. SpatialWare is also necessary for

applications that will require a great deal of map editing.

MapXtreme Components
MapXtreme combines several pieces of software and tools to simplify the process of
map-enabling your Web application. These pieces of software work in conjunction
with your current Web server. There are two major groups of software: development
tools and server software. These tools may reside on one machine or may be placed on
a development machine and server machine.

Development Tools
Development tools are placed on the computer that will be used for application and
site development. The development computer can be a Windows NT machine or a
Windows 98 machine. The development tools are used to write and modify
application scripts. The application scripts are then placed on the server machine.
Development tools include an Internet Development Environment, MapXtreme
sample applications, and MapXtreme code libraries. The development machine and
server machine may be the same machine as long as it is running the Windows NT or
Windows 2000 operating system.

Internet Development Environment
One of the development tools is the Internet Development Environment, which is
used to write the script and create the HTML pages for your application. MapX
can be used by any IDE that supports the use of an Active X control. Sample
applications and code libraries are included for those developing applications
using HAHTsite Scenario Workbench and for those developing in an IDE that
uses Microsoft Active Server pages (ASP).

22

MapInfo MapXtreme Developer’s Guide v2.5



MapXtreme Components
HAHTsite Scenario Workbench or Scenario Server are included in the MapXtreme
package. HAHTsite is an integrated tool for building industrial-strength Internet
and intranet Web applications. Part of the power of HAHTsite comes from the
HAHTtalk Basic scripting language that is compatible with Visual Basic. The
HAHTsite Application Server works in cooperation with off-the-shelf Web server
software. It executes the compiled HAHTtalk Basic code and can return standard
HTML to a user's browser.
HAHTsite Scenario Workbench is bundled with the MapXtreme software. If you
do not currently have a Web application environment installed, select the
HAHTsite Application Server from the MapXtreme installer.
HAHTsite Scenario Workbench works in conjunction with the HAHT Scenario
Server. The HAHT Scenario Server allows more options for scalability and is
described in the Server Tools section that follows.
HAHTsite Scenario Workbench and Server are not required to use MapXtreme.
Developers currently creating applications using an IDE with Active Server pages
should continue to do so. ASP is appropriate for those using Microsoft InterDev. If
you are creating Web applications for the first time and other areas of your
organization are using ASP, this would also be a good choice.
MapXtreme development is not limited to those using HAHTsite or an IDE that
uses Active Server pages. Any developers using an environment that can support
server-side ActiveX controls will be able to write MapXtreme applications.

Sample Applications
MapXtreme comes with a set of sample mapping applications that you can use as
the basis for your map-enabled Web applications. Each sample application
includes an HTML tutorial that explains how to develop similar code. The sample
applications are an excellent starting point for your own application.


Code Libraries
The MapXtreme code libraries contain functions that are common to the
development of Web-based mapping applications. Code libraries are available for
HAHTtalk Basic and ASP. These libraries have been developed to offer most of
the mapping capabilities needed for your Web applications.

MapInfo MapXtreme Developer’s Guide v2.5

23


Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×