OpenStreetMap (OSM) is a free editable Wikipedia like world map. More information at Wikipekia OSM
OSM allows user to download maps for offline use, this is a big advantage over Google Map, which is internet based the map. With OSM a map can be per download to an application, and can be used without internet.
Implement a Simple Open Street Map
Create an Android project.
AndroidManifest.xml add flowing permissions:
To use OSM in android app, there are two jars need to be included, osmdroid-android-x.xx.jar and slf4j-android-1.5.8.jar. osmdroid is a set of tools for OpenStreetMap data; SLF4J is a simplified logging facade.
Import jars to project library, and the simple OSM is implemented.
Add some simple functions to the map:
This will give touch controls: move location, zoom (like a simple Google map). Here is a screenshot:
To implement a simple OSM, remember download jars to project library, give permissions in Android manifest file and set view in layout file, then you can add more functions in the map Activity.
Source code: on GitHubcomments powered by Disqus