gpt4 book ai didi

javascript - 街景 API : Hiding FullScreen Control

转载 作者:行者123 更新时间:2023-12-03 02:54:47 26 4
gpt4 key购买 nike

我试图隐藏 Streetview API HUD 中的切换全屏元素。

panorama = new google.maps.StreetViewPanorama(document.getElementById(data.id), {

position : new google.maps.LatLng(data.lat, data.lng),
pov: {
heading : Number(data.heading),
pitch : Number(data.pitch)
},
linksControl: false,
panControl: false,
addressControl: false,
enableCloseButton: false,
zoomControl: false,
fullScreenControl: false,
enableCloseButton: false,
addressControlOptions: {
position: google.maps.ControlPosition.BOTTOM_CENTER
}
});

指定了这些选项 here 。除 fullScreenControl 外,所有选项均有效。

我的代码可以实时查看 here 。 UI 元素位于视口(viewport)的右上角。

文档警告如下:

Note: This page describes the controls available in version 3.22 and later of the Google Maps JavaScript API. If you want to continue using the earlier set of controls for a while, you can set google.maps.controlStyle = 'azteca' in v3.22. Read more about the changes to the controls in this article: What's New in the v3.22 Map Controls.

但是我链接到 API Js 文件如下:

<script src="//maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>

在撰写本文时 3.exp 应为 3.22。

我在这里缺少什么?

最佳答案

fullscreenControl: false 而不是 fullScreenControl: false

关于javascript - 街景 API : Hiding FullScreen Control,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32654034/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com