Coder Social home page Coder Social logo

Comments (7)

sfairgrieve avatar sfairgrieve commented on May 14, 2024

@FarhodKurbonov you should be create the DataLayer and then just add that DataLayer instance to the MarkerClusterGroup as a single layer. Let me know if this doesn't work.

from leaflet-dvf.

FarhodKurbonov avatar FarhodKurbonov commented on May 14, 2024

@sfairgrieve. I did as your recommendation in the example of 'earthquakes4' of this repository everything works fine. But unfortunately tooltip functionality was broken (tooltip does not show). Same result with 1.0 branch and leaflet 1.0 beta 1

from leaflet-dvf.

sfairgrieve avatar sfairgrieve commented on May 14, 2024

Thanks for pointing this out. I'm seeing the same problem and will try to have a fix in soon.

from leaflet-dvf.

sfairgrieve avatar sfairgrieve commented on May 14, 2024

Still trying to figure this one out. I believe since the tooltip is being added to the DataLayer/LayerGroup that clustering is being performed on, the MarkerCluster plugin is hiding it/not displaying it. I've tried changing the code to add the tooltip directly to the map, but in the MarkerCluster case, it's not calling onAdd for the DataLayer, so _map is never being set.

from leaflet-dvf.

sfairgrieve avatar sfairgrieve commented on May 14, 2024

Check out the earthquakes4 example in the 1.0dev branch. I updated this example to use the MarkerCluster plugin. Right now, it's a little bit hacky, but it works. I'm still looking at ways to make this better, and I might make another update soon.

from leaflet-dvf.

sfairgrieve avatar sfairgrieve commented on May 14, 2024

Ok, ignore my comments from a few minutes ago. The latest code in the 1.0dev branch and the earthquakes4 example should be good. I changed some of the tooltip logic so it works better with the MarkerCluster plugin.

from leaflet-dvf.

FarhodKurbonov avatar FarhodKurbonov commented on May 14, 2024

Thanks a lot for help. It seems tooltip work properly.

from leaflet-dvf.

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.