google maps scaleControlOptions 更改地图上比例尺的位置
google maps scaleControlOptions changing position of scale on map
我注意到没有选项可以使用 scaleControlOptions 更改 google 地图上的比例尺位置(如果我错了请纠正我)并且想知道是否有任何方法可以解决这个问题并且在左下角显示刻度。
根据 documentation:
scaleControl
enables/disables the Scale control that provides a simple
map scale. By default, this control is not visible. When enabled, it
will always appear in the bottom right corner of the map.
很遗憾,您无法将其放在左下角的位置。
不幸的是,您不能使用内置选项来做到这一点,但是您可以通过一些简单的CSS:
来做到这一点
.gm-bundled-control-on-bottom {
right: auto !important;
left: 25px;
}
不确定这是否违反他们的服务条款,但确实有效。
我注意到没有选项可以使用 scaleControlOptions 更改 google 地图上的比例尺位置(如果我错了请纠正我)并且想知道是否有任何方法可以解决这个问题并且在左下角显示刻度。
根据 documentation:
scaleControl
enables/disables the Scale control that provides a simple map scale. By default, this control is not visible. When enabled, it will always appear in the bottom right corner of the map.
很遗憾,您无法将其放在左下角的位置。
不幸的是,您不能使用内置选项来做到这一点,但是您可以通过一些简单的CSS:
来做到这一点.gm-bundled-control-on-bottom {
right: auto !important;
left: 25px;
}
不确定这是否违反他们的服务条款,但确实有效。