mapbox / mapbox-studio-classic

https://www.mapbox.com/mapbox-studio/
BSD 3-Clause "New" or "Revised" License
1.14k stars 229 forks source link

mapbox studio classic : request entity too large #1493

Open pecbarnes2 opened 8 years ago

pecbarnes2 commented 8 years ago

Hello Is there a maximum size for style entries in style file ? My cartocss leads to the following failure 'Request entity too large' I wish I have something like that : (please replace ... by the missingf elements)

layer { [ATTRIBUTE="0000"],[ATTRIBUTE="0001"], ..., [ATTRIBUTE="0100"] { polygon-fill: #fde}}

layer { [ATTRIBUTE="1000"],[ATTRIBUTE="1001"], ..., [ATTRIBUTE="1100"] { polygon-fill: #dea}}

...

layer { [ATTRIBUTE="9000"],[ATTRIBUTE="9001"], ..., [ATTRIBUTE="9100"] { polygon-fill: #96e}}

Is there another way of doing this, if this one cannot work ? Thank you

xingfuryda commented 8 years ago

I believe this is due to a POST size limit that is set by the express framework.

I was able to workaround this by changing:

app.use(bodyParser.json());

to:

app.use(bodyParser.json({limit:1024*1024*50, type:'application/json'}));

in file:

server.js

rroset commented 7 years ago

@xingfuryda solution worked for me