Same parameters for Apple Maps and Google Maps API

2019-04-06 20:39发布

On iOS 6 devices like the iPhone and iPad, as well as the latest Mac's, a link to maps.apple.com/maps?q=cupertino is opened in Apple's native mapping application.

On non-Mac computers and other devices, it leads to maps.google.com/maps?q=cupertino instead.

This is a welcome functionality for developers, however, is Apple's API supported by Google Maps?

In other words, do all of the following Apple Maps parameters translate perfectly to something in Google Maps on the web?

q=      The query parameter.
near=   The location part of the query.
ll=     The latitude and longitude points for the map center point.
sll=    The latitude and longitude points from which a business search should be performed.
spn=    The approximate latitude and longitude span.
sspn=   A custom latitude and longitude span format used by Apple.
t=      The type of map to display.
z=      The zoom level.
saddr=  The source address, which is used when generating driving directions
daddr=  The destination address, which is used when generating driving directions.

Or is it best to not use some of these on websites?

1条回答
够拽才男人
2楼-- · 2019-04-06 20:47

The only negative part now is that https://maps.apple.com displays a certificate error on an Apple device but goes straight to google on a non-Apple device. Sure you can link directly to http://maps.apple.com but HTTPS everywhere is the new mantra isn't it?

查看更多
登录 后发表回答