WebMapLocation.Constructor(Address as String)

From Xojo Documentation

Constructor
WebMapLocation.Constructor(Address as String)

Creates a WebMapLocation from the passed address. Invalid addresses will raise a NilObjectException.

Notes

This uses the Google Geocoding engine, and is subject to the limitations of their service.

Example

Create and display a location:

Dim location As New WebMapLocation("Fenway Park, Boston, MA")
MapViewer1.GoToLocation(location)

Display a location entered by the user in the LocationField TextField:

Try
Dim location As New WebMapLocation(LocationField.Text)
MapViewer1.GoToLocation(location)
Catch e As NilObjectException
MsgBox("Invalid location.")
End Try