dj10dj100
dj10dj100

Reputation: 305

Google Maps prevent Streetview using Custom Panaromas Javascript API v3

I'm using the street-view platform to build a first person game. My problem is that sometimes if you're in a popular location google has 'custom panoramas' that are embedded in streetview, that you end up being put in. With the ability to look around but not move (you have to use a different map view to get out) and this isn't a desired effect.

Has anyone come across a way of prevent custom panoramas?

Google / Stackoverflow don't seem to have any answers unfortunately!

All help greatly appreciated .

Upvotes: 2

Views: 169

Answers (1)

dj10dj100
dj10dj100

Reputation: 305

I ended up resolving this by changing the way I was thinking about the problem.

The custom panaromas don't share the same lat/lon as the underlying StreetView data.

So if a user was searching for 'location a' and it had a custom Panaroma at the returned lat/lon the user was dropped into the panaroma. To ensure the user was Kept in a StreetView I grabbed the location A Lat/lon and used the RoadsAPI to find the nearest road - which then has correct StreetView data to use.

Upvotes: 1

Related Questions