Skip to content

Why yesterday I met the error "markerClusterer is not defined" but today this error doesn't happen #982

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

Open
lanh-nguyen-vs opened this issue Apr 1, 2025 · 10 comments
Labels
type: question Request for information or clarification. Not an issue.

Comments

@lanh-nguyen-vs
Copy link

lanh-nguyen-vs commented Apr 1, 2025

I'm using https://unpkg.com/@googlemaps/markerclusterer/dist/index.min.js

Why yesterday I meet the error "markerClusterer is not defined" but today this error doesn't happen.

@lanh-nguyen-vs lanh-nguyen-vs added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Apr 1, 2025
@usefulthink
Copy link
Contributor

I'm sorry, you will have to be a bit more specific for us to help you with this. The only thing I can say is that there have been no changes to the library in the past weeks.

@usefulthink usefulthink added type: question Request for information or clarification. Not an issue. and removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. triage me I really want to be triaged. labels Apr 1, 2025
@lanh-nguyen-vs
Copy link
Author

lanh-nguyen-vs commented Apr 1, 2025

@usefulthink I include the lib as the following

<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=xxx"></script>    
<script src="https://unpkg.com/@googlemaps/markerclusterer/dist/index.min.js"></script>

Call function markerclusterer as the following .

new markerClusterer.MarkerClusterer({
                    markers: land_gmarkers,
                    map,
                    onClusterClick: (cluster, t, e) => {
                        const marks_in_cluster = t.markers;
                        var htmlTemp = "";
                        for (var z = 0; z < marks_in_cluster.length; z++) {
                            htmlTemp += .....";
                        }
                        infoWindow.close();
                        infoWindow.setPosition(cluster.latLng);
                        infoWindow.setContent(htmlTemp);
                        infoWindow.open({ map, anchor: t.marker });

                        google.maps.event.addListener(
                            map,
                            "zoom_changed",
                            function () {
                                infoWindow.close();
                            }
                        );
                    },
                    renderer: land_renderer,
                });

Then yesterday it showed the error markerClusterer is not defined . But today, it works without problem.
Do you know why yesterday the error markerClusterer is not defined was shown?

@lanh-nguyen-vs lanh-nguyen-vs changed the title Why yesterday I meet the error "markerClusterer is not defined" but today this error doesn't happen Why yesterday I met the error "markerClusterer is not defined" but today this error doesn't happen Apr 1, 2025
@usefulthink
Copy link
Contributor

Unfortunately not. But as it looks, I can only think of one case where this error would occur: if an error downloading the markerclusterer library from unpkg occurs (could be due to poor network connectivity or caused by an error with unpkg itself), the markerClusterer global variable wouldn't be defined.

@arugambaytraveller
Copy link

I have had the same problem. It seems to be an SSL issue with unpkg.com and Cloudflare. I am getting a 525 error SSL handshake failed. Has worked fine for months. Hopefully they will remedy the problem.

Image

@lanh-nguyen-vs
Copy link
Author

lanh-nguyen-vs commented Apr 2, 2025

@usefulthink

Unfortunately not. But as it looks, I can only think of one case where this error would occur: if an error downloading the markerclusterer library from unpkg occurs (could be due to poor network connectivity or caused by an error with unpkg itself), the markerClusterer global variable wouldn't be defined.

Thank you for your explanation too much.

@lanh-nguyen-vs
Copy link
Author

lanh-nguyen-vs commented Apr 2, 2025

@arugambaytraveller

I have had the same problem. It seems to be an SSL issue with unpkg.com and Cloudflare. I am getting a 525 error SSL handshake failed. Has worked fine for months. Hopefully they will remedy the problem.

Image

Thanks for letting me know. Your information is very helpful.

@lanh-nguyen-vs
Copy link
Author

@arugambaytraveller Do you know when and how long did the problem occur?

@Tobbb
Copy link

Tobbb commented Apr 3, 2025

You can try another CDN, for example https://cdn.jsdelivr.net/npm/@googlemaps/markerclusterer/dist/index.min.js

@arugambaytraveller
Copy link

@arugambaytraveller
Copy link

@arugambaytraveller Do you know when and how long did the problem occur?

It has been happening regularly for 2 or 3 days now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

4 participants