我需要检测用户何时将地图从“ 地图”更改为“ 卫星”,反之亦然。
'zoom_changed'
有一个活动
我试图找到一个类似的事件来更改视图类型。
在堆栈上有一些建议可以使用zoom_changed
起作用,但是我已经对其进行了测试,并且在更改地图类型时不会触发。
答案 0 :(得分:1)
还有一个名为的事件:
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet" />
<table class="table table-bordered" style="table-layout: fixed;">
<thead class="thead-dark">
<tr>
<th scope="col">Year</th>
<th scope="col">Month</th>
<th scope="col">Savings</th>
<th scope="col">Savings for holiday!</th>
<th scope="col">Random Words</th>
</tr>
</thead>
<tbody>
<tr id='haha'>
<td rowspan="2">2020</td>
<td rowspan="2">January</td>
<td rowspan="2">text in here should be long enough to take more than 1 row</td>
<td>$100</td>
<td>Hello</td>
</tr>
<tr>
<td>$200</td>
<td>There</td>
</tr>
</tbody>
</table>
有关更多信息,请查看jsfiddle和属性Google Maps Documentation MaptypeId Changed Event