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

Add a no marker click event #472

Closed JeanVACCA closed 6 years ago

JeanVACCA commented 6 years ago

I would like to know when the user click on map but not on a marker.

Thank's in advance.

moagrius commented 6 years ago

TileView.onSingleTapUp https://github.com/moagrius/TileView#hooks-and-listeners

JeanVACCA commented 6 years ago

Sorry but i think this function is also call when you tap on a marker so I can't make the difference between a tap on the map and a tap on a marker. FYI : I want to close the marker window when you click anywhere on the map where there are no marker.

moagrius commented 6 years ago

are you using the built in marker tap system, or actual onclicklisteners on the marker views?

JeanVACCA commented 6 years ago

I'm using the built-in marker tap system. I have made a simple workaround ; I have removed the test at line 124 of the markerlayout to call the listener even if the view is null.

moagrius commented 6 years ago

👍