Help

Version 3.1.0
Last Updated: 4/10/2006

About

ZIP Locator is an ActiveX component that rapidly calculates distances between United States ZIP Codes. ZIP Locator is ideal for finding the nearest locations or retrieving all the ZIP Codes within a specified radius.

Installation

Run the installer, ziplocator.msi, on your web server. This will install and register ziplocator.dll on the server, making the ZIP Locator component ready to use in your web site.

Use the Provided Code to Create a Store Locator Page

ZIP Locator comes complete with example web pages you can use to quickly set up your own location finder. Each example is optimized for fast searches. You can modify the pages as you see fit and use them in your own web site. Refer to each example for instructions.

Download:

examples.zip

 
 

Find Method (Locator object)

Calculates the distances to a list of ZIP Codes or finds all the ZIP Codes in a given radius.

Syntax

Set recordset = locator.Find (ZipCode, Locations, Radius)

Return Value

An ADO Recordset object containing the ZIP Codes that match the search criteria and their distances to the starting ZIP Code.

Parameters

ZipCode

A String value that contains the 5-digit ZIP Code to use as the starting point.

Locations

Optional. A String value that contains the ZIP Codes to include in the search, separated by commas. If omitted, the method returns all ZIP Codes within the specified radius.

Radius

Optional. A Single value that specifies the search radius in miles.

Remarks

The Find method returns an ADO Recordset containing the ZIP Codes from Locations that are within Radius miles of ZipCode. The results are ordered nearest to farthest.

Example:

' ZIP Codes of your store or dealer locations, separated by commas
MY_LOCATIONS = "30334,21401,96950,89701,70804,30334,02903,55428"
 
' create a Locator COM object
set loc = Server.CreateObject("ZipLocator.Locator")
 
' get a Recordset of distances to your locations from ZIP Code 90210
' ordered from nearest to farthest

set rs = loc.Find("90210", MY_LOCATIONS)
 
' display the nearest 5 results
for i = 1 to 5
    if rs.EOF then exit for
    Response.Write rs("zip") & ": " & rs("miles") & " miles<br>"
    rs.MoveNext
next

© 2005 ziplocator.net