Apple Maps和Google Maps API的参数相同吗? [英] Same parameters for Apple Maps and Google Maps API?

查看:195
本文介绍了Apple Maps和Google Maps API的参数相同吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS 6设备(如iPhone和iPad)以及最新的Mac上,链接至 maps.apple.com/maps?q=cupertino 在Apple的原生地图应用程序中打开。



在非Mac计算机和其他设备上,改为 maps.google.com/maps?q=cupertino



对于开发者来说,这是一个受欢迎的功能,但是,Google Maps支持Apple的API吗?

换句话说, 下面的Apple Maps参数完全转换为Google地图上的某些内容?

  q =查询参数。 
near =查询的位置部分。
ll =地图中心点的纬度和经度点。
sll =进行企业搜索的纬度和经度点。
spn =近似的纬度和经度跨度。
sspn = Apple使用的自定义纬度和经度跨度格式。
t =要显示的地图类型。
z =缩放级别。
saddr =产生行车路线时使用的源地址
daddr =产生行车路线时使用的目的地址。

或者最好不要在网站上使用其中的一部分?

解决方案

现在唯一的负面部分是 https:// maps .apple.com 在Apple设备上显示证书错误,但会直接在非Apple设备上显示Google。当然,您可以直接链接到 http://maps.apple.com ,但HTTPS无处不在是新的咒语不是它呢?


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?

解决方案

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?

这篇关于Apple Maps和Google Maps API的参数相同吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆