1

I started developing an app for which I am using HERE maps API.

Can someone tell me how to achieve map rotation during navigation?
Also how can a compass be integrated with the map accurately?
Also please how can I download maps for offline navigation, for users who don't have internet all the time?
Also please tell whether these features can be implemented with the standard HERE SDK?

Dave2e
  • 22,192
  • 18
  • 42
  • 50
Ghanendra
  • 363
  • 6
  • 15
  • any specific reason for using HERE maps?as they will increase your app size nd decrease the performance when compared to using google maps – Mohammed Atif Oct 11 '16 at 18:06
  • @MohammedAtif : since the question was about "Navigation", this is just one obvious reason to use the HERE MobileSDK, since it offers Navigation in the SDK directly. Google doesn't (you need to hand over to the Navigation app and don't have direct or full control over it). See also https://stackoverflow.com/questions/24531391/is-it-possible-to-create-turn-by-turn-gps-navigation-app-on-android-using-google – Marco Oct 12 '16 at 11:05
  • As a starter to solve your problem, here are two complete examples projects that can help you: https://tcs.ext.here.com/sdk_examples/TtsAndNavigation.zip is showing how to use routing and start guidance, and https://tcs.ext.here.com/sdk_examples/CustomPositionMarker.zip is showing how to use the compass with HERE Maps. And last https://tcs.ext.here.com/sdk_examples/MapDownloader.zip is showing how to download maps. Combining this with David's anwer below should give you the result you want. – Marco Oct 12 '16 at 11:07

1 Answers1

2

Can someone tell me how to achieve map rotation during navigation?

Please use the road view APIs in NavigationManager. Alternatively, you can animate the map yourself using the NavigationManager#Listener interface callbacks

Also how can a compass be integrated with the map accurately.

Please google for some generic tutorials on Android sensor API integration. Once you get the bearing, you can set it with Map#setOrientation.

Also please how can i download maps for offline navigation, for users who don't have internet all the time.

Please see com.here.android.mpa.MapLoader. There is a section in our tutorials.

Also please tell whether these features can be implemented with the standard HERE sdk?

This is all supported with the "Premium" version of the SDK. The "Starter" edition does not have all these cool features.

sschuberth
  • 28,386
  • 6
  • 101
  • 146
David Leong
  • 1,662
  • 1
  • 11
  • 7
  • I started with integrating the premium sdk, however upon adding the sdk and using basic map loading code, i get this error `ERROR: Cannot initialize Map FragmentLibrary /data/data/marine.com.forecaster/files/../lib/libMAPSJNI.so not found.` – Ghanendra Oct 13 '16 at 16:42
  • i have checked on stackoverflow, im using a real device ( moto g to be precise) and not an emulator. I have added the /libs/armeabi-v7a into libs folder which contains libMAPSJNI.so, to be sure i even copied all *.so files into /libs from /libs/armeabi-v7a, still no success, any ideas to resolve this? – Ghanendra Oct 13 '16 at 16:47
  • Would you be using gradle? Did you add jnilibs section to the gradle build file so gradle knows to package the libraries? – David Leong Oct 14 '16 at 01:12
  • pls have a look at my project structure [link](http://imgur.com/5ynZOf5). As you suggested i made changes to gradle also after looking at possible solutions to this on stackoverflow, still same error, any ideas? – Ghanendra Oct 14 '16 at 05:34
  • Seems all the .so files are at the root of the /libs folder. They should all be in the armeabi-v7a folder. EG: /libs/armeabi-v7a/libgnustl_shared.so /libs/armeabi-v7a/libMAPSJNI.so ..... Android needs to know the binary architecture to properly install :) – David Leong Oct 14 '16 at 06:11
  • i have the files in /libs/armeabi-v7a/ as instructed in quick start of here api, when i got the above error, I copied the .so files into /lib/ thinking it might help gradle find them, so I still have .so files in /libs/armeabi-v7a/ as well as /libs/ – Ghanendra Oct 14 '16 at 12:33
  • Please try to unzip your apk file? Are the native libraries in the apk package? Can you provide a screenshot of the unzipped structure? – David Leong Oct 14 '16 at 17:54
  • you can look at my project structure [here](https://drive.google.com/open?id=0ByknFXX0Jq-QRnlUa084WTAwRjA) and unzipped HERE-sdk [here](https://drive.google.com/open?id=0ByknFXX0Jq-QcmZ1T0Z1elpEODA), inside armeabi-v7a there are all the *.so files. – Ghanendra Oct 15 '16 at 05:19
  • The folder structure looks correct. Can you please unzip your apk and see if the native libs are there. – David Leong Oct 17 '16 at 00:41