matuslittva
matuslittva

Reputation: 163

iOS GoogleMaps StreetView URL Scheme with Heading and Pitch

Is there any way to open google maps app in streetview mode with desired heading and pitch?

There is example in Google Maps URL Scheme for iOS Documentation with latitude, longitude and zoom, but there is nothing written about pitch and heading. It does not works when i try to embed parameters in URL like this &pitch= &heading=

There must be some way how to achieve this, because when i open street view in Safari browser and Safari offers me deeplink to Google Maps app it opens with exactly same heading and pitch like in Safari

I know that there are other options like embed google maps in app or open map URL in safari, but i need to open it in google maps app.

Upvotes: 3

Views: 825

Answers (1)

xomena
xomena

Reputation: 32178

In 2017 Google launched Google Maps URLs which is currently the recommended cross-platform syntax to open Google Maps app both in iOS and Android devices.

The Google Maps URLs has a street view mode and parameters heading, pitch and fov are supported.

So, you can use the new cross-platform syntax instead of the Google Maps URL scheme for iOS.

Example, from the official documentation

https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=48.857832,2.295226&heading=-45&pitch=38&fov=80

I hope this helps!

Upvotes: 3

Related Questions