Google Maps Api v3:根据缩放级别不同的标记和折线尺寸

发布于 2025-01-08 13:59:36 字数 120 浏览 1 评论 0原文

是否可以根据缩放级别显示不同的图像标记?

如果缩放级别较低,我想显示较小的标记。

我还想知道是否可以根据缩放级别更改折线的粗细。

我想这一切都取决于为缩放事件设置侦听器的可能性。

Is it possible to show a different image marker depending on the zoom level?

I would like to show smaller markers if the zoom level is lower.

I would also like to know if it's possible to change the thickness of the polylines depending on the zoom level.

I guess it all depends on the possibility to set a listener for the zoom event.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

初相遇 2025-01-15 13:59:36

来自文档
zoom_changed :当地图缩放属性更改时会触发此事件。

From the docs:
zoom_changed : This event is fired when the map zoom property changes.

怪我鬧 2025-01-15 13:59:36

是的,这是可能的。通过侦听 Zoom_changed 事件,您可以仔细重置覆盖选项(图标、颜色...)。

Yes, it is possible. by listening to the zoom_changed event you can then carefully reset the overlay options (icon, color...).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文