Skip to content
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

Unhandled exception when pmtiles is used and GeoJSON is requested #1187

Closed
Jollyfant opened this issue Feb 26, 2024 · 5 comments
Closed

Unhandled exception when pmtiles is used and GeoJSON is requested #1187

Jollyfant opened this issue Feb 26, 2024 · 5 comments

Comments

@Jollyfant
Copy link
Contributor

In serve_data.js an exception is triggered because isGzipped is undefined: https://github.com/maptiler/tileserver-gl/blob/master/src/serve_data.js#L73 when pmtiles is used as data source and GeoJSON is requested.

Solution is to either add a check for Gzip magic bytes as per https://github.com/maptiler/tileserver-gl/blob/master/src/serve_data.js#L120 or remove the check entirely.

@acalcutt
Copy link
Collaborator

I think that check should probably be removed, since the data from pmtiles getZxy function is already ungzipped
https://github.com/protomaps/PMTiles/blob/main/js/index.ts#L987

I removed similar checks in the area you mentioned, but that one must have been missed.

a PR to remove that check is welcome.

@acalcutt
Copy link
Collaborator

Just wondering, do you have an example pmtiles geojson file I can test with? The PR looks good, I just realized geojson pmtiles isn't something I have tested before.

@acalcutt
Copy link
Collaborator

Nevermind, I forgot this isn't a geojson formatted pmtiles, but a pbf pmtiles in geojson format. I can test with what I have.

@acalcutt
Copy link
Collaborator

Thank for the PR, it has been merged. I will try to make a new release when I get home later tonight.

@acalcutt
Copy link
Collaborator

Fixed by #1188

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants