p-lr / MapCompose

A fast, memory efficient Jetpack Compose library to display tiled maps, with support for markers, paths, and rotation.
Apache License 2.0
220 stars 19 forks source link

Implemented visible area padding functionality #59

Closed Nohus closed 2 years ago

Nohus commented 2 years ago

Implements #57

I have also added a demo to the demo app. Here is a video of the feature in action: https://streamable.com/wt02ek

I have chosen not to make it move the camera when you change the padding (as you suggested in the issue). I have realized this is something I wouldn't want for my use case - I don't want the map moving when you open a side menu, but do want it taken into account if the map goes to a marker when the menu is open - so if I added it, it would have to be an optional feature so I can turn it off. On the other hand, if someone wants to update the map position when they update the padding, it's one line of code on the app side anyway (as I did in the demo app).

p-lr commented 2 years ago

Excellent, thank you! +1 for merge