WebMapLocation.Constructor(Address as String)

From Xojo Documentation

Constructor
WebMapLocation.Constructor(Address as String)

New in 2011r2

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:

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

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

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