Reputation: 199
I want to find a route with HERE but offline.
The target of the route should be human readable text (like Berlin) and not latitude/longitude values.
Now I'm using RoutePlan class which requires lat/long values, and I'm using Geocoder to translate readable text to lat/long values.
But in offline mode (no WiFi, no Cellular Data) I can't use Geocoder to get the lat/long of a place.
How nonetheless can I use HERE maps in offline mode to find a route?
Upvotes: 1
Views: 703
Reputation: 199
In addition to David Leong's answer, I had to use HERE's GeocodeRequest instead of Geocoder to get the latitude and longitude.
Example at https://developer.here.com/mobile-sdks/documentation/android-starter/topics/geocoding.html
Upvotes: 0
Reputation: 1762
Are you using the HERE android SDK? If so, you most certainly can.
What you need are two things:
1: Download some maps via our MapLoader APIs.
2: Set MapsEngine#setOnline(false) to change the engine to offline only mode.
Geocoding will work offine if the data is downloaded. Routing, guidance and and map rendering will work too.
Upvotes: 2