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

Using markers with reference zoom level #119

Closed ghost closed 10 years ago

ghost commented 10 years ago

Hi, thank you for providing this great library!! :+1:

Is there a way to match the given pixels (x,y) to pixels of the tile map image tile (e.g. map tile reference zoom level 0)?

Thank you very much!

moagrius commented 10 years ago

Thanks!

I'm not sure I understand your question - a point on the map doesn't really relate to a zoom level - if you're looking for a way to find the image tile for a pixel, then there's no built-in way, but you could use Math to determine it - take a look at the DetailLevel.getIntersections method https://github.com/moagrius/TileView/blob/145731131019d9e13ad9c1b4e90bb2dc5f317e7d/src/com/qozix/tileview/detail/DetailLevel.java#L38 to see the basic idea.

ghost commented 10 years ago

Hey, thank you for your fast reply. I solved it, thank you for your help! :+1:

moagrius commented 10 years ago

can this issue be closed?

ghost commented 10 years ago

Yes of course. Thank you very much! :)