0

I am building an App using Xamarin in Visual Studio 2017.
In my App, I'm using Google Panoramic View.

The App gets a location from the user and displays the Panoramic View.

My problem is that not every location has a Panoramic View.
What I'm asking is: there's a way to identify whether a Panoramic View is available for a specific location.

Jimi
  • 29,621
  • 8
  • 43
  • 61
mega5800
  • 87
  • 7
  • show some code or illustrate your problem better so you can get help – Nobi Apr 07 '18 at 00:17
  • i have built the street view part using the code in this link. https://blog.xamarin.com/android-tips-immersive-panoramic-google-maps/ – mega5800 Apr 07 '18 at 08:50
  • Does anyone have a solution – mega5800 Apr 08 '18 at 19:45
  • You could refer to: [How to check if Google Street View available and display message?](https://stackoverflow.com/questions/2675032/how-to-check-if-google-street-view-available-and-display-message) – York Shen Apr 09 '18 at 13:47

1 Answers1

0

To identify whether a Panoramic View is available for a specific location.

for example, lets assume that you have this parameters to request StreetView Image or Panorama:

https://maps.googleapis.com/maps/api/streetview?size=400x800&location=-6.2898696,106.7709091 &fov=90&heading=90&pitch=0 &key=[YOUR_API_KEY]

Paste to your browser for test and you will get an Image of Streetview.

A Street View image metadata request is an HTTP URL of the following form:

https://maps.googleapis.com/maps/api/streetview/metadata?parameters

so you have to little bit edit your parameters above to:

https://maps.googleapis.com/maps/api/streetview/metadata?size=400x800&location=-6.2898696,106.7709091 &fov=90&heading=90&pitch=0 &key=[YOUR_API_KEY]

Paste it again to your browser then you will get this response:

{ "copyright" : "© Google, Inc.", "date" : "2017-09", "location" : { "lat" : -6.289908952742929, "lng" : 106.7709156700797 }, "pano_id" : "6Q2SZz9GDC7X3_EWjjs96g", "status" : "OK" }

Don't forget to replace [YOUR_API_KEY] with yours.