Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Zoom buttons zoom twice when tapped slowly #1733

@hauke96

Description

@hauke96

Issue Type

[ ] Question
[x] Bug
[ ] Improvement
[ ] Build system related
[ ] Performance
[ ] Documentation

Description and/or steps/code to reproduce the problem

When tapping a zoom button very slowly, there is a zoom in/out happening on the ACTION_DOWN and also on the ACTION_UP event, so there are two zooms happening. This doesn't feel right and also confused an user of an app of mine.

As far as my research goes this is caused by pull request #1471 in the CustomZoomButtonsDisplay by this line. Here both UP and DOWN events are considered a touch which causes the CustomZoomButtonsController to trigger two onZoom() calls on the map controller (see e.g. here).
If this is not a bug, maybe it's better to somehow configure the behavior on the CustomZoomButtonsController class?

Steps to reproduce

  1. Tap and hold on the zoom in/out button
  • Now the map zooms in/out
  1. Wait a second until the animation completed
  2. Release your finger
  • Another zoom happens

Environment

If it's a bug, version(s) of android this affects:

As far as I know all versions of android are affected.

Version of osmdroid the issue relates to:

6.1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions