Closed qwertguy closed 1 year ago
Update:
I am converting geojson to pbf with
tippecanoe --no-feature-limit --no-tile-size-limit --no-tile-compression --output-to-directory ../reference/ reference.geojson
from https://geovation.github.io/tippecanoe-directory-support
Mapbox asks for https://XXX.s3.eu-central-1.amazonaws.com/reference/7/41/66.pbf
but there is only a 67.pbf.
This happens with multiple files while zooming.
{status: 403, url: 'https://XXX.s3.eu-central-1.amazonaws.com/reference/10/336/537.pbf', message: 'Forbidden'}
But I only have 10/336/538 and 539.
So I get the same problems as stated in the tutorial.
In Mapbox I use:
map.addSource("reference_outline", {
//eopatch0-kern
type: "vector",
tiles: ["https://XXX.s3.eu-central-1.amazonaws.com/reference/{z}/{x}/{y}.pbf"],
});
map.addLayer({
id: "reference_outline-layer",
type: "line",
source: "reference_outline",
"source-layer": "reference",
layout: {},
paint: {
"line-color": "#FFFFFF",
"line-width": 2,
},
});
How do you convert geojson to z/x/y pbf structure?
@qwertguy Did you find a solution? I'm struggling with the same problem
Hello,
I want to use Mapbox GLJS in my frontend, Nodejs in my backend as API Proxy and the mbtile file on my s3 bucket. BUT to find the error and make everything easier I am DIRECTLY calling the s3 bucket from my frontend.
Frontend:
When using
map.addSource("reference_outline", { type: "vector", url: "https://XXX.s3.eu-central-1.amazonaws.com/reference_compressed.mbtiles", });
I receive Unexpected token 'S', "SQLite for"... is not valid JSON.
Generating mbtiles file: Tried with compressed version
tippecanoe -o reference_compressed.mbtiles --drop-densest-as-needed ../mbtiles/reference.geojson
Tried with uncompressed version
tippecanoe -o ../mbtiles/reference_notcompressed.mbtiles --drop-densest-as-needed --no-tile-compression ../mbtiles/reference.geojson
s3 Bucket:
The s3 bucket is public so no IAM or anything else that could block the request. I can directly access and download the file via link.
I upload the file/s directly in AWS.
Metadata looks like this for both reference_compressed.mbtiles and reference_notcompressed.mbtiles
Error:
Error {message: 'Unimplemented type: 3'} message : "Unimplemented type: 3" [[Prototype]] : Object constructor : ƒ Error() stackTraceLimit : 10 captureStackTrace : ƒ captureStackTrace() length : 1 name : "Error" prototype : {name: 'Error', message: '', constructor: ƒ, toString: ƒ} _classRegistryKey : "Error" arguments : (...) caller : (...) [[Prototype]] : ƒ () message : "" name : "Error" toString : ƒ toString() [[Prototype]] : Object
`
I tried many things but failed. I hope you can help me. Thanks in advance.