Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting minimum scale mode and zooming below FILL equivalent gives scaling issues #47

Open
az-faro opened this issue Dec 6, 2023 · 3 comments
Labels
question Further information is requested

Comments

@az-faro
Copy link

az-faro commented Dec 6, 2023

When I use MapViewConfiguration.setMinimumScaleMode() with anything other than MinimumScaleMode.FILL and zoom out below where FILL would stop zooming in normal cases the scaling of the map goes crazy.

See example image of a drawing. Notice how the entire lower half of it is stretched to double size in the y axis. Similarly there is some stretching at the right edge of the image as well:
bild

Another example, here we can see duplication in the lower and right part of the image with both correct and streched data shown at the same time:
bild

Similarly I have noticed that when this happens the CoordinateTranslater.translateAndScaleAbsoluteToRelativeY() misbehaves and gives incorrect values.

As soon as you get back within the limits of FILL everything starts working correctly again.

@p-lr
Copy link
Owner

p-lr commented Dec 6, 2023

Thanks for describing in detail your issue. It would be ideal if you could reproduce your issue in a fork of the demo app, so I can investigate.

@p-lr p-lr added the question Further information is requested label Dec 21, 2023
@az-faro
Copy link
Author

az-faro commented Mar 21, 2024

Hello again, sorry for the delay, but I finally got around to reproduce this. I would say it's related to the tiles not always being the set size (if the source image isn't an even multiplier of the tile size, the edge tiles are smaller in my case). This was perfectly fine in TileView, but I guess it might be different here. See the reproduction: https://github.com/az-faro/MapView/tree/bugs/scaling-issues.

@p-lr
Copy link
Owner

p-lr commented Mar 23, 2024

I can see that some of your tiles aren't square. In your case, all tiles must be 512x512 px, because MapView does not support rectangular tiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants