Docs

Advanced feature styling

Mapforge stores your maps in GeoJSON format. Below you can see the list of supported properties to style your map elements (called features in GeoJSON).
Most of the properties are supported to be changed in the UI. For changing the properties directly, you can use the Edit JSON button in the feature details modal.

Supported feature attributes:

Extending the Mapbox Simplestyle Spec, Mapforge supports these feature attributes:

All geometries:

Point geometry:

LineString geometry:

Polygon geometry:

Label fonts

label-font takes an array of font names. Names are looked up in two places:

  1. The glyph server of the base map. Every base map ships a fixed set of fonts, so the valid names differ per map: noto_sans_regular / noto_sans_bold and 16 other families on the VersaTiles based maps (full list), Noto Sans Regular and friends on the MapTiler and OpenFreeMap based maps.
  2. Web fonts and device fonts. If the name is not on the glyph server, the label is rendered in the browser instead, from any font the browser can resolve by CSS name. That covers the web fonts Mapforge loads on every page — SUSE, Bree Serif, Lobster Two — and the fonts installed on the device of the viewer.

Weight and style

There is no separate weight property. The first entry of the array decides weight and style, the entries after it are the family the browser actually resolves:

{ "label": "Hello", "label-font": ["SUSE Bold", "SUSE"] }

Recognized keywords in that first entry: thin 100, extra light 200, light 300, regular 400, medium 500, semibold 600, bold 700, extra bold 800, heavy 900, plus italic and oblique. "SUSE Light Italic", "SUSE" renders SUSE at weight 300, italic.