Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaelhem/cordova-geocode
A Cordova plugin to retrieve coordinates from a given location
https://github.com/kaelhem/cordova-geocode
Last synced: 26 days ago
JSON representation
A Cordova plugin to retrieve coordinates from a given location
- Host: GitHub
- URL: https://github.com/kaelhem/cordova-geocode
- Owner: kaelhem
- License: mit
- Created: 2015-09-16T09:12:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-16T10:39:33.000Z (over 9 years ago)
- Last Synced: 2024-12-01T09:06:27.509Z (about 1 month ago)
- Language: Objective-C
- Size: 133 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
cordova-geocode
======This cordova plugin allow to retrieve long / lat coordinates from a given location string based.
It targets only iOS (for now), using MapKit framework.The `cordova.plugins.GeoCode` object provides a unique `geocodeString` method.
When called, a JSON object is returned with the following informations :
**[{*latitude*, *longitude*, *address*}, ...]**Note that the mapkit framework will never return more than 10 results.
Params
-------
The `geocodeString` method accepts 4 parameters.* queryString [*String*]: location string based value
* successCallback [*Function*]: callback triggered when succeed
* errorCallback [*Function*]: callback triggered when failed
* businessFiltered [*Boolean*, optionnal]: Used to remove business from results. default: *false*Usage sample
-------```
var successCallback = function(items) {
// your logic here
};
var errorCallback = function(error) {
// your logic here
};
cordova.plugins.CordovaGeocode.geocodeString('New York', successCallback, errorCallback);
```Supported Platforms
-------------------- iOS