Maptitude GISDK Help |
This macro has been deprecated. Please use Data.Finder Class and Data.Geocoder Class
Finds the location of a single address.
result = RunMacro("GISDK Locate Address", string address, integer|array zips, string street_layer, string callback_flag, string rule_file)
Argument |
Contents |
address |
The street address to locate: either a house number and street name, or two street names separated by "and" |
zips |
The ZIP Code(s) of the address to locate; can be one integer value, or an array of ZIP Code values |
street_layer |
The name of the Streets layer to search |
callback_flag |
Any non-null value to query the user if multiple possible matches are detected, or null to prevent a query |
rule_file |
Optional country-specific rule file, or null to use the default American/Canadian rule file |
A two element array:
Element |
Type |
Contents |
1 |
String |
If null, the address was found successfully, otherwise a status message indicating the error that occurred |
2 |
coord |
The location of the address, if the status message is null |
In Caliper Script, you must set the Geocode UI to be the alternate interface by calling SetAlternateInterface("geocode") before running this macro. When calling these macros from VBScript, add "geocode" after the macro name and before the first argument.
ZIP Code values in an array can be numeric, or strings that can be parsed as numbers.
The array of ZIP Codes is searched until a match is found.
For faster response, use a compact (.cdf) Streets file for street_layer.
The callback_flag argument must be null in VBScript.
If rule_file is null, it is assumed the address has the format of an American or Canadian address, such as: "123 Main Street." Otherwise, you can specify the following rule files, which are shipped with the geocode UI and are located in the program folder:
caliper1.rul: U.S. addresses with hyphenated numbers
str_num.rul: Street followed by number (e.g., "Via Nazionale 123")
num_str.rul: Number followed by street, with no American abbreviations
©2025 Caliper Corporation | www.caliper.com |