Development tools include an Internet Development Environment, MapXtreme sample applications, and MapXtreme code libraries.. Sample applications and code libraries are included for those
Trang 2One 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 marks of MapInfo Corporation All other marks used herein are the property of their respective owners.
trade-Contact MapInfo Corporation on the Internet at: http://www.mapinfo.com
WARNING: This software uses patented LZW technology for GIF image compression and/or decompression sys 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 con- cerning 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
(Uni-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 tion 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.
Corpora-MapInfo welcomes your comments and suggestions.
MapInfo MapXtreme
2000
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: uk@mapinfo.com email:germany@mapinfo.com
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
Trang 3New 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
Trang 8Geocoding Your Locations 187
Using Remote Geocoder 188
Understanding Result Codes 195
Trang 9Using 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
Trang 10Appendix 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
Trang 11New 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
full-of MapX shipped with MapXtreme v2.0), see the "What’s New in MapX" section full-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
Trang 12New methods to support the Paused/Resume functionality are listed below.
New Methods to Support the MapXBroker
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
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
Trang 13MapXCourier Functionality Changes and Additions
New Server Group Utility Functions
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
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
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
Trang 14New Object creation Methods
Four new object creation methods have been added to MapXCourier:
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
Trang 15MapXCourier, MapXServer and the MapMarker OCX) will continue to use
the icon to reflect creation status
Trang 17Chapter
Welcome to MapXtreme
MapXtreme is a mapping application server for
organizations who recognize that data visualization
and mapping can help them make better business
decisions and manage assets and operations more
effectively Why use mapping on your Internet/
Intranet site? MapXtreme's powerful functionality
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
Trang 18MapXtreme 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
Trang 19Learning 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
Trang 20MapXtreme 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 (http://testdrive.mapinfo.com/)
MapXtreme Discussion Area
The MapXtreme Discussion Area is available over the Web and is hosted by the MapInfo Test Drive Center (http://testdrive.mapinfo.com/)
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
Trang 21Chapter
Getting Started With
MapXtreme
The World Wide Web is being used in every aspect
of modern society To better serve the developers
and users of the Web, MapInfo developed
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
tool that helps experienced Web developers create
exciting and useful Web pages With MapXtreme,
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
➤ About MapX
➤ MapXtreme Components
➤ How MapXtreme Applications Run
➤ MapXtreme Installation
➤ Installing MapXtreme for a Production Environment
➤ Testing your Installation
➤ Fine Tuning and Performance Testing
2
Trang 22The 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 power 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
full-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
Trang 23About MapXData Binding
Your map can incorporate data from your remote data sources into your application
on top of the map)
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
Trang 24SpatialWare 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)
Trang 25MapXtreme 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
Trang 26Server Tools
Server tools are placed on your Web server machine The server machine must be a Windows NT machine in order to run MapX The MapXtreme application runs on the server machine and generates a map image to return to the user's browser Server tools include MapX, MapXtreme data, HAHTsite Scenario Server (optional), Remote Geocoder, Base Map Data Manager, Server Administrator, MapXstress Utility and Geoset Manager The server machine and development machine may be the same machine as long as it is running Windows 2000 and NT
MapX 4.5
MapInfo MapX is MapInfo Corporation's premier developer mapping product It
is a server-side ActiveX control for Windows 98 and Windows NT that supports Active X compatible environments Many of the features of MapX are
demonstrated in the sample applications
MapXtreme Data
The MapXtreme data includes several different geosets for the entire world See the MapXtreme Data chapter of this documentation to learn how to install the data for your application
MapXtreme Server Administrator
The MapXtreme Server Administrator verifies the server configuration after installation Use the Server Administrator to test or change your server
configuration
Remote Geocoder Client
The Remote Geocoder Client portion of MapXtreme is an application that allows site administrators to geocode the base map locations Geocoding is the process of assigning map coordinates to a database record containing address information MapInfo MapMarker may also be used to geocode base locations The Remote Geocoder takes your database of locations and creates a map layer of those locations The locations display as points on a map
Trang 27MapXtreme Components
Geoset Manager
Geoset Manager is an easy way to create new geosets or modify existing ones It allows you to add and remove layers, set zoom levels, set label properties, and alter other layer settings For a complete description of the Geoset Manager, see the Developing Your Application chapter of this book
Base Map Data Manager
Base Map Data Manager is a tool for managing seamless map layers Seamless map layers put several tables of the same type (e.g., county boundaries, water boundaries, highways, etc.) together and treat them as if they were one table For more information on the Base Map Data Manager, see the Developing Your Application chapter of this book
HAHTsite Scenario Server (Optional)
The HAHTsite Scenario Server is a multi-threaded piece of software that runs in conjunction with your Web server software It executes compiled dynamic pages and returns HTML to a user's Web browser The Scenario Server may be run on one or more systems separate from the system running the Web server See the Scalability section of this chapter to understand the advantages of running with a distributed model
Trang 28How MapXtreme Applications Run
Once the MapXtreme script has been created using the development tools, it is placed
on the Web server via file copy or HAHTsite publishing Once the script is on the Web server, it will be run when the web page is accessed For example, the user clicks a button on your Web page When the script runs, a call is made to the map engine The map engine is a general term for the objects and their methods and properties that provide access to MapX For a detailed description of the map engine, see the Map Engine chapter/topic Once the script interacts with the map engine, the map engine returns an image file, such as a gif or jpg file, that can then be placed on an HTML page and returned to the user's browser
The map engine's design allows different ways to access MapX Each of these ways allows you as the developer to change the scalability of your application The decision
on how to scale your application should be made before you begin developing your application
MapXtreme Scalability
Before installing the MapXtreme components, you should try to determine the expected traffic on the site MapXtreme offers scalability to handle different types of traffic on your site There are two types of scalability, vertical and horizontal
Vertical Scalability
Vertical scalability is achieved by optimizing one Web server through the use of the MapXBroker The MapXBroker is an optional part of the MapXtreme map engine discussed earlier In a low volume Web application, an instance of MapX is typically created upon application initialization, kept active for the duration of a user's session, and destroyed during application termination This scenario works
Trang 29How MapXtreme Applications Run
well when you have at most, 40 or 50 active users at any given time This means that you will have 40 or 50 instances of MapX active, one per user If an
application has hundreds or thousands of concurrent users, this becomes a problem This much activity running at once will slow machines down
considerably It is at this point of inefficiency that the MapXBroker can be used to optimize your site performance
The MapXBroker runs as a system service on your Windows 2000 or NT server Upon startup it creates a shared pool of MapX objects When the MapXtreme application needs to carry out a map related activity, it requests an instance of MapX from the MapXBroker, uses it to create a map, then frees the instance of MapX for the MapXBroker to share with another user This sharing of MapX objects enables a single server with moderate resources to support hundreds of simultaneous mapping sessions with a small pool of MapX objects
Another benefit of the MapXBroker is that the MapX objects are already running
at the time your application needs an object It is much faster to have the
MapXBroker issue a MapX object to a user than it is to start a new instance of MapX on the fly each time the user creates a map SpatialWare users will like this feature, as the pre-started instances of MapX can create their connection to the remote SpatialWare server at boot time as opposed to run time This can be a significant time savings and perceived performance enhancement for SpatialWare users
Vertical scalability can be used for all server deployments of MapXtreme For a basic example of a vertically scaled application, see the HelloBroker sample application For a more sophisticated example, see the SpatialWare SimpleQuery sample application
MapXtreme application using the MapXBroker.:
Trang 30Horizontal Scalability
Horizontal scalability is achieved by using the HAHTsite Scenario Server with a distributed configuration The Application Server can be installed on a single machine, or more than one machine in a distributed configuration In a single-machine configuration, the Web server and the HAHTsite Scenario Server reside
on a single machine The machine serves both static and dynamic pages A machine installation is the simplest installation configuration, and is suitable for most small and medium sized sites In a distributed configuration, the HAHTsite Scenario Server does not have to reside on the same machine as the Web server, and is often installed on more than one "host" machine
single-For detailed information on the HAHTsite Scenario Server and the distributed configuration, see the HAHTsite Scenario Server Administration Guide
Choosing Your Scalability Model
The scalability model that you choose for your site depends on the volume, state maintenance required, and use of the MapXBroker The volume must be determined according to your current or anticipated site traffic The state maintenance depends on the tasks that the application performs Applications that mostly pan, zoom, find, and search on a map require low state maintenance Applications that create features, use geographic queries, create thematic maps, and carry out more intense data access require high state maintenance
Trang 31MapXtreme InstallationMapXtreme Installation
Before You Install
MapXtreme’s installation process has been streamlined for improved usability Depending on your development environment, you may install components for HAHTsite, ASP, or other Web development environments Software will be installed
to both the Web server and the development machine for each development
environment
an application Please ensure that the information is correctly entered during the installation If you are unsure of the information, cancel the installation, obtain the information, and then run the MapXtreme Installer.The diagram below shows the relationship of the development machine to the Web server machine It should be noted that this is the simplest install option possible – all server components are on a single machine
Trang 32
Running the MapXtreme 2.5 Installer
The MapXtreme Installer will run automatically when placed in the CD drive of your computer If you have exited the installer and want to restart it, run Setup.exe from the root of the MapXtreme CD
The MapXtreme Installation is fairly straight forward In the diagram above, one can note that there are four basic components to MapXtreme They are: (1) Server Tools, (2) Sample Applications, (3) Data, and (4) HAHTsite Scenario Server These
components may be installed by following typical install steps you’d encounter when installing software They are:
1. Click on the desired component that you would like to install
2. In some cases, a list of sub-components will appear Click on those that pertain to your installation (e.g HAHTsite v ASP) In other cases, the
MapXtreme Installer automatically installs a group of sub-components
sub-component within MapXtreme
3. Accept the license agreement
Trang 33MapXtreme Installation
4. Confirm the location on your machine that the MapXtreme Component will install to
Note: Generally, it is best if you use the default locations so that all components
of MapXtreme work with each other correctly
5 Proceed with installation by clicking OK.
MapXtreme Components and Sub-Components
The table below lists the four components of MapXtreme and the sub-components within
Component Sub-Component Default Location(s)
Server Tools Install Server Tools:
• *C:\Program Files\Common Files\MapInfo Shared\MapX Common
(default location for the MapX OCX)
• **C:\Program Files\Common Files\MapInfo Shared\Common DLLs (default location for the MapMarker OCX)
• C:\Program Files\MapInfo\
MapXtreme\Programs (Default location for all other Install Server Tools)
Install Data Access Drivers:
• Install ASP Sample Applications
C:\Program Files\MapInfo\
MapXtreme\Projects 2.5\Haht <or> ASP
Data Install BaseMap Data C:\Program
Files\MapInfo\MapXtreme\Maps
Trang 34HAHTsite
Scenario
Server
• Install HAHTsite Scenario Server
• Install HAHTsite Scenario Workbench
C:\HAHTsite
Component Sub-Component Default Location(s)
Trang 35Installing MapXtreme for a Production Environment
Installing MapXtreme for a Production
Environment
Until now, the information provided has pertained to installing MapXtreme to a development environment (a single machine used to develop and run an application) rather than a production environment (one or moremachines running and
distributing the finished application over the internet)
application has been written and tested If you are installing MapXtreme for the first time, skip this section/topic, then come back to it after your application is ready
When your application is ready for internet publication, you will want to perform a distributed installation of MapXtreme
Installing with HAHTsite for a Production Environment
A HAHTsite environment will consist of a HAHTsite Fore ground/Controller Host machine and as many HAHTsite Background Host machines (e.g NT Server or Win
2000 Server machines) that are needed Refer to the HAHTsite documentation to determine how many HAHTsite Background Host machines are needed to run your application with optimal performance and reliability
The steps you will need to take to install to a production environment are as follows:
1. Install Server Tools to all HAHTsite Background Host machines
2. Install Data to all HAHTsite Background Host machines
3. Setup your Foreground/Controller Host on your web server machine
4. Publish your MapXtreme application to HAHTsite Fore Ground/Controller Host (this will push your application to HAHTsite Background Host machines as need dictates)
Installing with HAHTsite for a Production Environment
The steps you will need to take to install to a production environment are as follows:
1. Install Server Tools to a Web Server machine
2. Install Data to the same Webserver machine you installed the Server Tools to
3. Copy your completed application file to the appropriate IIS virtual directory
Trang 36Testing your Installation
After you have installed the components of MapXtreme that you need, it is important
to test your installation to ensure that you will not generate misleading install errors when trying to set up your first MapXtreme application This should be a three step process Here is an overview of what these steps are:
1. Run the Geoset Manager and open a geoset (e.g Us.gst) to use in an
application If there is a problem with the data (e.g one of the tables in the geoset can't be located) the Geoset Manager will return an error
2. Run the Server Administrator
still verify that the MapXCourier, MapXServer and MapX objects are all working correctly
3. Load the HAHTsite or ASP version of "Hello World" and make the
appropriate changes to the InitMapEngine() call based upon whether you want to use the MapXBroker
Step 1: Running the Geoset Manager
Use the Geoset Manager to keep a collection of map layers and their settings easily available to you Geosets help you to avoid the time consuming task of opening and displaying layers individually each time you want to work with them
Please refer to the MapX Developer’s Guide for detailed information on how to use the Geoset manager
Step 2: Running the Server Administrator
To run the MapXtreme Server Administrator and specify an image directory, follow the steps below:
1. Start -> Programs -> MapInfo MapXtreme -> Server Administrator
Trang 37Testing your Installation
2. If using IIS (Internet Information Server) the path MapInfo Corp
recommends your image directory in is: C:\Inetpub\wwwroot\MapImage.
If not using IIS, you may create a sub-directory off of your web server’s root directory
server access
3. Create a Virtual Directory using a web server configuration (Microsoft Management Console if using IIS) Use the text value in the Server Administrator’s MapImage text box (i.e "MapImage alias: <text value>") for the name of this directory, then point it to the directory specified for the MapImage Directory
4. Create a MapXBroker Group and enable it by checking the "Enabled" check box, or you may set the "Default" group's geoset to the MapXBrokerGroup you want your application to use You may go back and change the settings at another time
Trang 38Step 3: Running the "Hello World" Application
Test the installation of MapXtreme by publishing the Hello World sample application
to your Web server Specific instructions for HAHTsite and ASP publishing are detailed below
HAHTsite Users
1. Run HAHTsite The project name is "Hello World" If you need to open the project, it is located in C:\Program Files\MapInfo\MapXtreme\Projects 2.5\HAHT
2. Next, you must set the path for the include files that allow the use of the MapXtreme code libraries To add the path, choose Tools > Options from the menu bar
On the General tab, in the "Include" text box, enter the path of the MapXtreme code libraries If you chose the defaults for installation, the path should beC:\Program Files\MapInfo\MapXtreme\Lib
Now, HAHTsite will be able to find the Header files for the modules of the MapInfoHahtLibrary This is a one-time step The path is preserved in the HAHTsite Scenario Workbench and applies to all projects
3. Right click on the Sites folder in the Project window and choose New > Site The New Site dialog displays The list of available sites should include your Web server Select your Web site and click the Add button
Information for your Web server was obtained during the installation If the information was incorrectly entered, you will not have a valid site for publishing
4. The site description now appears in the Sites folder The red indicator shows
to which site the project will be published If the site indicated is not correct, right click on the correct folder and choose Set As Current
5. Choose Project > Publish All from the menu HAHTsite will begin publishing the code for Hello World to your Web server After publishing, a message displays stating that the project was successfully published
6. Click on Intro.htm in the Project window and choose Tools > Browse From Site Your Web browser will start and display the Introduction page of the Hello World application Follow the directions to display a map
Trang 39Testing your Installation
3. Copy the Hello World sample application from your development computer
to your Web server After you have copied the Hello World directory to your Web server, you will also need to copy the Lib directory to your Web server When you are done copying, you will have the following directories on your Web server:
• C:\Inetpub\wwwroot\MapXtreme\Hello World
• C:\Inetpub\wwwroot\MapXtreme\Lib
and your Web server, it is not necessary to copy these directories; the sample application source files are already on your Web server
4. On your Web server, define an IIS virtual directory that points to the sample application directory For example, if you are setting up the Hello World application, you could name this virtual directory "/hello" and you would define it so that it points to:
• C:\Inetpub\wwwroot\MapXtreme\Hello World
5. Make sure that your virtual directory has the "executable" property checked
6. If you have not already done so, create a virtual directory with the name
"/mapimage." This is the same directory that was specified when the Server Administrator was run at install time The MapEngine generates and exports all images to this directory
7. If you have not already done so, start the IIS or PWS service on your Web server The Hello World application is now ready to run
8. Run a Web browser and browse to the URL for the virtual directory that you created (http://your.machine.name/hello) The browser should display the default.htm file for the Hello World application Default.htm provides a link
to MapPage.asp; when you click that link, the application begins running
If you want to set up additional sample applications on your Web server, the process is very similar
Trang 40Note: Some of the steps described above only need to be performed once Specifically, you only need to create the "/mapimage" directory once, and you only need to copy the ib folder to your Web server once All of the ASP sample applications can use the same /mapimage directory and the same ib folder.
Some of the sample ASP applications require additional set-up work before they can run For example, the Hello Broker application requires that the MapXBroker service be started, and the Demographics application requires that you define a System DSN on the Web server For details on how to configure a particular sample application, see the HTML tutorial files provided with that sample application
Also, it is very important that you provide access rights for IUSR_<MACHINE NAME> and IWAM_<MACHINE NAME> on the MapImage directory when running ASP applications on Windows 2000