 |
|
 |
 |
Extracting the Mappoint 2002 Points of Interest
Extract all 801,171 POIs from the North American version of Mappoint
into a database, for subsequent searches.
Introduction
While reviewing the threads on the Microsoft.Public.Mappoint newsgroup
I noticed that there was some interest in gaining access to the
Mappoint Points of Interest (POIs). My curiosity led me into
investigating the possibility of using the Mappoint object model to
extract the POIs from Mappoint and load them into a database. What I
found is that with a little code and some patience it was possible to
extract 801,171 POIs from the North American version of Mappoint.
This article explains how this can be done. Before getting started,
the reader must be fore warned that the use of the extracted data is
subject to Mappoint licensing agreements.
Assumptions
This article assumes that the reader is familiar with data access
using the Microsoft Data Access Components (MDAC) and using the
Mappoint 2002 Object Model within the Visual Basic development
environment.
The following items will be required to build and execute the
application described in this article:
- Mappoint 2002 North America
- Visual Basic 6.0
- Microsoft Data Access Components (MDAC) 2.6 or later (Note: if
"Microsoft ActiveX Data Object Library" can be referenced from Visual
Basic project then you already have MDAC installed otherwise you can
download it from the following location
http://www.microsoft.com/data/download.htm)
- Lat/Long Acquisition Algorithm (posted to the MP2KMag site by
Gilles Kohl
http://www.mp2kmag.com/articles.asp?ArticleId=13
)
Application Overview
The application creates a database and uses the Mappoint 2002 object
model to extract the POIs. For each POI extracted it calculates the
POI's Lat/Long and adds a record to the database with the following
data:
- Name
- Latitude
- Longitude
- Category (Cinemas, Shopping, etc.)
- Full Street Address
- Street
- City
- Region
- Country
- Postal Code
(Note: For a large number of POIs, the address is not provided. When
not available, the POI is added to the database with only the Name,
Lat/Long and Category included in the record.)
The application includes a single form that includes a Mappoint
ActiveX control, 4 textbox controls and a single command button using
the default names (i.e., MappointControl1, Text1, Text2, Text3, Text4
and Command1).
The following Project References will need to be made for the VB application:
- Microsoft Mappoint Control 9.0
- Microsoft Mappoint 9.0 Object Library (North America)
- Microsoft ActiveX Data Object Library
- Microsoft ADO Ext for DDL and Security
Initialization
Code executed from the form's load event is used to initialize the
application. The initialization includes configuring Mappoint and
creating the database.
|
 |
 |
 |
Recent Discussion
|
 |
|
 |
 |
|
 |
Resources
|
 |
|
 |
|
 |