Skip to main content
Query Google Maps with latitude and longitude to retrieve structured address information for that location.

Parameters

PropertyTypeRequiredDescription
latitudeDoubleYesLatitude of the location
longitudeDoubleYesLongitude of the location
successFunctionNoCallback on success
failFunctionNoCallback on failure

Success Callback

PropertyTypeDescription
successBooleanQuery success status
resultCodeString0 success · 1000 invalid params · 1001 network error · 1002 internal error
resultMessageStringHuman-readable status message
countryStringCountry name
provinceStringProvince or state
cityStringCity
streetStringStreet
formattedAddressStringFull address per Google Maps reverse geocoding standards
countryShortNameStringISO country code
postCodeStringPostal code

Code Example

my.call('searchPlaceByLocation', {
  latitude: 45.4642,
  longitude: 9.1900,
  success: (res) => {
    my.alert({ content: 'success: ' + JSON.stringify(res) });
  },
  fail: (error) => {
    my.alert({ content: 'error: ' + JSON.stringify(error) });
  }
});