mapbox / mapbox-sdk-js

A JavaScript client to Mapbox services, supporting Node, browsers, and React Native
Other
706 stars 185 forks source link

HTTP 413 getStaticImage - Request entity too large #324

Open alexbudure opened 5 years ago

alexbudure commented 5 years ago

My application requires a static image with a ~10 geoJson overlays to put into a PDF report. After the 2nd geoJson circle, I get a HTTP 413 ("Request entity too large").

In the Navigation service docs, Mapbox states

If your account limits are larger than these defaults and you receive an HTTP 413 ("Request entity too large") or HTTP 414 ("Request URL too large") error when you make a GET request to either API, then using POST is a good option for you.

Is there a way to do a POST for static images as well?

andrewharvey commented 5 years ago

Looking at the API docs at https://docs.mapbox.com/api/maps/#static-images it doesn't look like you can make a POST request to the static image API.

As an aside, I have had success using Puppeteer to generate static maps from GL JS, but it can be temperamental, tricky to setup and has a much larger resource requirements.

teddyward commented 5 years ago

I'm also using Puppeteer to generate static maps from GL JS, but am burning huge amounts of memory because I have to have ~10 different maps in my PDFs

fernandopg commented 2 years ago

Hello, We are experiencing the same issue, did you find any solution or workaround for this @teddyward? Really appreciate your help. Thank you!

yoad-snapland commented 7 months ago

Any news about it? I have the same problem....

jonahallibone commented 1 month ago

also an issue for me