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

Error on zoom near of border #7

Closed
aluismarte opened this issue Mar 1, 2020 · 2 comments
Closed

Error on zoom near of border #7

aluismarte opened this issue Mar 1, 2020 · 2 comments

Comments

@aluismarte
Copy link

Everithing work fantastic, but when i put a point near of a border, give a distortion when i do zoom in or zoom out

    val config =
        MapViewConfiguration(8, 24000, 22000, 256, tileStreamProvider)
            .setMaxScale(1.2f)
            .setWorkerCount(4)
            .setPadding(256)
            .setMagnifyingFactor(0)
            .setMinimumScaleMode(MinimumScaleMode.FILL)

mpMap.defineBounds(0.0, 120.0, 100.0, 0.0)

point on 71.09375, 91.78125 (near of a border)

Error on zoom out
error-part-1
Error-part-3

zoom in and error show it
Real position of point
error-part-2

@p-lr
Copy link
Owner

p-lr commented Mar 1, 2020

By default, the MapView positions markers so that the fix point is at the bottom-center of the marker.
I believe that in your case, you want the center of the marker to be at (50.0, 60.0). Then, you should add the marker using:

addMarker(marker, x, y, relativeAnchorLeft = -0.5f, relativeAnchorTop = -0.5f)

@aluismarte
Copy link
Author

Yes!, thanks! is fix

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

No branches or pull requests

2 participants