Skip to content

A combination of Osmdroid (With OsmBonusPack) as map viewer, Mapsforge as tile renderer and Graphhopper as routing provider

License

Notifications You must be signed in to change notification settings

Arman92/Mapsforge-OsmDroid-GraphHopper

Repository files navigation

Mapsforge-OsmDroid-GraphHopper

A combination of Osmdroid (With OsmBonusPack) as map viewer, Mapsforge as tile renderer and Graphhopper as routing provider

This project shows how to easily combine three great libraris to build up a handy offline map application in android.

It uses OsmDroid 4.3 as map viewer, OsmBonusPack 5.1 as a extra-features library for osmdroid, Mapsforge 0.5.1 as offline OSM map renderer and Graphhopper 0.4 as OSM-based routing provider.

Please note that you need to specify your own mapsforge .map file and rendertheme:

MainActivity.java

final ITileSource tileSource = new MFTileSource(5,20, 256,
        Environment.getExternalStorageDirectory() + "/Mapsforge/map/iran.map",
        Environment.getExternalStorageDirectory() + "/Mapsforge/renderthemes/detailed.xml"
        , this);

The map center is focused at (32.653906, 51.659088), pointing on Isfahan, Iran. change it as you want.

You can find pre-built .map file in mapsforge download center.

Rendertheme are used to style your rendered maps, you can edit it as you want. The render theme "Detailed.xml" is available in "Data" folder of this repository. (You may want to try diffrent render themes)

GraphHopper routing is not available at the moment, I will update the repository soon.

About

A combination of Osmdroid (With OsmBonusPack) as map viewer, Mapsforge as tile renderer and Graphhopper as routing provider

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages