I would like to add a button to the map pin's snippet to launch an external intent for driving direction to the pin.
I am thinking I can implement something that listens to long click the snippet box, brings up a pop-up to see if user would like to see driving direction and then launches the external activity.
Not sure there is an easy way to do it or the best UX design. Open up to suggestions!
This is my current setup map function:
private void maybeSetUpMapPin() {
mMap.setMyLocationEnabled(true);
CameraUpdate cameraUpdate;
for (Location location : mLocations) {
MarkerOptions markerOptions = new MarkerOptions()
.position(new LatLng(location.getLatitude(), location.getLongitude()))
.title(location.getName())
.snippet(location.getDescription());
Marker marker = mMap.addMarker(markerOptions);
}
CameraUpdate cameraUpdate = CameraUpdateFactory
.newLatLngZoom(new LatLng(DEFAULT_LATITUDE, DEFAULT_LONGITUDE), 10.0f);
mMap.moveCamera(cameraUpdate);
}