Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use OpenStreetMap in native android app development [closed]

Hello I have the default android " Dummy Content " native app build in my android phone.. now I need to use the open street map applicaiton and intergrate it into this build with a GPS location ..

I could not find any infos in google search.. can any one help me with the links or suggestions?

Also which is better and ease of doing? Google maps or open streep maps in Android Devices...

please let me know.

like image 979
user3259486 Avatar asked Feb 03 '14 00:02

user3259486


2 Answers

Take a look at AnyMaps, it allows you to use OpenStreetMap as one of the options while having API which is close to Google Maps: https://github.com/car2go/AnyMaps

like image 113
Dmitry Zaytsev Avatar answered Oct 13 '22 00:10

Dmitry Zaytsev


If you want to show map content you can do it with Google Maps (already in Android libraries), or you can use different map data (e.g. OpenStreetMap). There are two known communities amongst others, who developed a Android Library for OpenStreetMap data maps:

  1. http://code.google.com/p/osmdroid/

  2. https://code.google.com/p/mapsforge/

At today, the Google's Google Map View is the most easy to use API. Unfortunetly it's commercial in some points. For example, you are not allowed to develop an application showing google map content in combination with turn-by-turn guidance (cf. Google Maps Terms of Service: https://developers.google.com/maps/terms?hl=en ). In opposite, OSMDroid is free to use for everything.

There are many tutorials in the web, which teach step by step how to show the GPS location of the device on a maps content in your application. Some of them are:

Google Maps: http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/

OSMDroid: http://android-er.blogspot.de/2012/05/display-current-location-marker-on.html

EDIT: I received some question about if a turn-by-turn guidance navigation app is possible to implement (and publish). The answer is yes. On a license view, you must not use googlemaps, but e.g. OSMDroid is fine here.

I have done this myself once using OSMDroid as a mapview library and OSMDroidBonusPack as Routing, Geocoding and reverseGeocoding library (the bonuspack has several more features, see all at the git repository

I wanted to provide another link to existing navigation apps implemented by using OSMDroid, but it seems they are no longer maintained for updates.

like image 25
MojioMS Avatar answered Oct 13 '22 00:10

MojioMS