Skip to content

What is the best way to detect whether the http server/CDN serving the PMtiles file is down via an error/event through the PMtiles library? #196

Answered by bdon
CATALYST1109 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, you are right - any errors aren't surfaced through MapLibre correctly right now.

I opened a PR which should let you catch error events in MapLibre when any part of pmtiles loading fails, example:

map.on('error', function() {
console.log('A error event occurred.');
});

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bdon
Comment options

bdon Jun 17, 2023
Maintainer

@CATALYST1109
Comment options

Answer selected by CATALYST1109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants