Closed NisStrom closed 7 years ago
The current iOS implementation relies on an internet connection to geocode/reverse geocode to ensure that, for example, if an address if passed in, but the selected app only supports coordinates format, that the address is geocoded to coordinates so the app receives the location in the correct format. Currently, it geocodes regardless, to make sure all necessary data is present.
To support the behaviour you're requesting, it would need to check the location format passed into the plugin against the supported location formats of the requested app to see if they are compatible. If not, and an internet connection is present, it can geocode/reverse geocode to obtain them in a compatible format. If not, and no internet connection is present, it would have to throw an error because the input location format is incompatible with the location formats supported by the app.
While this is entirely possible, it is an enhancement rather than a bug as the current implementation does work fine, but just with the caveat that the user requires an internet connection.
This has been fixed in v4 of the plugin (just published). It will work offline if the input location type(s) is directly supported by the selected app - see App location type support.
By default, geocoding will now only happen if the input location type does not match the type supported by the selected app.
In Android this works without any problem but in iOS nothing happens when the user tries to open the navigation app. But as navigation apps also provide offline functionality it should be possible to open them even without internet connectivity. We use Navigon for testing and this works properly in android. I know that for geocoding an internet connection is required. Isn't it possible just continue with lon/lat when there is no internet to convert the positon to an address?