-
Notifications
You must be signed in to change notification settings - Fork 88
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
MarkerClusterer does not work for dataset associated with one specific client on our website #890
Comments
Just curious - are there any "irregularities" (size or bounds) with the dataset for the specific client? |
Bounds? No. The number of markers being manipulated is less than other clients. Overall memory size? Unknown. One thing that I do notice is that the map for the problem client loads a lot more slowly than the map for other clients. I will check. |
I don't know if I am doing it correctly, but the memory allocation for the markers array in the Chrome "Memory" tab Allocation Timeline measurement looks to be about 2.5 times what it is for a client of similar number of markers (app. 60 MB versus app. 26MB) To confirm I have the right number, how would you suggest I grab the memory size of the markers algorithm? |
You would need a memory profiler to verify. Sounds like there may be a lot more data associated with the markers for the specific client (just guessing -- would need a deeper dive into the data set). From what I have noticed since Google maps "upgrade" to AdvancedMarker elements is that the number of markers that can be created (compared with "classic" markers) has gone down dramatically. For example, using "classic" markers, I was able to create 6 million markers on an older Windows 10 machine running an Intel i7 processor with 32GB of RAM. Using the same machine and test with advanced markers, Chrome becomes unresponsive at around the 260,000 markers, which leads me to think that the advanced markers are much more "memory heavy" than the classic markers (but Google would have to confirm this). Also, there is an inherent flaw in the design of the clusterer because it uses map markers as input - which is a colossal waste of memory - as relatively few "map markers" are displayed in the map viewport relative to the overall (large) dataset. This is illustrated in a test I created regarding Creating data points vs creating Google map markers. |
It might be a long shot, but do you have some markers with the 0, 0 values as the position ? I've got the same issue and made a PR for it #892. |
0_0 I filtered out all markers with lat=0 and long=0 and it worked. |
EDIT: This is the lat=0/long=0 error found in other issues. I filtered those markers out and everything printed. This issue may be closed.
Hello. We are working on changing over from the old deprecated MarkerClusterer to the newer one. We've updated the map and the markers themselves to the newest implementation, as well as the MarkerClusterer library. It works for every one of our clients except one, where the clusterer just stops working entirely.
Having already worked with Google to see if it was a problem on their end, they found no issues with their side of the code pointed us your way. As we are dealing with sensitive customer data, I'd rather not put data out there publicly, but if we can set up a time for a Microsoft Teams call or something similar so I can demonstrate the problem and/or we might step through and see what the issue is, let me know if that is a possibility.
In this image, the clusterer is not working.
In the following images, as noted, it is working as intended.
If you require more information, please reach out and I will provide what I can.
The text was updated successfully, but these errors were encountered: