Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 osmDroid 中使用 mapListener,效果很好。 问题是: 我还有一个 locationListener,它在 收到位置更改时更改地图的中心,因此当位置更改发生时和 用户滚动地图时 都会调用 onScroll 函数。 我希望能够识别哪个是 onScroll 中的哪个。 到目前为止,我找不到解决方案。有人知道吗? 提前感 谢奥姆里
您最有可能onLocationChanged (Location location)用于识别位置何时更改并设置地图中心。那么为什么不在同一个函数中调用一些东西呢?然后你就会知道你是否正在调用该onScroll()方法。
onLocationChanged (Location location)
onScroll()
如果您提供您的代码,那么也许我会更有帮助。