Vendor
Undertow Software
26011 Lauren Drive
Channahon, IL 60410
Telephone: (815) 521-9950
Fax: (815) 521-9952
http://www.undertowsoftware.com
Price: $459.99
Introduction
MapOCX Pro v6.0 is a developer's toolkit for incorporating detailed
maps into a Windows programming environment. The product is not software
for end users, it simply provides developer tools to incorporate mapping
functionality into applications built within programming environments such
as Microsoft Visual Basic and/or Borland Delphi. For developers that want
to upgrade from a previous version of MapOCX, v6.0 is primarily a data
upgrade that includes street data from Geographic Data Technology (GDT),
along with several minor modifications.
The installation of the OCX file is performed by simply copying and pasting the OCX file from the CD provided with the software onto your hard drive. Once the OCX file is on your hard drive, you can add the toolkit as a component in Visual Basic. (See Figure 1) The MapOCX control will appear as a highway shield with a 6.0 in it on the Visual Basic Toolbar. You should use this button to add the control to a form. Once you have the control added to the form, right-click on the control to set the properties for the control. You should set the locations of the data on the Directories tab, and you'll have to register the product on the Installations tab the first time the product is used. (See Figure 2 for MapOCX control button and control properties)
Figure 1: Visual Basic Components
Figure 2: MapOCX control and properties
Functionality
Most common map functions to move around a map, such as panning and
zooming, can be executed with a single line of code. (ex. Pmap1.ZoomIn)
The map has preformatted scale dependent layers that turn on and off as
you zoom to different map scales. The map can be programmed to rotate to
user-specified orientations, which is helpful for in-vehicle navigation.
You can specify an underlay bitmap (such as a satellite or aerial photograph),
an overlay of standard drawing components, and other objects with assigned
properties. The MapOCX control is designed to work as a single instantiation,
meaning you should only place one map control on a form. You can create
a DirectDraw procedure to place a second map on the form if necessary.
MapOCX includes street-level map coverage from either the Census 2000 TIGER/Line files or from Geographic Data Technology. The toolkit provides procedures to locate geographic features such as zip codes, places, addresses and telephone numbers from the geographic data included with the product. The street-level coverage allows programmers to develop reverse geocoding procedures with MapOCX. The RiteRoute Automatic Route Calculation is a procedure for users to plan trips with advanced automatic route calculation.
Stock dialogs are preformatted dialog boxes that are included with the product to perform searches, print, utilize toolbars and perform street-level routing. Stock dialogs can be activated with a single line of code. For instance, Figure 3 shows the code required to add a preformatted toolbar to the Form after the code has been compiled and executed. The buttons on the toolbar activate a line of code to open the preformatted dialog boxes such as the Locate dialog box in Figure 4.
Figure 3: MapOCX map with preformatted toolbar
Figure 4: MapOCX Locate Stock Dialog Box
Distributing the Application
Once you have all the controls working correctly and the application
is ready for distribution, you can create an executable file within Visual
Basic for distribution to end-users. You can also create an installation
setup file in the VB environment that includes all the required files to
run the application. It is recommended that you include the Regsvr.exe
and oc30.dll files in your application setup file and install these files
in the Windows System directory. Undertow Software also recommends that
you install the MapPro.ocx file in the application directory when you install
the application.
Conclusion
MapOCX comes with a robust Reference Manual that provides sample code
for using MapOCX in the Visual Basic and Delphi programming environments.
The sample code was helpful for me to get me back into VB programming which
I haven't done in a few years. I was able to code some simple functionality
like zooming and panning, while using the stock dialogs to add some of
the more advanced functionality of the development kit to the map. MapOCX
includes a lot of the procedures and functions right out of the box for
developers that can be further customized to meet their end-user application
requirements.