In my App I've integrated the OpenStreetMap, in which I've fetched both source and destination coordinates. I need to pass those coordinates to OpenStreetMap App using Intent
class, for that I need Uri
.
After searching 2 days long I got this Uri
http://www.openstreetmap.org/?mlat=latitude&mlon=longitude&zoom=12
which currently supports only one location but I don't want it. Can anyone please help me with this? Thanks in advance...
Here is my code below
Intent sendLocationToMap = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://openstreetmap.org/?mlat=13.074847&mlon=80.271019&zoom=12"));
startActivity(sendLocationToMap);
Intent sendLocationToMap = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://www.openstreetmap.org/directions?engine=osrm_car&route=%"+ sourceLatitude + "%" + sourceLongitude + destinationLatitude + "%" + destinationLongitude)); startActivity(sendLocationToMap);
but it said "Could not parse geo intent "openstreetmap.org/…" – Tressa