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

MinimumScaleMode: FIT #512

Closed p-lr closed 5 years ago

p-lr commented 5 years ago

Exactly as we had in v2, the MinimumScaleMode.FIT would be very much appreciated.

To explain it with real example, ScalingScrollView.MinimumScaleMode.CONTAIN gives me: Screenshot_20190511-213724

And ZoomPanLayout.MinimumScaleMode.FIT gave me: Screenshot_20190511-213518

I have other issues coming, but they're very easy to fix and I'll PR for them.

moagrius commented 5 years ago

No problem, I'll get on this in the next couple days, as soon as I can. Some version already exists... Check ScalingScrollView

On Sat, May 11, 2019, 2:47 PM peterLaurence notifications@github.com wrote:

Exactly as we had in v2, the MinimumScaleMode.FIT would be very much appreciated. And also maybe change the default background to white (see below).

To explain it with real example, ScalingScrollView.MinimumScaleMode.CONTAIN gives me: [image: Screenshot_20190511-213724] https://user-images.githubusercontent.com/15638794/57574248-c9d85f00-7435-11e9-9e5d-408cf463937e.jpg

And ZoomPanLayout.MinimumScaleMode.FIT gave me: [image: Screenshot_20190511-213518] https://user-images.githubusercontent.com/15638794/57574256-f12f2c00-7435-11e9-9f6f-9af50ccc29c9.jpg

I have other issues coming, but they're very easy to fix and I'll PR for them.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/moagrius/TileView/issues/512, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFLHIA5QB5AYG452OV6RP3PU4PDTANCNFSM4HMI3TSA .

p-lr commented 5 years ago

Ok nice. I think there are just a few things to address to get the same level of maturity of the v2. It's close!

moagrius commented 5 years ago

Nice!

On Sat, May 11, 2019, 4:11 PM peterLaurence notifications@github.com wrote:

Ok nice. I think there are just a few things to address to get the same level of maturity of the v2. It's close!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/moagrius/TileView/issues/512#issuecomment-491544091, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFLHIFNKXT556JK6RMLV73PU4Y6HANCNFSM4HMI3TSA .

moagrius commented 5 years ago

OK I'll be working on bugs tomorrow night, starting here, so feel free to post any other issues you want prioritized.

p-lr commented 5 years ago

Great. I think I'll have some time this weekend. And also I need to continue the book review.

moagrius commented 5 years ago

:thumbsup:

moagrius commented 5 years ago

If you call tileViewInstance.setMinimumScaleMode(ScalingScrollView.MinimumScaleMode.CONTAIN) does it do what you want? What about tileViewInstance.setMinimumScaleMode(ScalingScrollView.MinimumScaleMode.COVER) ?

p-lr commented 5 years ago

I gave an example of what CONTAIN gives (in the OP), so it isn't what I'm looking for. As for COVER, it can only zoom out to the point the screen is fully covered by the map but a significant part of it isn't visible. In fact the screenshot I gave for FIT with the previous version is exactly what I want.

moagrius commented 5 years ago

hm ok i thought i copied those over exactly but most not have. i'll get back to it!

p-lr commented 5 years ago

Well CONTAIN only lacks the centering of the map.

moagrius commented 5 years ago

ah ok gtk!

moagrius commented 5 years ago

so just to be clear.

CONTAIN is basically FIT but doesn't center, and it should center. if i get CONTAIN to center, CONTAIN can be considered "passing".

COVER works as it is and does not actually need any tweaks, it's just not what you're using, but isn't actually broken - or do you consider your description, here, a bug:

As for COVER, it can only zoom out to the point the screen is fully covered by the map but a significant part of it isn't visible.

Sorry for being thick today, trying to do this during blocked times at work, and just diving back into some features I haven't touched for quite some time.

moagrius commented 5 years ago

Gotta run, back in a couple hours

moagrius commented 5 years ago

ooph. i'm working on this but it's tricky. iirc someone else did the original and i guess i need to familiarize myself with the concepts, generally.

moagrius commented 5 years ago

see https://github.com/moagrius/TileView/pull/515

p-lr commented 5 years ago

Ok I'll get some time tonight to look at this, thanks.

moagrius commented 5 years ago

Closing as part of https://github.com/moagrius/TileView/pull/520