Giter Club home page Giter Club logo

Comments (7)

shelkie avatar shelkie commented on July 28, 2024 3

I was running into this issue as well, and managed to resolve it by calling the _update method on the GL layer whenever the map is zoomed.

var map = L.map(...);
var gl = L.mapboxGL(...).addTo(map);
map.on('zoomend',function(){
    gl._update();
}

from mapbox-gl-leaflet.

fnicollet avatar fnicollet commented on July 28, 2024

Finally getting a little time to try and fix those issues ...
This one is actually the same issue as one of my other project:
fnicollet/Leaflet#1
at zoom 0/1, the top/left corner coordinates is outside the "world boundaries" and gets clamped, which produce an offset.
This has been fixed by @IvanSanchez in this commit on Renderer.js:
Leaflet/Leaflet@a2595bb

So now, I just have to port it to this project, but so far, I can't figure out how to do the calculation for the top-left corner ...

from mapbox-gl-leaflet.

thunder39 avatar thunder39 commented on July 28, 2024

Having this issue as well! Also when I zoom out and then click on a clustermarker the map sometimes doesn't load at all or the markers are offset a bit.
Is there any discussion on integrating mapbox-gl-leaflet into leaflet core?
Let me know if there's anything I can help?

from mapbox-gl-leaflet.

fnicollet avatar fnicollet commented on July 28, 2024

from mapbox-gl-leaflet.

thunder39 avatar thunder39 commented on July 28, 2024

Thanks for you answer.

Here's a screenshot with the issue from the cluster example. I believe it's exactly the same as mentioned by @EreMaijala .
clustermarker_bug

If you click on a cluster which is far away, the map doesn't load completely and the markers are offset by a bit. However, when you just slightly move the map with the mouse it adjusts and is then shown correctly again. How can we fix this?

from mapbox-gl-leaflet.

Razoralpha avatar Razoralpha commented on July 28, 2024

Any progress about the shifting issue? It would be more or less perfect if this issue would be gone.

from mapbox-gl-leaflet.

jgravois avatar jgravois commented on July 28, 2024

resolved via #95

from mapbox-gl-leaflet.

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.