-
-
Notifications
You must be signed in to change notification settings - Fork 702
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
Icons not showing when clustering markers with leaflet.markercluster #1540
Comments
Here is the expected default behavior when using |
I am not sure what you expect... This is entirely your usage of leaflet. I am pretty confident if you create a demo of only the Leaflet map, you will have the same behaviour. When I inspect the page I see that the img elements reference |
The thing is that this default behavior is not seen on the initial clustering implementation. After inspecting a bit I found out that the clustering icon added to the map shares classes with the default PSV map markers, So I assume this has something to do with styles collisions. Here You can see a concise example of the expected behavior on a simple leaflet map that clusters icons using the default strategy, with no custom icon, on codesandbox. Ps: Its |
Ok but you are using the react, so the solution to missing marker image probably still applies. Though I didn't understand you where refering to the cluster circle, and not the image visible when the cluster is not active anymore. And I think this is only because you didn't included the stylesheet for the cluster. In your standalone example: import "leaflet.markercluster/dist/leaflet.markercluster";
import "leaflet.markercluster/dist/MarkerCluster.css";
import "leaflet.markercluster/dist/MarkerCluster.Default.css"; |
would be helpfull if you tell which classes are shared, because I don't see any, all Photo Sphere Viewer CSS classes start with "psv-" |
It works instantly when adding the above stylesheets. |
You are correct, I mistook the classnames and thought they were colliding, that was on me ✋ |
Amazing! I added one at a time but failed to add them all simultaneously. You rock, thanks! |
Describe the bug
I need to improve markers rendering performance and have started by clustering them using
leaflet.markercluster
library. After some code and markers changes, I've managed to make the clustering work but only to find out that the clustered markers icon doesn't show.It feels like the clustered markers' icon style conflicts with the default map markers' style.
I've created an online demo to check if this behavior was only happening to me, but It's happening out there as well.
Online demo URL
https://codesandbox.io/p/sandbox/goofy-tu-dwxg84
Photo Sphere Viewer version
5.11.0
Plugins loaded
compass-plugin: 5.11.0, core: 5.11.0, equirectangular-tiles-adapter:5.11.0, gallery-plugin: 5.11.0, markers-plugin: 5.11.0, plan-plugin: 5.11.0, visible-range-plugin:5.11.0
OS & browser
Chrome Macos Sonoma 14.0
Additional context
No response
The text was updated successfully, but these errors were encountered: