Trying to show StreetView in by using Google Maps Android API v2 in android but not able to get it working
Asked Answered
J

3

5

I am trying since long time to show the StreetView of particular location in Android but unfortunately unable to succeed.

What i require is that if i provide a position(LAT,LONG) to the map it should show the streetview of that particular position.

Following is the working code that shows Map, 3D map, hybrid map, sattlatite view etc etc.. BUT not showing the STREETVIEW...

mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
    mMap.addMarker(new MarkerOptions().position(new LatLng(33.748832, -84.38751300000001)).title("Marker"));
    mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
    mMap.setTrafficEnabled(true);
    CameraPosition cameraPosition = new CameraPosition.Builder()
    .zoom(17)                   // Sets the zoom
    .target(new LatLng(33.748832, -84.38751300000001))
    .bearing(90)                // Sets the orientation of the camera to east
    .tilt(30)                   // Sets the tilt of the camera to 30 degrees
    .build();                   // Creates a CameraPosition from the builder
mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));

I just need is some way to show the StreetView..

Johnsen answered 6/5, 2013 at 14:6 Comment(0)
D
7

You can now use what are supported by play-service library.

https://developers.google.com/android/reference/com/google/android/gms/maps/StreetViewPanoramaFragment

https://developers.google.com/android/reference/com/google/android/gms/maps/StreetViewPanoramaView

You cannot embed streetview in your own app using Google Maps Android API v2.

You can:

  • run StreetView through Intent
  • try using javascript API v3 with WebView

Edit: note, this is now available on iOS, so may be available on Android in the future.

Dolorous answered 6/5, 2013 at 15:55 Comment(2)
Ok thanks for the reply .... Lets try it through INTENT and will let all know about the proceeding.Johnsen
I was able to do so ... but now i need to show a popoer on it plz follow my new question #16418918Johnsen
S
5

Since Google Play services 4.4.+ Streetview API is available. Check here https://developers.google.com/maps/documentation/android/streetview

Shed answered 16/6, 2014 at 15:41 Comment(0)
H
0

You should use an image view to show the image. That will show the image view of the desired place. And add further OnclickListener on the image for view 360 or zoom.

Hissing answered 22/8, 2017 at 6:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.