How to return array or json object using function ST_AsMVT in PostGIS

80 views Asked by At

I am working in PostgreSQL/PostGIS and could you please explain me how I can return an array or json object data in the tiles using ST_AsMVT function. Right now I am using GeoJSON to return an array or json object, and for big data it is sadly...

When I put an array into the tiles and try to use the ST_AsMVT function and return this on the frontend (mapbox), I can't use the array field here...

1

There are 1 answers

0
SkyAero On

ST_AsMvt creates a binary Mapbox Vector Tile representation. You cannot use an MVT to extract data from.

If there is too much data to transfer, consider breaking it up, for example by using (smaller) tiles.