mapbox/geojson-vt

Rendering tile result on mapbox-gl resulted an Unimplemented type error

EdgarJeremy opened this issue · 3 comments

I have setup a server that serve the result of tiling :
{ features: [ { geometry: [Array], type: 3, tags: null } ], numPoints: 659, numSimplified: 248, numFeatures: 1, source: [ { id: null, type: 'MultiPolygon', geometry: [Array], tags: undefined, minX: 0.8467321445214605, minY: 0.4957256317138672, maxX: 0.8468036651611328, maxY: 0.4958515167236328 } ], x: 6936, y: 4061, z: 13, transformed: true, minX: 0.8467321445214605, minY: 0.4957256317138672, maxX: 0.8468036651611328, maxY: 0.4958515167236328 }

but when I put the endpoint to this server as a mapbox vector tile source it throw the error
Error {message: "Unimplemented type: 3"}

what could possibly go wrong?

sounds like it could be a gzip error, are the tiles gzipped?

I send the tile as a json response. The json returned by .getTile(z,x,y)

You'll need https://github.com/mapbox/vt-pbf to encode the result as a vector tile.