CUTR-at-USF / OpenTripPlanner-for-Android

An Android app for multi-modal trip planning and navigation using any OpenTripPlanner server.
Other
129 stars 91 forks source link

Add streetview as an option in the step-by-step directions or map view #106

Open barbeau opened 11 years ago

barbeau commented 11 years ago

We should be able to add a streetview option rather simply by using an Intent, as discussed here, under Google Streetview: http://developer.android.com/guide/appendix/g-app-intents.html

URI format: google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom

We could add this in a context menu if a user presses and holds on a step-by-step direction, or on the marker balloon, for that location.

barbeau commented 11 years ago

Sample code to call this would be:

Intent streetView = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse("google.streetview:cbll=28.6245,-82.93753&cbp=1,90,,0,1.0&mz=8"));
startActivity(streetView);
vreixo commented 11 years ago

I think that it's a very good idea!

I have seen another approach that is to make a web view and integrate it more in the app, but I think that would be better and more clean and simple to do it with intents. Would be great if in the future this can be achieved with Maps API.