Mostly from past one week I was searching for a tutorials/some reference docs or steps/ sample code to include Open street map into android native application.
Scenario: I am able to show the map inside the app using sample code as below:
package osmdemo.demo;
import org.osmdroid.tileprovider.tilesource.TileSourceFactory;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapController;
import org.osmdroid.views.MapView;
import android.app.Activity;
import android.os.Bundle;
public class OsmdroidDemoMap extends Activity {
private MapView mMapView;
private MapController mMapController;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.osm_main);
mMapView = (MapView) findViewById(R.id.mapview);
mMapView.setTileSource(TileSourceFactory.DEFAULT_TILE_SOURCE);
mMapView.setBuiltInZoomControls(true);
mMapController = (MapController) mMapView.getController();
mMapController.setZoom(13);
GeoPoint gPt = new GeoPoint(51500000, -150000);
mMapController.setCenter(gPt);
}
}
Had a look into the OSMand source code, but there is a problem to reuse their code, as there are 3rd party libs used in it and the code reuse policy in their FAQs and the code base is too huge to understand ;)
Question: Can anyone put some light with steps/ref. docs/sample code on how to integrate the turn-by-turn voice guidance with the OSMDroid maps?
I would greatly appreciate any inputs.
Correct me if there is any mistake, new to android app development :)
Look at osmbonus pack, there's a bunch of routing utilities in there
Tutorials: https://github.com/MKergall/osmbonuspack/wiki
Examples:
https://github.com/MKergall/osmbonuspack/tree/master/OSMNavigator
https://github.com/MKergall/osmbonuspack/tree/master/OSMBonusPack
Text To Voice is included with Android. There's no magic there and there's a reasonable example here: Text to speech(TTS)-Android