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

Non scale-able element pointing to markers #447

Closed AlgirdasPundzius closed 6 years ago

AlgirdasPundzius commented 6 years ago

I need to make constant element (let's say X icon) which should be anchored to the top of TileView all the times and neither scale nor move with the TileView. However that X icon should draw a path to marker (which should move regarding the scale of the TileView). It is a bit hard to explain the idea so I have attached images to have a better understanding

1

2

So I'm not sure how to approach this issue, any help would be appreciated :)

moagrius commented 6 years ago

There's nothing built-in that would do that. You probably want to use a FrameLayout or RelativeLayout, and put the X on a layer above the TileView, then you'll have to manually figure out where that point would be for the line drawing. The point would be roughly equal to (the actual position + tileView scroll * scale).

HTH, GL

AlgirdasPundzius commented 6 years ago

Thanks for your suggestion. I'll post an update to this issue once I have a solution

moagrius commented 6 years ago

feel free to update this issue if you get it working. closing for now