Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| success | Function | No | Callback with selected location |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
Success Callback
| Property | Type | Description |
|---|---|---|
| name | String | Location name |
| address | String | Full address |
| latitude | Number | The latitude, expressed as a floating-point number ranging from -90 to +90. A negative number means south latitude |
| longitude | Number | The longitude, expressed as a floating-point number ranging from -180 to +180. A negative number means west longitude |
| provinceName | String | The province |
| cityName | String | The city |
Code Example
my.chooseLocation({
success: (res) => {
console.log('Selected:', res.name);
console.log('Address:', res.address);
console.log('Coordinates:', res.latitude, res.longitude);
console.log('Province/City:', res.provinceName, res.cityName);
}
});