Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | No | Coordinate type: gcj02 (default) or wgs84 |
| cacheTimeout | Number | No | Cache timeout in seconds |
| success | Function | No | Callback with location |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
Success Callback
| Property | Type | Description |
|---|---|---|
| latitude | Number | Latitude |
| longitude | Number | Longitude |
| accuracy | Number | Accuracy in meters |
| speed | Number | Speed in m/s |
Code Example
Related APIs
my.openLocation
Open location in map
my.chooseLocation
Choose a location