Same parameters for Apple Maps and Google Maps API?

左心房为你撑大大i 提交于 2019-12-09 16:11:50

问题


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:


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?



来源:https://stackoverflow.com/questions/14160049/same-parameters-for-apple-maps-and-google-maps-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!