Global Navigation Bar

MapInfo Products Knowledge Base


Product: MapMarker
Version: 7.x/8.x
Platform: Not Platform Related
Category: API Functions

Summary:
Retrieving candidate Zip+4 information via MapMarker API.

Question:
The OLE/OCX/VBScript methods for retrieving a ZIP+4 value from a candidate address all look something like this:

ZipPlus4Value = GetCandidatePlusForAt(Index)

But, the MapMarker API doesn't have a similar method. How can this information be retrieved?

Answer:
The extended ZIP code information is returned in the CandidateAddress structure, as one of the four components of the "lastLine" delimited string. The simplest way to separate the four components is to call GeoEngParseLastLine on the lastLine structure, and then access the four properties of the lastLine variable that was passed into the function by reference.

Lines that must be added to the VB API sample code shown in this document ->MapInfo Products Knowledge Base:

Dim parsedLastLine As lastLine
Dim FinishPlus4 As String

...

' after 'FinishZip = ...'
rs = GeoEngParseLastLine(hEngine, CandidateAddress.lastLine, parsedLastLine)
FinishPlus4 = parsedLastLine.postalAddOnCode

' print FinishPlus4 somewhere to see the result:
CompleteAddress = Finishstreet & " " & Finishcity & " " & FinishState & " " & FinishZip _
& " " & addrPoint.xCoord & " " & addrPoint.yCoord & " " & strPrec & " " & FinishPlus4

List1.AddItem CompleteAddress

Last Modified:
Global Navigation Bar