StreetAddress property
Returns the StreetAddress object for the specified location. Returns "Nothing" if the location does not represent an address. Read-only.
Applies to
Objects: Location
Syntax
object.StreetAddress
Properties
Part |
Description |
---|---|
Object |
Required. An expression that returns a Location object. |
Example
Sub GetCityOfAddress()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc As MapPoint.Location
'Set up the application
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True
'Find an address
Set objLoc = objMap.FindAddressResults("1 Microsoft Way", "Redmond", "WA")(1)
'Return the city string of this address
MsgBox "City: " + objLoc.StreetAddress.City
End Sub
Note This sample code is specific for use in MapPoint North America; it is for illustration purposes only.