openplans / shareabouts

Shareabouts is a mapping application for crowdsourced info gathering.
GNU General Public License v3.0
276 stars 150 forks source link

Upgrade Mapbox GL JS to 1.4.1 to support satellite layers #206

Closed BenSturmfels closed 1 year ago

BenSturmfels commented 2 years ago

Currently using a Mapbox layer with type: mapbox and a tile-based styles such as satellite imagery fails with the following error (Firefox):

Unknown expression "image". If you wanted a literal array, use ["literal", [...]].

Support for the image expression was added to Mapbox GL JS in version 1.4, so I've conservatively upgraded from 0.53.0 to the latest 1.4 patch release.

While using a normal url: config is an alternative, we've found that Mapbox's satellite styles can't be zoomed past 17 or 18 and I believe that the tile-based layers are billed at a higher rate.

BenSturmfels commented 2 years ago

Just discovered that Mapbox GL JS is no longer under a free software license from 2.0.0, so I'm glad I didn't just pick the latest version!

BenSturmfels commented 1 year ago

@mjumbewu we've also been using this change in production for more than a year, so would you be comfortable if I merged it?

mjumbewu commented 1 year ago

Yes, also LGTM; merge away.