Google Maps API版本默认使用了哪些版本? [英] What Google Maps API version is used by default?

查看:95
本文介绍了Google Maps API版本默认使用了哪些版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您未指定版本号,那么会使用哪种版本的Google Maps API?最新版本的版本可能? 有关版本的文档没有说明。



文档建议生产应用程序指定次要版本号。但是它也说所有的API变更都是向后兼容的,所以如果我没有使用任何实验性功能,我应该指定一个版本号吗?

解决方案

英语不是我的第一语言,所以我可能会阅读这部分错误(来自您链接的版本文档)


您可以通过使用v参数指定它来指定要在应用程序中加载哪个版本的API ...夜间(开发)版本,通过v = 3指定或通过省略v参数。 p>

再往下看,有一个3.9每晚都有提及。


版本文档



版本3.9参考(每晚) b

所以,听起来像v(我会这样做)将每晚加载3.9版本。

 < script type =text / javascriptsrc =http://maps.goog leapis.com/maps/api/js?sensor=false\"></script> 

关于您的问题的第二部分:我可以想出一个很好的理由来指定一个版本:

一致性,可预测性和可靠性

您可能希望保持相同的外观,并在制作Maps API最新版本的更新时使用它。例如,标签或地图控件可能会四处移动。另一方面,跟踪最新版本也是一件好事。 b
$ b

由于落后太多,你的应用程序可能会在不受支持时停止工作。



我相信有更好的理由。我不是专业的地图开发人员。


What version of the Google Maps API is used if you don't specify a version number? The latest release version perhaps? The documentation about versioning doesn't say.

The documentation does recommend that production apps specify a minor version number. But it also says "all API changes will be backwards-compatible," so is there any reason I should specify a version number if I'm not using any experimental features?

解决方案

English is not my first language, so I might be reading this part wrong (from the versioning doc you linked)

You can indicate which version of the API to load within your application by specifying it using the v parameter ... The nightly (development) version, specified with v=3 or by omitting the v parameter.

Further down, there's a mention of 3.9 being nightly.

Documentation of Versions

Version 3.9 Reference (Nightly)

So, sounds like leaving out the v (which I do) will load the nightly, version 3.9.

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>

About part two of your question: I can think of a very good reason to specify a version:

Consistency, predictability, reliability

You might want to keep the same look-and-feel while working on a update for the latest release of the Maps API. For example, the labels or map controls may move around.

On the other hand, it's good to keep track of the latest versions, too. By lagging too far behind your application might stop working when it becomes unsupported.

I'm sure there are better reasons. I'm not a professional Maps developer.

这篇关于Google Maps API版本默认使用了哪些版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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