Points, lines & polygons
A place to write about Maputnik

Release v1.7.0

Announcing release 1.7.0 of Maputnik. This release has been a lot of hard work and I’m very excited to say we’ve added a lot of much anticipated features. Lets run through a few of the new features.

Expression support has been a feature that’s been missing for far too long. We wanted to build a solution that would be easy to use and robust across future mapbox-gl spec changes. We’ve gone for a simple JSON editor with good support for inline errors. There is a new ƒx button next to the supported fields to switch to ‘expression mode’. Read through the Mapbox GL expression docs to find out how to start writing expressions.

paint properties section showing the new expression buttons for style property the expression editor shown as a result of the expression button being clicked

You can undo simple expressions such as ["literal", VALUE] back to their non-expression form via the ⤺ undo button.

You can convert existing old style functions to expressions via the ‘convert expression’ button.

style function with new button to convert to expression the expression UI for a converted function

Making errors while writing expressions is a pretty common occurrence, well at least for me. So now all layer properties will show any errors beneath the input

inline error UI for an invalid expression

The full list of errors is still always shown beneath the map view, however now there is a quick link to jump straight to the layer with the error.

gloabl error view beneath the map

We’ve also improved function support adding support for identity functions

new UI for identity functions

Maputnik now supports all the source types and we’ve added the missing type from the sources modal, adding image, video and raw geojson.

sources modal showing new source types

Because min/max zoom is such a key part of styling layers we’ve added a slider to the inputs. This makes finding the right zoom level for your style feel a bit more interactive.

min/max zoom fields with range inputs

There has also been a bunch of updates from the tile providers. As well as the continuing updates from Ordnance Survey and Maptiler, Thunderforest have massively improved on their previous offering. Whereas before Thunderforest came with a warning, “heavy” meaning that they weren’t mobile optimised, that’s no longer the case. They’re now competitive with the other providers. It’s great to see another provider investing in vector tiles, on their blog you can read about their new outdoor and transport vector tile sources.

There are a load of smaller fixes that go into this release, including performance and accessibility improvements. Of particular note

  • Updated to latest style spec
  • Inline SDK support docs
  • OSM liberty is now the default style
  • Max zoom of map increased to 24 to be compliant with the spec
  • Added non https:// errors to the open and source modals
  • Open/closing bracket highlighting in JSON editors
  • Quick links to OSM in the debug panel
  • Selecting a layer from the map view now scrolls the layer list to show the selected item
  • Styles are formatted before being sent to Maputnik desktop
  • Layer source field no longer visible for unsupported layer types
  • OpenLayers attribution now visible (CSS issue)
  • Image inputs now work for all images types including image-pattern

I think we should all be very happy with the progress we’ve made with this release. This has all been helped by amazing testing by @pathmapper alongside their code contributions. I think the quality of this release has really been raised and that’s mostly down to their great test support.

Alongside myself (@orangemug) and @pathmapper we’ve had contributions from (in alphabetical order)

If I’ve missed someone from the list above, please submit a pull request to this post on GitHub

As always if we’ve broken something please raise an issue on GitHub and if you experience any serious issues you can use the previous v1.6.1 version while we get them resolved.

A final note I hope you’re all keeping safe during this tough period. I know a lot of people have lost their jobs over the last few months. If you’ve been impacted by COVID-19 and are in the web mapping space, I’ve opened an issue on GitHub called “COVID-19 support” where anybody can post ways they are looking for help, whether that be work because they are lost their job due to coronavirus or asking for help for projects supporting those effected by COVID-19.

Thanks for your time and keep on mapping!

*Disclaimer: This project is not affiliated with Mapbox or Mapbox Studio. It is an independent style editor for the open source technology in the Mapbox GL ecosystem.