Google maps - keep center when zooming

后端 未结 4 1629
渐次进展
渐次进展 2021-02-07 10:21

In Google Maps, I would like to be able to keep the center of the map on a marker on my location when I\'m zooming in or out. It\'s something that Ingress does, it doesn\'t matt

4条回答
  •  没有蜡笔的小新
    2021-02-07 11:17

    I have no idea why you tagged this question as both Javascript and Android. On Android you need to wrap your MapView inside another view and detect Double Tap motion inside onInterceptTouchEvent which you can override if your class can override FrameLayout for example. Then return true to prevent the map from handling this event and you handle it instead.

    For full code please see my answer here: https://stackoverflow.com/a/30118649/764897

提交回复
热议问题