Giter VIP home page Giter VIP logo

Comments (8)

JannikGM avatar JannikGM commented on August 18, 2024

I added map.setRenderWorldCopies(false) and recorded this video of the bug, it also happens when moving from location two, to location two:

Screen.Recording.2021-03-23.at.10.58.35.mov

This should help with having an even more minimalistic test case.


I'd assume that zooming out to far will attempt to center the map, fighting with the actual animation.
We are already zoomed out very far but the transition would zoom out further; also, as you correctly noticed, it doesn't happen with zoom: 1 - presumably because there's more headroom.

In general, I have seen issues with bad zoom and bad unproject in the past, so I'd make them prime suspects.

So, for debugging this, I'd recommend to ensure the zoom is not going out of bounds:

tr.zoom = k === 1 ? zoom : startZoom + tr.scaleZoom(scale);

If that's not it, also check if this unproject location is correct:

const newCenter = k === 1 ? center : tr.unproject(from.add(delta.mult(u(s))).mult(scale));

If those are not responsible, I'd recommend to visualize these variables:

const scale = tr.zoomScale(zoom - startZoom);
const offsetAsPoint = Point.convert(options.offset);
let pointAtOffset = tr.centerPoint.add(offsetAsPoint);
const locationAtOffset = tr.pointLocation(pointAtOffset);
const center = LngLat.convert(options.center || locationAtOffset);
this._normalizeCenter(center);

from maplibre-gl-js.

github-actions avatar github-actions commented on August 18, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

from maplibre-gl-js.

JannikGM avatar JannikGM commented on August 18, 2024

I don't think this was fixed yet, so I'm leaving this comment to prevent closing.

from maplibre-gl-js.

github-actions avatar github-actions commented on August 18, 2024

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.

from maplibre-gl-js.

github-actions avatar github-actions commented on August 18, 2024

This issue was closed because it has been stalled for 30 days with no activity.

from maplibre-gl-js.

github-actions avatar github-actions commented on August 18, 2024

This issue was closed because it has been stalled for 30 days with no activity.

from maplibre-gl-js.

alunux avatar alunux commented on August 18, 2024

Sorry, any update on this?

from maplibre-gl-js.

HarelM avatar HarelM commented on August 18, 2024

Nope, feel free to open a PR if this is something that is close to your heart.

from maplibre-gl-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.