Expose onDoubleTap callback function
Hi Pierre,
I would like to expose a callback function for onDoubleTap gestures. In my use case, I would prefer if MapCompose could be configured to zoom to the maximum zoom scale when there is a double tap. With an onDoubleTap callback function, we will be able to achieve this.
Does this sound ok? I will submit a PR if so.
Thank you for your efforts with MapCompose
Hi Martin,
On double-tap, the library doubles the current scale using an animation. So, exposing a callback isn't enough. If you e.g snap the scale to the max scale on double-tap, the animation will produce an undesired behavior. So this requires a new api. I'll have a look when I have time.
Hi Pierre,
Thanks for your quick response.
I've tested a proposed implementation and used this within the SImpleDemoVM example, which seems to work.
It's quite possible I'm overlooking something, as I'm not completely familiar with MapCompose yet. I've mainly used TileView in the past.
I'll open a PR for you to review.
I've done something very similar to your initial implementation. Mainly, with the withDefaultBehavior flag and avoid a double computation (probably overkill). It's available in the branch fix-#149.
Could you please confirm it's good for you?
Thanks. I've had a look at the branch and that looks exactly like what I'm after. I'll integrate this later today.