庞大的Google Maps控件(可能是Bug?) [英] Huge Google Maps Controls (Possible Bug?)

查看:85
本文介绍了庞大的Google Maps控件(可能是Bug?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我首先注意到我的网络应用程序上的Google地图控件不相称(如下所示).

I first noticed that my Google Maps Controls were disproportionally large on my own web app (seen below).

最初,我以为我的某些CSS正在控件上与Google的CSS一起玩;但是,访问Google自己的网页告诉我,此事件并非孤立于我...

Initially I thought some of my CSS was playing with Google's CSS on the controls; however, visiting Google's own webpage told me this incident was not isolated to me...

以下是其文档的地图: https://developers. google.com/maps/documentation/javascript/examples/control-positioning

Below is a map on their documentation: https://developers.google.com/maps/documentation/javascript/examples/control-positioning

大型控件也出现在其文档的每一页上.我尝试了不同的机器和不同的浏览器(Chrome和Firefox).

The large controls appear on every page of their documentation for me as well. I tried different machines and different browsers (Chrome and Firefox).

我还尝试了其他使用Google Maps API的网站,并在某些情况下看到了类似现象.

I also tried other sites that used the Google Maps API and saw a similar phenomenon in some cases.

是否有人遇到相同的问题?

推荐答案

事实证明这不是错误. 在此处查看更多信息:

Turns out this isn't a bug. See more here:

2018年8月13日,下午3:56 PM报告的问题Google Maps JavaScript API每周 频道(3.34)将使用较大的控件UI.

Aug 13, 2018 03:56PM Reported Issue Google Maps JavaScript API weekly channel (3.34) will be using the larger control UI.

由于我们看到各种设备上的触摸操作有所增加,因此我们 调整控件UI以适合手指触摸和鼠标 点击.

As we are seeing increases of touch operations on various devices, we adjusted the control UI to fit for both finger touches and mouse clicks.

可以通过在v =每季度加载API来选择退出, v = 3,v = 3.33或v = 3.32.注意:要求退役的版本将收到 默认频道,请参见 1 .

It's possible to opt out of this by loading the API with v=quarterly, v=3, v=3.33 or v=3.32. Note: requests to retired version will receive the default channel, see 1.

如果您有关于新控件UI的任何请求或其他问题 请让我们知道.

If you have any requests or other issues concerning the new control UI please let us know.

1 在加载API时使用 v =每季度一次,v = 3,v = 3.33或v = 3.32 .

请参阅@Jonny van Beek的答案,以了解如何将Google地图的控件缩放到您选择的大小.

Refer to answer from @Jonny van Beek on how to scale Google map's controls to the size of your choosing.

请参阅@garethdn和@Peter(如下)的答案,以了解如何用您自己的自定义控件替换Google的大型控件.

Refer to answers from @garethdn and @Peter (below) to find out how to replace Google's large controls with your own custom controls.

有关此问题的最新正确解决方法,请参阅@Dutchmanjonny的帖子(如下).

这篇关于庞大的Google Maps控件(可能是Bug?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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