我如何检测到用户已将 google 地图从地图更改为卫星

how do I detect that a user has changed google maps from map to satellite

我需要检测用户何时将地图从“Map”更改为“Satellite”,反之亦然。 'zoom_changed'
有活动 我正在尝试查找用于更改视图类型的类似事件。

堆栈上有一些建议使用 zoom_changed 可能有效,但我已经测试过了,它不会在地图类型更改时触发。

还有一个事件叫做: 'maptypeid_changed'

有关详细信息,您可以查看 Google Maps Documentation MaptypeId Changed Event and the Property maptypeid