3

I'd like to know if anyone knows how to exclude interior views when requesting the nearest street view panorama? I'm noticing more and more interior, "Business", views being returned for locations in well developed areas. I've searched the Javascript API reference for the google.maps.StreetViewPanorama and examined the data returned from the google.maps.StreetViewService class, but I can't see any telltale sign that would allow me to programmatically determine which I'm getting back for a particular location.

I have seen this question: How to know if street view panorama is indoors or outdoors and do not consider it an answer to mine.

Community
  • 1
  • 1
Robb Vandaveer
  • 1,481
  • 20
  • 25
  • Hi Robb, did you find an answer for this issue ? I find something like this: var svLinks = panorama.getLinks(); if (svLinks) { if (svLinks.length === 0) { console.log("only 360 view, can't move around"); } } But it's not working so well about indoors. – OrMoush Apr 27 '15 at 11:40
  • I did not @Or9400. The API team has an open enhancement request related to this: https://code.google.com/p/gmaps-api-issues/issues/detail?id=4831. See the question linked to this one for some potential hacks. – Robb Vandaveer Apr 27 '15 at 14:20

1 Answers1

1

For those coming from google and looking for an answer to this question the Google Maps Javascript API V3 has a way of requesting only outdoor street views. The getPanorama function takes a source parameter which can be set to outdoor (see this link: https://developers.google.com/maps/documentation/javascript/reference#StreetViewSource)

sv = new google.maps.StreetViewService();
sv.getPanorama({location: fenway, radius: 50, source: google.maps.StreetViewSource.OUTDOOR}, processSVData);
derickito
  • 695
  • 7
  • 25