APIs of NAC Real-Time Geo-Services Suite
for Web Applications

Real-Time Geocoding, Real-Time Reverse Geocoding, Real-Time Mapping,
Real-Time Driving Directions, Real-Time Location Based Searching
and Real-Time Traffic Information Services

NAC Read-Time Geo-Services Suite provides real-time geocoding, reverse geocoding, mapping, driving directions, location based business searching and traffic information services. Here are the APIs for these services:
  1. API for Real-Time Geocoding Service
  2. API for Real-Time Reverse Geocoding Service
  3. API for Map and Mapping Service
  4. API for Driving Directions Service
  5. API for Location Based Searches
  6. API for Traffic Information
All the services can be delivered in two models: http get/html response as described in this document and an XML Web Service as described in that API document.

API for NAC Real-Time Geocoding Service

The real-time geocoding service is a web based geocoding service providing real-time geocoding of addresses from 24 countries and areas:

Australia, Austria, Belgium, Brazil, Canada, Denmark, Finland (Uusimaa, Häme and Pirkanmaa regions only), France, Germany, Greece (Athens only), Hong Kong, Italy, Luxembourg, Netherlands, New Zealand, Norway, Portugal, Singapore, Spain, Sweden, Switzerland, Taiwan, United Kingdom, and United States.

It is designed for Internet and web applications. This service uses a simple http request and html response model and controled by user id and exclusive user IP addresses.

Request

The request is a simple http get request such as:

Geocoding a formated address:
http://mlbs.net/nacgeoservices/default.aspx?UserID=The_ID&address=the_formated_address&SuppressError=Yes_or_No
Geocoding a street address or a street intersection given in components:
http://mlbs.net/nacgeoservices/default.aspx?UserID=the_ID&street=the_street_num_and_name_or_street1_$_street2&city=the_city&state=the_state_or_province&zip=the_ZIP_or_postal_code&country=the_country&SuppressError=Yes_or_No
Geocoding a point of interest:
http://mlbs.net/nacgeoservices/default.aspx?UserID=the_ID&poi=the_point_of_interest&city=the_city&state=the_state_or_province&country=the_country&SuppressError=Yes_or_No
Geocoding a city:
http://mlbs.net/nacgeoservices/default.aspx?UserID=the_ID&city=the_city&state=the_state_or_province&country=the_country&SuppressError=Yes_or_No
Geocoding a state or province:
http://mlbs.net/nacgeoservices/default.aspx?UserID=the_ID&state=the_state_or_province&country=the_country&SuppressError=Yes_or_No
Geocoding a country:
http://mlbs.net/nacgeoservices/default.aspx?UserID=the_ID&country=the_country&SuppressError=Yes_or_No
Geocoding a ZIP or postal code:
http://mlbs.net/nacgeoservices/default.aspx?UserID=the_ID&zip=the_ZIP_or_postal_code&country=the_country&SuppressError=Yes_or_No
Where:
the_ID is the UserID of your account in the geo-services database

the_formated_address is the address that you want to geocode that starts
	with street address followed by city, state/province, ZIP/postal code 
	and country separated by commas such as: 
	
		45 Huntingdale Blvd., Toronto, ON M1W 2N8, Canada

the_street_num_and_name_or_street1_$_street2 can be a street number plus street name
	such as: 45 Huntingdale Blvd. or a street intersection such as: Finch $ Pharmacy
	Note: you should use "$" sign to connect the street names of a street intersection. 

SuppressError can be "Yes" or "No". 
	If "Yes", then the geocoding service will return the geographic coordinates 
		whenever it is available no matter there are uncertainties. However, if 
		there are uncertainties, the returned address will be appended with "?" 
		so that you will know when the geographic coordinates have uncertainties. 
	If "No", then the geocoding service will return unique geographic coordinates 
		only when there are no uncertainties. 
Here is an example of such a request:
http://mlbs.net/nacgeoservices/default.aspx?UserID=1365763452&Address=3347%20Oak%20Street,Victoria,BC%20V8X%201R2,Canada&SuppressError=yes

Response

The response will be a simple html file. The following is the response from the above example request:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>NACGeocode</title>
		<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
		<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form name="Form1" method="post" action="default.aspx?UserID=1365763452&Address=3347%20Oak%20Street,Victoria,BC%20V8X%201R2,Canada&SuppressError=yes" id="Form1"> 
		<input type="hidden" name="__VIEWSTATE" value="dDwtMzM1NzMyNzExOzs+6H0/nt6i5a9eMraERfrGvktYZNw=" />
		<span id="Address1" style="Z-INDEX: 101; LEFT: 17px; POSITION: absolute; TOP: 39px">Input address:</span>
		<span id="Label1" style="Z-INDEX: 102; LEFT: 17px; POSITION: absolute; TOP: 101px">Longitude:</span>
		<input name="address" type="text" value="3347 Oak Street,Victoria,BC V8X 1R2,Canada ?" readonly="readonly" id="address" style="height:24px;width:156px;Z-INDEX: 103; LEFT: 16px; POSITION: absolute; TOP: 59px" />
		<input name="lon" type="text" value="-123.372054072161" readonly="readonly" id="lon" style="height:24px;width:156px;Z-INDEX: 104; LEFT: 16px; POSITION: absolute; TOP: 122px" />
		<span id="Label2" style="Z-INDEX: 105; LEFT: 17px; POSITION: absolute; TOP: 163px">Latitude:</span>
		<input name="lat" type="text" value="48.452057405939" readonly="readonly" id="lat" style="height:24px;width:156px;Z-INDEX: 106; LEFT: 16px; POSITION: absolute; TOP: 185px" />
		<span id="Label3" style="Z-INDEX: 107; LEFT: 17px; POSITION: absolute; TOP: 225px">Universal Address</span>
		<input name="UAddress" type="text" value="4PK2V R27S7" id="UAddress" style="height:24px;width:156px;Z-INDEX: 108; LEFT: 16px; POSITION: absolute; TOP: 248px" />
		<span id="Label4" style="Z-INDEX: 109; LEFT: 17px; POSITION: absolute; TOP: 287px">Street</span>
		<input name="Street1" type="text" id="Street1" style="height:24px;width:156px;Z-INDEX: 110; LEFT: 16px; POSITION: absolute; TOP: 311px" />
		<span id="Label5" style="Z-INDEX: 111; LEFT: 17px; POSITION: absolute; TOP: 349px">City</span>
		<input name="City1" type="text" id="City1" style="height:24px;width:156px;Z-INDEX: 112; LEFT: 16px; POSITION: absolute; TOP: 374px" />
		<span id="Label6" style="Z-INDEX: 113; LEFT: 17px; POSITION: absolute; TOP: 411px">State</span>
		<input name="State1" type="text" id="State1" style="height:24px;width:156px;Z-INDEX: 114; LEFT: 16px; POSITION: absolute; TOP: 437px" />
		<span id="Label7" style="Z-INDEX: 115; LEFT: 17px; POSITION: absolute; TOP: 473px">ZIP</span>
		<input name="ZIP1" type="text" id="ZIP1" style="height:24px;width:156px;Z-INDEX: 116; LEFT: 16px; POSITION: absolute; TOP: 500px" />
		<span id="Label8" style="Z-INDEX: 119; LEFT: 17px; POSITION: absolute; TOP: 537px">Country</span>
		<input name="Country1" type="text" id="Country1" style="height:24px;width:156px;Z-INDEX: 120; LEFT: 16px; POSITION: absolute; TOP: 559px" />
		<input name="Multipleaddresses" type="text" id="Multipleaddresses" style="width:412px;Z-INDEX: 117; LEFT: 245px; POSITION: absolute; TOP: 61px" />
		<input name="Coordinates" type="text" id="Coordinates" style="width:412px;Z-INDEX: 118; LEFT: 245px; POSITION: absolute; TOP: 124px" />
		</form>
	</body>
</HTML>
In the above response, the input boxes of "lon" and "lat" contain the values of decimal longitude and latitude respecitively. The input box of "UAddress" contains Universal Address. The input boxes of "Street1", "City1", State1", ZIP1" and "Country1" contains the parsed elements of the address. Sometimes, there is no found address but the postal code. Therefore, the parsed elements will be empty but the postal code will be displayed on Multipleaddresses box. The input boxes of "Multipleaddresses" and "Coordinates" contain all the found addresses and their corresponding geographic coordinates (latitude, longitude) pairs.

You can easily parse the file in your program to get the longitude/latitude coordinates. In the above file, you can see that a question mark has been appended at the end of the returned address to indicate that the geocoding is not 100% sure.




API for Reverse Geocoding Service

The reverse geocoding is to provide the closest addresses of a given pair of longitude/latitude coordinates in 22 countries (as shown on the geocoding section) and geographic entities of the entire world.

Request

The request is a simple http request:
http://mlbs.net/nacgeoservices/locationinfo.aspx?UserID=the_ID&Longitude=your_longitude&Latitude=your_latitude&Language=your_prefered_language
Where Here is an example of such a request:
http://mlbs.net/nacgeoservices/locationinfo.aspx?UserID=1365763452&Longitude=-79.41071&Latitude=43.69426

Response

The response will be a simple html file. The following is the response from the above example request:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>locationinfo</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
		<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form name="Form1" method="post" action="locationinfo.aspx?UserID=1365456342&Longitude=-79.41071&Latitude=43.69426" id="Form1">
		<input type="hidden" name="__VIEWSTATE" value="dDwtMzAwNDE4MDM1Ozs+lxZ73jOUzwnxS/3mMi1obnbTOKs=" />

		<span id="Label1" style="height:11px;width:103px;Z-INDEX: 100; LEFT: 39px; POSITION: absolute; TOP: 51px">Input Longitude</span>
		<textarea name="Output1" id="Output1" style="height:277px;width:628px;Z-INDEX: 109; LEFT: 38px; POSITION: absolute; TOP: 490px">Toronto (census tract), Ontario, Canada: 43.7181523299461, -79.3771732128974; M5P (postal code), Canada: 43.6962479132779, -79.4101698567777; Toronto Metropolitan Municipality (census division), Ontario, Canada: 43.8196182051612, -79.3068154342571; Golden Horseshoe (region), Ontario, Canada: 43.5428896758436, -79.4235706879293; Great Lakes (region): 45.1869503600115, -84.0725799276335; Eastern (GMT - 5): 53.9296198183845, -75.1319647569244; Toronto, Ontario, Canada: 43.6485936834387, -79.3853352889556; Ontario (province), Canada: 50.251699554116, -85.7943066928537; Canada, North America: 62.8330343637792, -95.9140174199821; North America (continent): 46.9794720359788, -119.032261156562; World: 24.9853374179052, -40.0293242535731; </textarea>
		<input name="Language" type="text" value="en-US" id="Language" style="height:25px;width:211px;Z-INDEX: 108; LEFT: 151px; POSITION: absolute; TOP: 112px" />
		<span id="Label4" style="height:8px;width:103px;Z-INDEX: 107; LEFT: 39px; POSITION: absolute; TOP: 83px">Input Latitude</span>
		<span id="Label2" style="height:8px;width:103px;Z-INDEX: 101; LEFT: 39px; POSITION: absolute; TOP: 115px"> Language</span>
		<input name="Longitude" type="text" value="-79.41071" id="Longitude" style="height:25px;width:211px;Z-INDEX: 102; LEFT: 151px; POSITION: absolute; TOP: 48px" />
		<input name="Latitude" type="text" value="43.69426" id="Latitude" style="height:25px;width:211px;Z-INDEX: 103; LEFT: 151px; POSITION: absolute; TOP: 80px" />
		<textarea name="Output" id="Output" style="height:277px;width:628px;Z-INDEX: 104; LEFT: 39px; POSITION: absolute; TOP: 192px">90 Kilbarry Pl, Toronto, ON , Canada: 43.694362781067, -79.4102791398045; 425 Russell Hill Rd, Toronto, ON , Canada: 43.6941066489731, -79.4114061210175; 114 Kilbarry Rd, Toronto, ON , Canada: 43.6936695168662, -79.4104977058579; 298 Warren Rd, Toronto, ON , Canada: 43.6937787998929, -79.4096917435358; </textarea>
		<span id="Label3" style="height:6px;width:146px;Z-INDEX: 106; LEFT: 39px; POSITION: absolute; TOP: 159px">Output location info</span>
		</form>
	</body>
</HTML>

In the above response, the input boxes of Longitude and Latitude are the input values. The result is in Output and Output1 text areas in which all the found addresses and geographic entities are listed as shown in the following respectively:

	street_address1, city1, province1 postal_code1, country1: Latitude1, Longitude1; street_address2, city2, province2 postal_code2, country2: Latitude2, Longitude2;...	

	entity_whole_name1: Latitude1, Longitude1;entity_whole_name2: Latitude2, Longitude2;entity_whole_name3: Latitude3, Longitude3;entity_whole_name4: Latitude4, Longitude4;...
That is, each found address has two parts: address and coordinates separated by a colon. The address part has elements separated by commas except between province and postal code where there is only a blank space. The coordinates are separated by a comma. The entire address always ends with a semi-colon. If an element is missing, its separator will remain.




API for Map and Mapping Service

All maps retrieved from NAC Real-Time Geo-Services should not be stored in any media, and can be displayed only once in real time. Since the retrieved maps will be shown to end users, any page showing the map must include the following items:
  1. A hyperlink of "A service provided by NAC Geographic Products Inc." to "http://www.nacgeo.com".
  2. A text of "Featuring Microsoft MapPoint Technology"
  3. A hyperlink of "Terms of Use" to "http://www.microsoft.com/mappoint/net/terms"
  4. A Hyperlink of "Privacy Statement" to "http://www.microsoft.com/mappoint/net/privacy"
The map and mapping services are also based on the http get request/html response model and each request costs the same as geocoding an address.

The mapping services provide a variety of maps and allow you to map up to 100 objects onto each map with a choice of street maps of 38 countries and areas:

Andorra, Australia, Austria, Belgium, Brazil, Canada, Czech Republic, Denmark, Finland, France, Germany, Gibraltar, Greece (athens only), Guernsey, Hong Kong, Ireland, Isle of Man, Italy, Jersey, Liechtenstein, Luxembourg, Mexico, Monaco, Netherlands, New Zealand, Norway, Portugal, Puerto Rico, San Marino, Singapore, Slovakia, Spain, Sweden, Switzerland, Taiwan, United Kingdom, United States, and Vatican City.

and 34 cities of other countries:

Bangkok, Thailand; Beijing, China; Bogota, Colombia; Budapest, Hungary; Buenos Aires, Argentina; Cairo, Egypt; Calcutta, India; Charlotte Amalie, U.S. Virgin Islands; Delhi, India; Ho Chi Minh City, Vietnam; Istanbul, Turkey; Jakarta, Indonesia; Jerusalem, Israel; Johannesburg, South Africa; Kingston, Jamaica; Kinshasha, Congo; Kuala Lumpur, Malaysia; Kyoto, Japan; Lagos, Nigeria; Lima, Peru; Manila, Philippines; Moscow, Russia; Nairobi, Kenya; Nassau, Bahamas; Osaka, Japan; San Jose, Costa Rica; Santiago, Chile; Santo Domingo, Dominican Republic; Seoul, South Korea; Shanghai China; Tehran, Iran; Tel Aviv, Israel; Tokyo, Japan; and Warsaw, Poland;

and general thematic maps of the entire world.

Now there are two methods supported in getting a map:
  1. Get Map Defined by Its Center, Northing and Easting Spans
  2. Get Map Defined by its Bounding Ranctangle (Southwest lon/lat and Northeast lon/lat)

Get Map by Its Center, Northing and Easting Spans

Here is an example of the request for retrieving a map based on the center lon/lat and northing/easting spans:
http://mlbs.net/nacgeoservices/getmap.aspx?UserID=1365763452&Longitude=-79&Latitude=43&Northing=20&Easting=20&ImageWidth=480&ImageHeight=480&ImageFormat=gif&IsOverview=no&Icon=32&DataSource=MapPoint.NA&MapStyle=terrain&Language=en&Objects=43.01,-79.01,33,Car1;43.02,-79.03,34,Car2;42.99,-78.99,31,Car3
In this request, you can specify parameters as you want.
Map Style Description MapPoint.AP
MapPoint.BR
MapPoint.EU
MapPoint.NA
MapPoint.World MapPoint.WorldRoutable MapPoint.Moon
Climate Characteristic climate for areas on the Earth, defined by long-term weather patterns. Color.
 
x
 
 
Comprehensive For the MapPoint.World data source, contains several categories of information for purposes of general reference, including topographic, political, and geographic information. Color.

For the MapPoint.Moon data source, contains views of the moon as a composite of satellite images, including identification of craters, landing sites, and lunar seas. Color.

 
default
 
default
DefaultStyle Default map style for a data source.
x
x
x
x
EarthByDay Idealized map of the Earth as it looks from space in daylight without clouds, as a composite of satellite images. Color.
 
x
 
 
EarthByNight Idealized map of the Earth as it looks from space at night without clouds, as a composite of satellite images. Color.
 
x
 
 
Ecoregions Landscapes, such as forests, woodlands, grasslands, deserts, and ice. Color.
 
x
 
 
Europe For the MapPoint.EU data source, provides maps in a color scheme common in European maps.
MapPoint.EU only
 
 
 
Languages Language spoken by a majority of people in an area. Color.
 
x
 
 
Locator Roads and some political geographies, optimized for overview maps. Color.
x
 
 
 
LocatorBW Roads and some political geographies, optimized for overview maps. High contrast for black and white printing.
x
 
 
 
Night Roads and some political geographies, optimized for low-light viewing.
x
 
 
 
Outline Current borders of the world's sovereign nations and their dependencies, and at higher resolutions, borders between states, provinces, or other internal subdivisions. Also indicated are names and locations of selected cities and towns; rivers, lakes, and seas; and mountains, plateaus, deserts, and other physical features. Color.
 
x
 
 
Parks Significant protected areas, such as World Heritage Sites; national, provincial, and state parks; other major reserves; and territories reserved for indigenous peoples in the Americas. Color.
 
x
 
 
Phone Shows roads and political geographies, optimized for small screens (size ranges from 101 × 80 pixels to 176 × 220 pixels). Color.
x
 
 
 
PhoneBW Shows roads and political geographies, optimized for small screens (size ranges from 101 × 80 pixels to 176 × 220 pixels). High contrast for black and white printing.
x
 
 
 
PhysicalFeatures Landforms and water bodies. Color.
 
x
 
 
Political Political geography; political entities are shown in contrasting colors for emphasis. Color.
x
x
 
 
PoliticalBW Political geography; political entities are shown in outline. High contrast for black and white printing.
x
 
 
 
PopulationDensity Number of people per square kilometer throughout the world. Color.
 
x
 
 
PrecipitationAnnual Average accumulation of rain or snow over an entire year. Color.
 
x
 
 
PrecipitationJanuary Average accumulation of rain or snow during the month of January. Color.
 
x
 
 
PrecipitationJuly Average accumulation of rain or snow during the month of July. Color.
 
x
 
 
Religions Distribution of the adherents of the world's major regions. Color.
 
x
 
 
Road Roads, highways, towns, and cities. Color.
x
 
 
 
RoadBW Roads, highways, towns, and cities. High contrast for black and white printing.
x
 
 
 
Small Roads and political geographies, optimized for low resolution maps. Color.
default
 
 
 
SmallBW Roads and political geographies, optimized for low resolution maps. High contrast for black and white printing.
x
 
 
 
Tectonic Distribution of plates that make up the Earth's crust, location of volcanoes and earthquakes, and age of the floor beneath the seas. Color.
 
x
 
 
TemperatureJanuary Average air temperature during the month of January. Color.
 
x
 
 
TemperatureJuly Average air temperature during the month of July. Color.
 
x
 
 
Terrain Roads, highways, towns, cities, and geographic terrain. Color.
x
 
 
 
TerrainBW Roads, highways, towns, cities, and geographic terrain. High contrast for black and white printing.
x
 
 
 
TimeZones Zones of uniform time recognized by national agreement. Color.
 
x
 
 

The response is a html file like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>getmap</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
		<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form name="Form1" method="post" action="getmap.aspx?UserID=1365763452&&centerlongitude=-79&centerlatitude=43&northing=20&easting=30&imagewidth=180&imageheight=180&isoverview=yes&mapstyle=terrain" id="Form1">
		<input type="hidden" name="__VIEWSTATE" value="dDwtMjQyNjc1NTk7dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47PjtsPHQ8cDxwPGw8SW1hZ2VVcmw7PjtsPGh0dHA6Ly9yZW5kZXJWMzEuc3RhZ2luZy5tYXBwb2ludC5uZXQvcmVuZGVyLTMwL2dldG1hcC5hc3B4P2tleT01NkUwNjgwMUM3RUVENjc3REJEQzs+Pjs+Ozs+Oz4+Oz4+Oz6C45BJl9zilLfROKXaZR3bRjqr6Q==" />

		<img id="map" src="renderimage.aspx?CurrentMap=631992360853007545" border="0" style="Z-INDEX: 100; LEFT: 40px; POSITION: absolute; TOP: 434px" />
		<span id="Label15" style="height:21px;width:100px;Z-INDEX: 128; LEFT: 37px; POSITION: absolute; TOP: 385px">Easting (km)</span>
		<span id="Label14" style="height:19px;width:110px;Z-INDEX: 126; LEFT: 357px; POSITION: absolute; TOP: 339px">Center Latitude</span>
		<input name="CenterLongitude" type="text" value="-79" id="CenterLongitude" style="height:34px;width:162px;Z-INDEX: 104; LEFT: 170px; POSITION: absolute; TOP: 93px" />
		<input name="ImageHeight" type="text" value="180" id="ImageHeight" style="height:34px;width:162px;Z-INDEX: 118; LEFT: 493px; POSITION: absolute; TOP: 185px" />
		<span id="Label9" style="height:19px;width:100px;Z-INDEX: 108; LEFT: 357px; POSITION: absolute; TOP: 147px">Northing (km)</span>
		<span id="Label4" style="height:21px;width:112px;Z-INDEX: 102; LEFT: 37px; POSITION: absolute; TOP: 100px">Center Longitude</span>
		<input name="CenterLatitude" type="text" value="43" id="CenterLatitude" style="height:34px;width:162px;Z-INDEX: 106; LEFT: 493px; POSITION: absolute; TOP: 93px" />
		<input name="Easting1" type="text" value="30" id="Easting1" style="height:34px;width:162px;Z-INDEX: 111; LEFT: 170px; POSITION: absolute; TOP: 378px" />
		<input name="Northing" type="text" value="20" id="Northing" style="height:34px;width:162px;Z-INDEX: 112; LEFT: 493px; POSITION: absolute; TOP: 139px" />
		<input name="ImageWidth" type="text" value="180" id="ImageWidth" style="height:34px;width:162px;Z-INDEX: 116; LEFT: 170px; POSITION: absolute; TOP: 184px" />
		<input name="Msg" type="text" id="Msg" style="height:57px;width:614px;Z-INDEX: 131; LEFT: 39px; POSITION: absolute; TOP: 4px" />
		<span id="Label13" style="height:19px;width:124px;Z-INDEX: 129; LEFT: 357px; POSITION: absolute; TOP: 193px">Image Height (pixel)</span>
		<span id="Label12" style="height:21px;width:100px;Z-INDEX: 127; LEFT: 37px; POSITION: absolute; TOP: 146px">Easting (km)</span>
		<span id="Label11" style="height:19px;width:110px;Z-INDEX: 125; LEFT: 357px; POSITION: absolute; TOP: 101px">Center Latitude</span>
		<input name="CenterLongitude1" type="text" value="-79" id="CenterLongitude1" style="height:34px;width:162px;Z-INDEX: 105; LEFT: 170px; POSITION: absolute; TOP: 331px" />
		<span id="Label8" style="height:21px;width:124px;Z-INDEX: 114; LEFT: 37px; POSITION: absolute; TOP: 192px">Image Width (pixel)</span>
		<span id="Label3" style="height:19px;width:100px;Z-INDEX: 109; LEFT: 357px; POSITION: absolute; TOP: 386px">Northing (km)</span>
		<span id="Label1" style="font-weight:bold;height:21px;width:134px;Z-INDEX: 101; LEFT: 37px; POSITION: absolute; TOP: 64px">Requested</span>
		<span id="Label2" style="height:21px;width:112px;Z-INDEX: 103; LEFT: 37px; POSITION: absolute; TOP: 338px">Center Longitude</span>
		<input name="CenterLatitude1" type="text" value="43" id="CenterLatitude1" style="height:34px;width:162px;Z-INDEX: 107; LEFT: 493px; POSITION: absolute; TOP: 331px" />
		<input name="Easting" type="text" value="30" id="Easting" style="height:34px;width:162px;Z-INDEX: 110; LEFT: 170px; POSITION: absolute; TOP: 139px" />
		<input name="Northing1" type="text" value="30" id="Northing1" style="height:34px;width:162px;Z-INDEX: 113; LEFT: 493px; POSITION: absolute; TOP: 378px" />
		<span id="Label5" style="height:21px;width:77px;Z-INDEX: 120; LEFT: 37px; POSITION: absolute; TOP: 240px">Is Overview</span>
		<input name="IsOverview" type="text" value="YES" id="IsOverview" style="height:34px;width:162px;Z-INDEX: 121; LEFT: 170px; POSITION: absolute; TOP: 232px" />
		<span id="Label6" style="height:19px;width:55px;Z-INDEX: 122; LEFT: 357px; POSITION: absolute; TOP: 241px">Mapstyle</span>
		<input name="Mapstyle" type="text" value="TERRAIN" id="Mapstyle" style="height:34px;width:162px;Z-INDEX: 123; LEFT: 492px; POSITION: absolute; TOP: 232px" />
		<span id="Label7" style="font-weight:bold;height:21px;width:65px;Z-INDEX: 124; LEFT: 37px; POSITION: absolute; TOP: 303px">Returned</span>
		<span id="Label18" style="height:24px;width:96px;Z-INDEX: 136; LEFT: 40px; POSITION: absolute; TOP: 496px">Hot spots</span>
		<input name="Hotspots" type="text" value="232,248,232,248; 205,221,212,228; 179,195,173,189; 252,268,257,273;" id="Hotspots" style="height:32px;width:488px;Z-INDEX: 135; LEFT: 168px; POSITION: absolute; TOP: 496px" />
		</form>
	</body>
</HTML>
That can be easily parsed to get the final map center (input boxes of CenterLongitude1 and CenterLatitude1), Range (input boxes of Northing1 and Easting1) and URL of the map image. If you have objects mapped, the pixel coordinates of the rectangle of each icon will be returned in the text box of Hotspots in a sequence of Top1,Bottom1,Left1,Right1;Top2,Bottom2,Left2,Right2;... in which the order of the sequence is the map center (if mapped), object1, object2, ... same as in the input.


Get Map by Its Bounding Rectangle

Here is an example of the request for retrieving a map based on the bounding rectangle (southwest lon/lat and northeast lon/lat):
http://mlbs.net/nacgeoservices/getmapbybr.aspx?UserID=1365763452&NortheastLongitude=-78.96&NortheastLatitude=43.04&SouthwestLongitude=-79.05&SouthwestLatitude=42.95&ImageWidth=400&ImageHeight=400&ImageFormat=png&IsOverview=no&DataSource=MapPoint.NA&MapStyle=terrain&Icon=33&Language=en&Objects=43.01,-79.01,33,Car1;43.02,-79.03,34,Car2;42.99,-78.99,31,Car3
In these requests, you can specify parameters as you want.
The response of such a request is a html file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>getmapbybr</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
		<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form name="Form1" method="post" action="getmapbybr.aspx?UserID=1365763452&northeastlongitude=-79&northeastlatitude=43&southwestlongitude=-79.1&southwestlatitude=42.9&imagewidth=400&imageheight=400&isoverview=no&mapstyle=terrain" id="Form1">
		<input type="hidden" name="__VIEWSTATE" value="dDwtMjQyNjc1NTk7dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47PjtsPHQ8cDxwPGw8SW1hZ2VVcmw7PjtsPGh0dHA6Ly9yZW5kZXJWMzIuc3RhZ2luZy5tYXBwb2ludC5uZXQvcmVuZGVyLTMwL2dldG1hcC5hc3B4P2tleT1ENjFGOEE4MzY2MTBBMUJEOEQ0Mjs+Pjs+Ozs+Oz4+Oz4+Oz6Sa6OEEVWX0DQehRK9AmVsS5mwog==" />

		<img id="map" src="renderimage.aspx?CurrentMap=631992360853007545" border="0" style="Z-INDEX: 100; LEFT: 40px; POSITION: absolute; TOP: 434px" />
		<span id="Label15" style="height:21px;width:124px;Z-INDEX: 128; LEFT: 37px; POSITION: absolute; TOP: 385px">Northeast Longitude</span>
		<span id="Label14" style="height:19px;width:122px;Z-INDEX: 126; LEFT: 357px; POSITION: absolute; TOP: 339px">Southwest Latitude</span>
		<input name="SouthwestLongitude" type="text" value="-79.05" id="SouthwestLongitude" style="height:34px;width:163px;Z-INDEX: 104; LEFT: 171px; POSITION: absolute; TOP: 93px" />
		<input name="ImageHeight" type="text" value="400" id="ImageHeight" style="height:34px;width:162px;Z-INDEX: 118; LEFT: 493px; POSITION: absolute; TOP: 185px" />
		<span id="Label9" style="height:19px;width:117px;Z-INDEX: 108; LEFT: 357px; POSITION: absolute; TOP: 147px">Northeast Latitude</span>
		<span id="Label4" style="height:21px;width:127px;Z-INDEX: 102; LEFT: 37px; POSITION: absolute; TOP: 100px">Southwest Longitude</span>
		<input name="SouthwestLatitude" type="text" value="42.95" id="SouthwestLatitude" style="height:34px;width:162px;Z-INDEX: 106; LEFT: 493px; POSITION: absolute; TOP: 93px" />
		<input name="NortheastLongitude1" type="text" value="-78.9435142493215" id="NortheastLongitude1" style="height:34px;width:162px;Z-INDEX: 111; LEFT: 170px; POSITION: absolute; TOP: 378px" />
		<input name="NortheastLatitude" type="text" value="43.04" id="NortheastLatitude" style="height:34px;width:162px;Z-INDEX: 112; LEFT: 493px; POSITION: absolute; TOP: 139px" />
		<input name="ImageWidth" type="text" value="400" id="ImageWidth" style="height:34px;width:162px;Z-INDEX: 116; LEFT: 170px; POSITION: absolute; TOP: 184px" />
		<input name="Msg" type="text" id="Msg" style="height:57px;width:614px;Z-INDEX: 131; LEFT: 39px; POSITION: absolute; TOP: 4px" />
		<span id="Label13" style="height:19px;width:124px;Z-INDEX: 129; LEFT: 357px; POSITION: absolute; TOP: 193px">Image Height (pixel)</span>
		<span id="Label12" style="height:21px;width:127px;Z-INDEX: 127; LEFT: 34px; POSITION: absolute; TOP: 146px">Northeast Longitude</span>
		<span id="Label11" style="height:19px;width:122px;Z-INDEX: 125; LEFT: 357px; POSITION: absolute; TOP: 101px">Southwest Latitude</span>
		<input name="SouthwestLongitude1" type="text" value="-79.1182628161996" id="SouthwestLongitude1" style="height:34px;width:162px;Z-INDEX: 105; LEFT: 170px; POSITION: absolute; TOP: 331px" />
		<span id="Label8" style="height:21px;width:124px;Z-INDEX: 114; LEFT: 37px; POSITION: absolute; TOP: 192px">Image Width (pixel)</span>
		<span id="Label3" style="height:19px;width:118px;Z-INDEX: 109; LEFT: 357px; POSITION: absolute; TOP: 386px">Northeast Latitude</span>
		<span id="Label1" style="font-weight:bold;height:21px;width:134px;Z-INDEX: 101; LEFT: 37px; POSITION: absolute; TOP: 64px">Requested</span>
		<span id="Label2" style="height:21px;width:128px;Z-INDEX: 103; LEFT: 37px; POSITION: absolute; TOP: 338px">Southwest Longitude</span>
		<input name="SouthwestLatitude1" type="text" value="42.95" id="SouthwestLatitude1" style="height:34px;width:162px;Z-INDEX: 107; LEFT: 493px; POSITION: absolute; TOP: 331px" />
		<input name="NortheastLongitude" type="text" value="-78.96" id="NortheastLongitude" style="height:34px;width:162px;Z-INDEX: 110; LEFT: 170px; POSITION: absolute; TOP: 139px" />
		<input name="NortheastLatitude1" type="text" value="43.0000108715528" id="NortheastLatitude1" style="height:34px;width:162px;Z-INDEX: 113; LEFT: 493px; POSITION: absolute; TOP: 378px" />
		<span id="Label5" style="height:21px;width:77px;Z-INDEX: 120; LEFT: 37px; POSITION: absolute; TOP: 240px">Is Overview</span>
		<input name="IsOverview" type="text" value="NO" id="IsOverview" style="height:34px;width:162px;Z-INDEX: 121; LEFT: 170px; POSITION: absolute; TOP: 232px" />
		<span id="Label6" style="height:19px;width:55px;Z-INDEX: 122; LEFT: 357px; POSITION: absolute; TOP: 241px">Mapstyle</span>
		<input name="Mapstyle" type="text" value="TERRAIN" id="Mapstyle" style="height:34px;width:162px;Z-INDEX: 123; LEFT: 492px; POSITION: absolute; TOP: 232px" />
		<span id="Label7" style="font-weight:bold;height:21px;width:65px;Z-INDEX: 124; LEFT: 37px; POSITION: absolute; TOP: 303px">Returned</span>
		<span id="Label18" style="height:24px;width:96px;Z-INDEX: 136; LEFT: 40px; POSITION: absolute; TOP: 496px">Hot spots</span>
		<input name="Hotspots" type="text" value="192,208,192,208; 125,141,176,192; 81,97,111,127; 207,223,246,262;" id="Hotspots" style="height:32px;width:488px;Z-INDEX: 135; LEFT: 168px; POSITION: absolute; TOP: 496px" />
		</form>
	</body>
</HTML>
That can be easily parsed to get the final map bounding rectangle (input boxes of SouthwestLongitude1, SouthwestLatitude1, NortheastLongitude1 and NortheastLatitude1) and URL of the map image object. If you have objects mapped, the pixel coordinates of the rectangle of each icon will be returned in the text box of Hotspots in a sequence of Top1,Bottom1,Left1,Right1;Top2,Bottom2,Left2,Right2;... in which the order of the sequence is the map center (if mapped), object1, object2, ... same as in the input.


API for Driving Directions Service

All maps retrieved from NAC Real-Time Geo-Services should not be stored in any media, and can be displayed only once in real time. Since the retrieved maps will be shown to end users, any page showing the map must include the following items:
  1. A hyperlink of "A service provided by NAC Geographic Products Inc." to "http://www.nacgeo.com".
  2. A text of "Featuring Microsoft MapPoint Technology"
  3. A hyperlink of "Terms of Use" to "http://www.microsoft.com/mappoint/net/terms"
  4. A Hyperlink of "Privacy Statement" to "http://www.microsoft.com/mappoint/net/privacy"
This service is based on http get request/html response model to provide driving directions and route maps for 34 countries and areas:

Andorra, Australia, Austria, Belgium, Brazil, Canada, Czech Republic, Denmark, Finland, France, Germany, Greece (athens only), Hong Kong, Ireland, Italy, Liechtenstein, Luxembourg, Mexico, Monaco, New Zealand, Netherlands, Norway, Portugal, Puerto Rico, San Marino, Singapore, Slovania, Spain, Sweden, Switzerland, Taiwan, United Kingdom, United States, and Vatican City.

The costs for these services are:

Here is a sample URL for getting driving directions only:
http://mlbs.net/nacgeoservices/directions.aspx?UserID=1365763452&StartLongitude=-79&StartLatitude=43&EndLongitude=-79.3&EndLatitude=43.2&Criterion=QUICKEST&Unit=KM&Language=en&ShowWaypoints=yes 
Here is a sample URL for getting both driving directions and route map:
http://mlbs.net/nacgeoservices/directions.aspx?UserID=1365763452&StartLongitude=-79&StartLatitude=43&EndLongitude=-79.3&EndLatitude=43.2&Criterion=QUICKEST&Unit=KM&ShowWaypoints=yes&ShowMap=yes&MapWidth=600&MapHeight=400&Language=en
In these requests:

The response of these requests will be a html file like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>directions</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
		<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form name="Form1" method="post" action="directions.aspx?UserID=1365283408&startlongitude=-79&startlatitude=43&endlongitude=-79.3&endlatitude=43.2&showmap=yes&mapwidth=600&mapheight=400" id="Form1">
		<input type="hidden" name="__VIEWSTATE" value="dDw5MjQ5ODU2MDc7dDw7bDxpPDE+Oz47bDx0PDtsPGk8MzU+Oz47bDx0PHA8cDxsPEltYWdlVXJsOz47bDxodHRwOi8vcmVuZGVyVjMxLnN0YWdpbmcubWFwcG9pbnQubmV0L3JlbmRlci0zMC9nZXRtYXAuYXNweD9rZXk9NUNBMTI3QjQwRTc5REM2OUVGMDg7Pj47Pjs7Pjs+Pjs+Pjs+ZNocBlahNxCHe3duuIKjfmEAPDk=" />
		<input name="Msg" type="text" id="Msg" style="height:81px;width:640px;Z-INDEX: 100; LEFT: 20px; POSITION: absolute; TOP: 9px" />
		<span id="Label8" style="height:25px;width:366px;Z-INDEX: 118; LEFT: 26px; POSITION: absolute; TOP: 328px">Directions</span>
		<span id="Label1" style="height:24px;width:94px;Z-INDEX: 101; LEFT: 22px; POSITION: absolute; TOP: 119px">Start Longitude</span>
		<input name="StartLongitude" type="text" value="-79" id="StartLongitude" style="height:26px;width:173px;Z-INDEX: 102; LEFT: 147px; POSITION: absolute; TOP: 118px" />
		<span id="Label2" style="height:23px;width:86px;Z-INDEX: 103; LEFT: 334px; POSITION: absolute; TOP: 120px">Start Latitude</span>
		<input name="StartLatitude" type="text" value="43" id="StartLatitude" style="height:26px;width:173px;Z-INDEX: 104; LEFT: 486px; POSITION: absolute; TOP: 117px" />
		<span id="Label3" style="height:23px;width:88px;Z-INDEX: 105; LEFT: 22px; POSITION: absolute; TOP: 177px">End Longitude</span>
		<input name="EndLongitude" type="text" value="-79.3" id="EndLongitude" style="height:26px;width:173px;Z-INDEX: 106; LEFT: 147px; POSITION: absolute; TOP: 174px" />
		<span id="Label4" style="height:21px;width:80px;Z-INDEX: 107; LEFT: 334px; POSITION: absolute; TOP: 178px">End Latitude</span>
		<input name="EndLatitude" type="text" value="43.2" id="EndLatitude" style="height:26px;width:173px;Z-INDEX: 108; LEFT: 486px; POSITION: absolute; TOP: 174px" />
		<span id="Label5" style="height:21px;width:94px;Z-INDEX: 109; LEFT: 22px; POSITION: absolute; TOP: 234px">Criterion</span>
		<input name="Criterion" type="text" id="Criterion" style="height:26px;width:173px;Z-INDEX: 110; LEFT: 147px; POSITION: absolute; TOP: 229px" />
		<span id="Label6" style="height:25px;width:124px;Z-INDEX: 112; LEFT: 22px; POSITION: absolute; TOP: 289px">Total Distance (km)</span>
		<input name="Distance" type="text" value="45.3600019440055" id="Distance" style="height:26px;width:173px;Z-INDEX: 113; LEFT: 147px; POSITION: absolute; TOP: 287px" />
		<span id="Label7" style="height:22px;width:150px;Z-INDEX: 114; LEFT: 334px; POSITION: absolute; TOP: 290px">Total Driving Time (min)</span>
		<input name="DrivingTime" type="text" value="4327" id="DrivingTime" style="height:26px;width:173px;Z-INDEX: 115; LEFT: 486px; POSITION: absolute; TOP: 287px" />
		<textarea name="Directionlist" id="Directionlist" style="height:250px;width:633px;Z-INDEX: 116; LEFT: 24px; POSITION: absolute; TOP: 353px">
		Depart Start on Local road(s) (South); 0.49 km
		Turn RIGHT (West) onto CR-548 [Love Rd]; 1.39 km
		Turn RIGHT (North) onto W River Rd; 6.38 km
		Road name changes to CR-310 [Long Rd]; 0.9 km
		Turn LEFT (North) onto SR-324 [Grand Island Blvd]; 0.35 km
		Turn off onto Ramp; 0.24 km
		*Toll road* Merge onto I-190 [SR-324]; 2.21 km
		At exit 21, turn RIGHT onto Ramp; 0.15 km
		Keep STRAIGHT to stay on Ramp; 0.08 km
		Turn LEFT (West) onto SR-384 [Buffalo Ave]; 3.29 km
		Turn RIGHT (North) onto 27th St, then immediately turn LEFT (West) onto Allen Ave; 0.47 km
		Turn RIGHT (North) onto 24th St; 0.18 km
		Turn LEFT (West) onto Cudaback Ave; 0.69 km
		Turn RIGHT (North) onto Portage Rd; 1.96 km
		Keep STRAIGHT onto SR-104 [Main St]; 0.77 km
		Turn LEFT (West) onto Ontario Ave, then immediately turn RIGHT (North) onto Whirlpool St; 0.24 km
		Turn LEFT (South-West) onto Whirlpool Bridge; 0.34 km
		Entering Ontario; 0 km
		Turn RIGHT (North) onto River Rd; 0.81 km
		Road name changes to Niagara Pky [River Rd]; 1.62 km
		Turn LEFT (North-West) onto Whirlpool Rd; 0.95 km
		Turn LEFT (West) onto Church's Ln; 1.24 km
		Turn RIGHT (North) onto RR-100 [St Paul Ave], then immediately turn LEFT (West) onto Riall St; 0.55 km
		Turn RIGHT (North) onto Mercury Ave, then immediately turn LEFT (West) onto Willinger St; 0.59 km
		Turn RIGHT (North) onto RR-104 [Dorchester Rd]; 0.23 km
		Turn LEFT (West) onto Woodgate St; 0.87 km
		Turn RIGHT (North) onto Olden Ave; 0.17 km
		Turn LEFT (West) onto RR-101 [Mountain Rd]; 0.38 km
		Take Ramp (RIGHT) onto QEW [Queen Elizabeth Way]; 13.61 km
		At exit 48, keep RIGHT onto Ramp; 0.23 km
		Turn LEFT (North) onto RR-38 [Martindale Rd]; 1.61 km
		Turn LEFT (West) onto RR-87 [Main St]; 0.14 km
		Keep STRAIGHT onto RR-87 [Lakeshore Rd W]; 0.82 km
		Turn RIGHT (North) onto Firelane 700; 0.55 km
		Turn LEFT (North) onto Local road(s); 0.86 km
		Arrive End; 0km</textarea>
		<img id="map" src="renderimage.aspx?CurrentMap=631992360853007545" border="0" style="Z-INDEX: 117; LEFT: 25px; POSITION: absolute; TOP: 611px" />
		</form>
	</body>
</HTML>
You can easily parse the total distance (Distance input box), total driving time (DrivingTime input box) and turn by turn directions (Directionlist textarea). If the route map is requested, the URL of the map will be the URL of the map image.


API for Location Based Business Searching

All maps and information of found business entities from NAC Real-Time Geo-Services should not be stored in any media, and can be displayed only once in real time. Since the retrieved maps will be shown to end users, any page showing the map must include the following items:
  1. A hyperlink of "A service provided by NAC Geographic Products Inc." to "http://www.nacgeo.com".
  2. A text of "Featuring Microsoft MapPoint Technology"
  3. A hyperlink of "Terms of Use" to "http://www.microsoft.com/mappoint/net/terms"
  4. A Hyperlink of "Privacy Statement" to "http://www.microsoft.com/mappoint/net/privacy"
This service is based on http get request/html response model to provide location based business searching for Canada, United States and major cities of Europe. The costs of this service are:
  1. Getting a list of found items costs the same as geocoding one address
  2. Getting both a list of found items and the map displaying found idems costs the same as geocoding two addresses.
Here is a sample request:
http://mlbs.net/nacgeoservices/search.aspx?userid=136876543265&Longitude=-73.992616&Latitude=40.729081&Range=5&DataSource=NavTech.NA&Category=SIC7011&ShowMap=yes&ImageWidth=400&ImageFormat=png&Language=en
In the request:

The response of the request is a html file like:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>search</title>
		<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
		<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form name="Form1" method="post" action="search.aspx?userid=1367654327&longitude=-73.992616&latitude=40.729081&range=5&DataSource=NavTech.NA&Category=SIC7011&ShowMap=yes&ImageWidth=400&Language=en" id="Form1">
		<input type="hidden" name="__VIEWSTATE" value="dDwxNjc5NjMzNDI7Oz7dMB+RQn0FicndKpoDiiQhXWyXng==" />

		<input name="Msg" type="text" id="Msg" style="height:87px;width:620px;Z-INDEX: 101; LEFT: 15px; POSITION: absolute; TOP: 10px" />
		<input name="Language" type="text" value="en" id="Language" style="height:36px;width:163px;Z-INDEX: 118; LEFT: 142px; POSITION: absolute; TOP: 281px" />
		<span id="Label2" style="height:21px;width:100px;Z-INDEX: 117; LEFT: 17px; POSITION: absolute; TOP: 290px">Language</span>
		<img id="map" src="renderimage.aspx?CurrentMap=632635194396406250" alt="" border="0" style="Z-INDEX: 113; LEFT: 17px; POSITION: absolute; TOP: 648px" />
		<input name="CenterLongitude" type="text" value="-73.992616" id="CenterLongitude" style="height:36px;width:163px;Z-INDEX: 104; LEFT: 142px; POSITION: absolute; TOP: 145px" />
		<span id="Label9" style="height:19px;width:100px;Z-INDEX: 106; LEFT: 330px; POSITION: absolute; TOP: 198px">Category</span>
		<span id="Label4" style="height:21px;width:112px;Z-INDEX: 103; LEFT: 17px; POSITION: absolute; TOP: 153px">Center Longitude</span>
		<input name="CenterLatitude" type="text" value="40.729081" id="CenterLatitude" style="height:36px;width:163px;Z-INDEX: 105; LEFT: 466px; POSITION: absolute; TOP: 145px" />
		<input name="Category" type="text" value="SIC7011" id="Category" style="height:36px;width:163px;Z-INDEX: 108; LEFT: 466px; POSITION: absolute; TOP: 189px" />
		<input name="ImageWidth" type="text" value="400" id="ImageWidth" style="height:36px;width:163px;Z-INDEX: 110; LEFT: 466px; POSITION: absolute; TOP: 234px" />
		<span id="Label12" style="height:21px;width:100px;Z-INDEX: 112; LEFT: 17px; POSITION: absolute; TOP: 243px">Range (km)</span>
		<span id="Label11" style="height:19px;width:110px;Z-INDEX: 111; LEFT: 330px; POSITION: absolute; TOP: 154px">Center Latitude</span>
		<span id="Label8" style="height:21px;width:124px;Z-INDEX: 109; LEFT: 330px; POSITION: absolute; TOP: 242px">Image Width (pixel)</span>
		<span id="Label1" style="font-weight:bold;height:21px;width:134px;Z-INDEX: 102; LEFT: 17px; POSITION: absolute; TOP: 109px">Requested</span>
		<input name="Range" type="text" value="5" id="Range" style="height:36px;width:163px;Z-INDEX: 107; LEFT: 142px; POSITION: absolute; TOP: 235px" />

		<select name="listentities" size="4" id="listentities" style="height:164px;width:620px;Z-INDEX: 114; LEFT: 16px; POSITION: absolute; TOP: 336px">
		<option value="Current location; 8T0J PRMB; (-73.992616, 40.729081);;;">Current location; 8T0J PRMB; (-73.992616, 40.729081);;;</option>
		<option value="St Marks Hotel; 8T0S PRMC; (-73.98930083333, 40.72914861111); 2 St Marks Pl,New York,NY 10003,United States; 212-6742192">St Marks Hotel; 8T0S PRMC; (-73.98930083333, 40.72914861111); 2 St Marks Pl,New York,NY 10003,United States; 212-6742192</option>
		<option value="White House Hotel; 8T0K PRLW; (-73.99201777778, 40.72610888889); 340 Bowery,New York,NY 10012,United States; 212-4775623">White House Hotel; 8T0K PRLW; (-73.99201777778, 40.72610888889); 340 Bowery,New York,NY 10012,United States; 212-4775623</option>
		<option value="Noho Suites; 8T08 PRLW; (-73.996355, 40.72608583333); 625 Broadway,New York,NY 10012,United States; 212-2937770">Noho Suites; 8T08 PRLW; (-73.996355, 40.72608583333); 625 Broadway,New York,NY 10012,United States; 212-2937770</option>
		<option value="Affordable New York City; 8T0D PRMX; (-73.99436111111, 40.73308861111); 21 E 10th St,New York,NY 10003,United States; 212-5334001">Affordable New York City; 8T0D PRMX; (-73.99436111111, 40.73308861111); 21 E 10th St,New York,NY 10003,United States; 212-5334001</option>
		<option value="Hotel Marlton; 8T06 PRMV; (-73.99692305556, 40.73262833333); 5 W 8th St,New York,NY 10011,United States; 212-4735886">Hotel Marlton; 8T06 PRMV; (-73.99692305556, 40.73262833333); 5 W 8th St,New York,NY 10011,United States; 212-4735886</option>
		<option value="Hotel Regina; 8T0X PRMT; (-73.9873275, 40.73231333333); 202 E 13th St,New York,NY 10003,United States; 212-9822831">Hotel Regina; 8T0X PRMT; (-73.9873275, 40.73231333333); 202 E 13th St,New York,NY 10003,United States; 212-9822831</option>
		<option value="Hospitality House; 8T06 PRLP; (-73.99720888889, 40.724675); 580 Broadway,New York,NY 10012,United States; 212-9878269">Hospitality House; 8T06 PRLP; (-73.99720888889, 40.724675); 580 Broadway,New York,NY 10012,United States; 212-9878269</option>
		<option value="A Village House; 8T05 PRN1; (-73.99735305556, 40.73358444444); 45 W 9th St,New York,NY 10011,United States; 212-4735500">A Village House; 8T05 PRN1; (-73.99735305556, 40.73358444444); 45 W 9th St,New York,NY 10011,United States; 212-4735500</option>
		<option value="Mercer Hotel; 8T03 PRLR; (-73.99827333333, 40.72517); 147 Mercer St,New York,NY 10012,United States; 212-9666060">Mercer Hotel; 8T03 PRLR; (-73.99827333333, 40.72517); 147 Mercer St,New York,NY 10012,United States; 212-9666060</option>
		<option value="Washington Square Hotel; 8T02 PRMV; (-73.99903527778, 40.73255916667); 103 Waverly Pl,New York,NY 10011,United States; 212-7779515">Washington Square Hotel; 8T02 PRMV; (-73.99903527778, 40.73255916667); 103 Waverly Pl,New York,NY 10011,United States; 212-7779515</option>
		<option value="Union Square Inn; 8T10 PRMZ; (-73.98662944444, 40.73320333333); 209 E 14th St,New York,NY 10003,United States; 212-6140500">Union Square Inn; 8T10 PRMZ; (-73.98662944444, 40.73320333333); 209 E 14th St,New York,NY 10003,United States; 212-6140500</option>
		<option value="Larchmont Hotel; 8T08 PRN5; (-73.99610416667, 40.73461388889); 27 W 11th St,New York,NY 10011,United States; 212-9899333">Larchmont Hotel; 8T08 PRN5; (-73.99610416667, 40.73461388889); 27 W 11th St,New York,NY 10011,United States; 212-9899333</option>
		<option value="Howard Johnson; 8T0Q PRLG; (-73.98994833333, 40.72313166667); 135 E Houston St,New York,NY 10002,United States; 212-5053699">Howard Johnson; 8T0Q PRLG; (-73.98994833333, 40.72313166667); 135 E Houston St,New York,NY 10002,United States; 212-5053699</option>
		<option value="2nd Home on 2nd Ave; 8T13 PRMS; (-73.98526972222, 40.73210027778); 221 2nd Ave,New York,NY 10003,United States; 212-6773161">2nd Home on 2nd Ave; 8T13 PRMS; (-73.98526972222, 40.73210027778); 221 2nd Ave,New York,NY 10003,United States; 212-6773161</option>
		<option value="Sunshine Hotel; 8T0H PRLC; (-73.99302944444, 40.72253); 241 Bowery,New York,NY 10002,United States; 212-6743445">Sunshine Hotel; 8T0H PRLC; (-73.99302944444, 40.72253); 241 Bowery,New York,NY 10002,United States; 212-6743445</option>
		<option value="Inhouse Hotel; 8SZW PRMP; (-74.00125666667, 40.73148388889); 2 Cornelia St,New York,NY 10014,United States; 212-8070868">Inhouse Hotel; 8SZW PRMP; (-74.00125666667, 40.73148388889); 2 Cornelia St,New York,NY 10014,United States; 212-8070868</option>
		<option value="Prince Hotel; 8T0G PRL8; (-73.99349833333, 40.72198277778); 218 Bowery,New York,NY 10012,United States; 212-2266564">Prince Hotel; 8T0G PRL8; (-73.99349833333, 40.72198277778); 218 Bowery,New York,NY 10012,United States; 212-2266564</option>
		<option value="Off Soho Suites Hotel; 8T0H PRL6; (-73.99300638889, 40.72134194444); 11 Rivington St,New York,NY 10002,United States; 212-9799808">Off Soho Suites Hotel; 8T0H PRL6; (-73.99300638889, 40.72134194444); 11 Rivington St,New York,NY 10002,United States; 212-9799808</option>
		<option value="Page Group LLC; 8T06 PRL8; (-73.99723944444, 40.72190138889); 225 Lafayette St,New York,NY 10012,United States; 212-9669342">Page Group LLC; 8T06 PRL8; (-73.99723944444, 40.72190138889); 225 Lafayette St,New York,NY 10012,United States; 212-9669342</option>
		<option value="Inn at Irving Place; 8T0Z PRND; (-73.98708444444, 40.73607583333); 56 Irving Pl,New York,NY 10003,United States; 212-5334600">Inn at Irving Place; 8T0Z PRND; (-73.98708444444, 40.73607583333); 56 Irving Pl,New York,NY 10003,United States; 212-5334600</option>
		<option value="Hotel Seventeen; 8T14 PRN7; (-73.98483527778, 40.73494361111); 225 E 17th St,New York,NY 10003,United States; 212-4752845">Hotel Seventeen; 8T14 PRN7; (-73.98483527778, 40.73494361111); 225 E 17th St,New York,NY 10003,United States; 212-4752845</option>
		<option value="Patrik Frames Motel Fine; 8SZT PRLP; (-74.0021625, 40.72482611111); 167 Spring St,New York,NY 10012,United States; 212-9252372">Patrik Frames Motel Fine; 8SZT PRLP; (-74.0021625, 40.72482611111); 167 Spring St,New York,NY 10012,United States; 212-9252372</option>
		<option value="Marriott; 8T0K PRNQ; (-73.99211305556, 40.73826888889); 122 5th Ave,New York,NY 10011,United States; 212-2062029">Marriott; 8T0K PRNQ; (-73.99211305556, 40.73826888889); 122 5th Ave,New York,NY 10011,United States; 212-2062029</option>
		<option value="Schoenberger House; 8SZN PRM1; (-74.00442944444, 40.72689805556); 30 Charlton St,New York,NY 10014,United States; 212-6459420">Schoenberger House; 8SZN PRM1; (-74.00442944444, 40.72689805556); 30 Charlton St,New York,NY 10014,United States; 212-6459420</option>
		<option value="Thompson Hotel Associates; 8SZR PRLL; (-74.00309083333, 40.72411972222); 60 Thompson St,New York,NY 10012,United States; 212-4310400">Thompson Hotel Associates; 8SZR PRLL; (-74.00309083333, 40.72411972222); 60 Thompson St,New York,NY 10012,United States; 212-4310400</option>
		</select>
		<span id="Label3" style="height:21px;width:93px;Z-INDEX: 115; LEFT: 17px; POSITION: absolute; TOP: 198px">Data Source</span><input name="Data_Source" type="text" value="NavTech.NA" id="Data_Source" style="height:36px;width:163px;Z-INDEX: 116; LEFT: 142px; POSITION: absolute; TOP: 190px" />
		<span id="Label5" style="height:24px;width:72px;Z-INDEX: 119; LEFT: 16px; POSITION: absolute; TOP: 504px">Hot Spots</span>
		<textarea name="Hotspots" id="Hotspots" style="height:112px;width:618px;Z-INDEX: 120; LEFT: 16px; POSITION: absolute; TOP: 536px">191,207,214,230; 218,234,196,212; 219,235,167,183; 156,172,180,196; 160,176,163,179; 163,179,228,244; 231,247,161,177; 152,168,160,176; 227,243,154,170; 161,177,149,165; 155,171,232,248; 143,159,168,184; 245,261,210,226; 165,181,242,258; 250,266,189,205; 171,187,134,150; 255,271,186,202; 261,277,189,205; 256,272,161,177; 130,146,229,245; 140,156,245,261; 230,246,128,144; 110,126,195,211; 211,227,112,128; 236,252,121,137; </textarea></form>
	</body>
</HTML>
You can easily parse the found items and the URL of the map image. Each found item is shown in an option of the list control with: Name, Universal Address, (Longitude, Latitude), StreetAddress and TelephoneNumber separated by semicolons.


API for Traffic Information

All maps retrieved from NAC Real-Time Geo-Services should not be stored in any media, and can be displayed only once in real time. Since the retrieved maps will be shown to end users, any page showing the map must include the following items:
  1. A hyperlink of "A service provided by NAC Geographic Products Inc." to "http://www.nacgeo.com".
  2. A text of "Featuring Microsoft MapPoint Technology"
  3. A hyperlink of "Terms of Use" to "http://www.microsoft.com/mappoint/net/terms"
  4. A Hyperlink of "Privacy Statement" to "http://www.microsoft.com/mappoint/net/privacy"
This service is based on http get request/html response model to provide traffic information. Currently, it covers only major metropolitans of the United States.

The costs of this service are:
  1. Getting a list of traffic incidents costs the same as geocoding one address
  2. Getting both a list of traffic incidents and the map displaying all the traffic incidents costs the same as geocoding two addresses.
Here is a sample request:
http://mlbs.net/nacgeoservices/gettrafficinfo.aspx?UserID=136525643&Longitude=-77&Latitude=38.87&Range=50&ShowMap=yes&ImageWidth=400&ImageFormat=png&Language=en
In the request:

The response of the request is a html file like:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>search</title>
		<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
		<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form name="Form1" method="post" action="gettrafficinfo.aspx?userid=136576543&longitude=-77&latitude=38.87&range=50&ShowMap=yes&ImageWidth=400&Language=en" id="Form1">
		<input type="hidden" name="__VIEWSTATE" value="dDwxODg3MjI5ODA0Ozs+kuI7GYaZpcKQj03uIPLChVjmG9U=" />

		<input name="Msg" type="text" id="Msg" style="height:87px;width:620px;Z-INDEX: 101; LEFT: 15px; POSITION: absolute; TOP: 10px" />
		<input name="Language" type="text" value="en" id="Language" style="height:36px;width:163px;Z-INDEX: 114; LEFT: 142px; POSITION: absolute; TOP: 240px" />
		<span id="Label2" style="height:21px;width:100px;Z-INDEX: 113; LEFT: 17px; POSITION: absolute; TOP: 248px">Language</span>
		<img id="map" src="renderimage.aspx?CurrentMap=632635150158437500" alt="" border="0" style="Z-INDEX: 111; LEFT: 17px; POSITION: absolute; TOP: 576px" />
		<input name="CenterLongitude" type="text" value="-77" id="CenterLongitude" style="height:36px;width:163px;Z-INDEX: 104; LEFT: 142px; POSITION: absolute; TOP: 145px" />
		<span id="Label4" style="height:21px;width:112px;Z-INDEX: 103; LEFT: 17px; POSITION: absolute; TOP: 153px">Center Longitude</span>
		<input name="CenterLatitude" type="text" value="38.87" id="CenterLatitude" style="height:36px;width:163px;Z-INDEX: 105; LEFT: 466px; POSITION: absolute; TOP: 145px" />
		<input name="ImageWidth" type="text" value="400" id="ImageWidth" style="height:36px;width:163px;Z-INDEX: 108; LEFT: 466px; POSITION: absolute; TOP: 192px" />
		<span id="Label12" style="height:21px;width:100px;Z-INDEX: 110; LEFT: 17px; POSITION: absolute; TOP: 200px">Range (km)</span>
		<span id="Label11" style="height:19px;width:110px;Z-INDEX: 109; LEFT: 330px; POSITION: absolute; TOP: 154px">Center Latitude</span>
		<span id="Label8" style="height:21px;width:124px;Z-INDEX: 107; LEFT: 330px; POSITION: absolute; TOP: 200px">Image Width (pixel)</span>
		<span id="Label1" style="font-weight:bold;height:21px;width:134px;Z-INDEX: 102; LEFT: 17px; POSITION: absolute; TOP: 109px">Requested</span>
		<input name="Range" type="text" value="50" id="Range" style="height:36px;width:163px;Z-INDEX: 106; LEFT: 142px; POSITION: absolute; TOP: 192px" />
		<select name="listentities" size="4" id="listentities" style="height:164px;width:620px;Z-INDEX: 112; LEFT: 16px; POSITION: absolute; TOP: 288px">
		<option value="Current location; 8KGZ PGBH; (-77, 38.87);;;">Current location; 8KGZ PGBH; (-77, 38.87);;;</option>
		<option value="I-495 / MD-5/BRANCH AVE/EXIT 7; 8KPC PG2V; (-76.91496, 38.81915); 7/21/2005 8:00:00 PM; False; Unknown; Unknown; TEMPLE HILLS:Road construction during off-peak periods U I-495  MD-5/BRANCH AVE/EXIT 7 and MD-210/EXIT 3..; 7/28/2005 9:00:00 AM; Unknown; 816; 70">I-495 / MD-5/BRANCH AVE/EXIT 7; 8KPC PG2V; (-76.91496, 38.81915); 7/21/2005 8:00:00 PM; False; Unknown; Unknown; TEMPLE HILLS:Road construction during off-peak periods U I-495  MD-5/BRANCH AVE/EXIT 7 and MD-210/EXIT 3..; 7/28/2005 9:00:00 AM; Unknown; 816; 70</option>
		<option value="I-395 / VA-648/EDSALL RD/EXIT 2; 8K2K PG00; (-77.16577, 38.80016); 9/28/2005 10:31:00 AM; False; Unknown; Unknown; SPRINGFIELD:Road construction. Possible stop and go traffic S I-395  VA-648/EDSALL RD/EXIT 2 and I-95/I-495/WB EXIT 1/EB EXIT 17..; 9/28/2005 9:30:00 AM; Medium; 723; 70">I-395 / VA-648/EDSALL RD/EXIT 2; 8K2K PG00; (-77.16577, 38.80016); 9/28/2005 10:31:00 AM; False; Unknown; Unknown; SPRINGFIELD:Road construction. Possible stop and go traffic S I-395  VA-648/EDSALL RD/EXIT 2 and I-95/I-495/WB EXIT 1/EB EXIT 17..; 9/28/2005 9:30:00 AM; Medium; 723; 70</option>
		<option value="MD-190 / I-495; 8K3G PGXK; (-77.15372, 38.99054); 7/28/2005 5:24:00 PM; False; Unknown; Unknown; BETHESDA:Road construction during off-peak periods U MD-190  I-495..; 7/28/2005 9:00:00 AM; Unknown; 816; 70">MD-190 / I-495; 8K3G PGXK; (-77.15372, 38.99054); 7/28/2005 5:24:00 PM; False; Unknown; Unknown; BETHESDA:Road construction during off-peak periods U MD-190  I-495..; 7/28/2005 9:00:00 AM; Unknown; 816; 70</option>
		<option value="I-66 / I-495/EXIT 64; 8JXN PGF5; (-77.21774, 38.88788); 9/28/2005 1:24:00 PM; False; Unknown; Unknown; VIENNA:Slow traffic W I-66  I-495/EXIT 64 and VA-123/EXIT 60..; 9/28/2005 2:18:00 PM; Medium; 115; 70">I-66 / I-495/EXIT 64; 8JXN PGF5; (-77.21774, 38.88788); 9/28/2005 1:24:00 PM; False; Unknown; Unknown; VIENNA:Slow traffic W I-66  I-495/EXIT 64 and VA-123/EXIT 60..; 9/28/2005 2:18:00 PM; Medium; 115; 70</option>
		<option value="I-495 / MD-190/RIVER RD//EXIT 39; 8K37 PGXK; (-77.15686, 38.99063); 7/21/2005 8:00:00 PM; False; Unknown; Unknown; BETHESDA:Road construction during off-peak periods U I-495  MD-190/RIVER RD//EXIT 39..; 7/28/2005 9:00:00 AM; Unknown; 816; 70">I-495 / MD-190/RIVER RD//EXIT 39; 8K37 PGXK; (-77.15686, 38.99063); 7/21/2005 8:00:00 PM; False; Unknown; Unknown; BETHESDA:Road construction during off-peak periods U I-495  MD-190/RIVER RD//EXIT 39..; 7/28/2005 9:00:00 AM; Unknown; 816; 70</option>
		<option value="MD-187(OLD GEORGETOWN RD) / ROCK SPRING DR; 8K5J PH41; (-77.1262, 39.02699); 8/22/2005 6:26:00 AM; False; Unknown; Unknown; :Long-term road construction U MD-187(OLD GEORGETOWN RD)  ROCK SPRING DR and I-495..; 8/22/2005 9:00:00 AM; Unknown; 802; 70">MD-187(OLD GEORGETOWN RD) / ROCK SPRING DR; 8K5J PH41; (-77.1262, 39.02699); 8/22/2005 6:26:00 AM; False; Unknown; Unknown; :Long-term road construction U MD-187(OLD GEORGETOWN RD)  ROCK SPRING DR and I-495..; 8/22/2005 9:00:00 AM; Unknown; 802; 70</option>
		</select><span id="Label3" style="height:16px;width:64px;Z-INDEX: 115; LEFT: 16px; POSITION: absolute; TOP: 456px">Hot Areas</span><textarea name="Hotspots" id="Hotspots" style="height:64px;width:617px;Z-INDEX: 116; LEFT: 16px; POSITION: absolute; TOP: 488px">185,201,197,213; 237,253,251,267; 254,270,77,93; 85,101,86,102; 176,192,41,57; 84,100,83,99; 52,68,105,121; </textarea></form>
	</body>
</HTML>
You can easily parse the traffic incidents and the URL of the map image. Each incident is shown in an option of the list control with Name, Universal Address, (Longitude, Latitude), CreatedTime, Divert, ExpectedDelay, ExpectedDuration, FullDescription, LastUpdated, Severity, StandardMessage, and TrafficAreaID separated by semicolons. Here is the explanation of the parameters of incidents: If you want, you can also get the corresponding pixel coordinates (top, bottom, left, right) of the hotspot for each traffic incident on the map in the same order as the list separated by semicolons.
©2007 NAC Geographic Products Inc.