I have a GeoJSON file corresponding to blocks from the Census website. I'd like to display them on a map with them shaded a certain color as determined by various data stored in a PostGIS database. Since blocks are so small, I'd like to use a tile layer to only serve the necessary amount to the client as the entire dataset is way too big (300+ MB).

Is there a way to color polygons individually based on corresponding datapoints either on the client or server side? I have all the polygons along with their corresponding datapoints stored in a PostGIS database. I'm using TileSplash to retreive the polygons and serve up a vector tile layer which then gets rendered by leaflet (react-leaflet). Is this possible to do with a vector tile layer or do I need to use a raster tile layer?


I ended up using the D3 Tile Layer for Leaflet. It allows you to style each feature individually, which worked perfectly.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.