Open az-faro opened 7 months ago
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.
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.
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.
When I use
MapViewConfiguration.setMinimumScaleMode()
with anything other thanMinimumScaleMode.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:
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:
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.