moagrius / TileView

TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.
MIT License
1.46k stars 337 forks source link

Markers disappear when zooming #528

Closed inneke-dc closed 5 years ago

inneke-dc commented 5 years ago

I have an issue when adding markers and changing the zoom limits to (0f, 2f) instead of the default (0f, 1f). When the left and/or top calculated in MarkerPlugin.refreshPositions() exceeds the image's full width or height, the marker disappears. So when zooming in, first the markers near the bottom and right edges will disappear, and then when zooming some more the markers near the center will disappear as well.

moagrius commented 5 years ago

marked as bug, will fix. hopefully this weekend. thanks for the report

moagrius commented 5 years ago

This has been fixed in 4.0.7

Re-open if you continue to experience this issue.

Thanks for reporting!

inneke-dc commented 4 years ago

Sorry to come back to this after 3 months, but just today I discovered an issue with the fix ( MarkerPlugin - setClipChildren(false) ). While the markers are visible now, they are not clickable anymore. They don't receive touch because they are outside the parent's bounds. I don't know if this can be fixed in any way.

moagrius commented 4 years ago

Yikes, nice catch. It shouldn't have to even worry about clipping, the layout should be large enough to accommodate. In V2, it worked fine, but it was a much more heavy handed approach so I tried to be elegant in 3+, but obviously I need to revisit. You may want to go back to last stable, 2.7.7, which while the code is messy and a bit primitive, pretty solid and heavily used and tested. Sorry for the inconvenience.

On Fri, Sep 6, 2019 at 3:12 AM inneke-dc notifications@github.com wrote:

Sorry to come back to this after 3 months, but just today I discovered an issue with the fix ( MarkerPlugin - setClipChildren(false) ). While the markers are visible now, they are not clickable anymore. They don't receive touch because they are outside the parent's bounds. I don't know if this can be fixed in any way.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/moagrius/TileView/issues/528?email_source=notifications&email_token=AAFLHIDP5AVTMEHTFFXNB7TQIIGINA5CNFSM4HYWPOU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6CDM3A#issuecomment-528758380, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFLHIGGDBTDJ23E5BPMMKLQIIGINANCNFSM4HYWPOUQ .