Converts an address to geographic coordinates.
- MapKit JS 5.0+
A case-insensitive string to be converted to geographic coordinates: for example: "450 Serra Mall", "450 Serra Mall, Stanford", "450 Serra Mall, Stanford, CA USA". Delimiter characters are optional.
Geocoding results are returned asynchronously via a callback function. This callback function is invoked with two arguments,
erroron failure and
errorcontains an error code and text description of the error.
datais an object with the following property:
The geocoder returns the most relevant results for a query. For example, a query for “Paris” will return results for Paris, France. Use
Geocoderto constrain the search to specific countries, or to a desired area with a coordinate or region.
This method returns a request ID, which is an integer that can be passed to
cancel to abort a pending request.
Geocoding converts a human-readable address to latitude and longitude coordinates. You can use
mapkit to look up coordinates for a city, landmark, or address.