DefaultMvtStyle

Hardcoded style table approximating an OpenMapTiles "basic" look. Covers the layer names commonly seen across OpenMapTiles, Maptiler v3, Mapbox v8, and Protomaps "basemaps" schemas.

Decisions:

  • POINT features always return null — hand-coded styles don't carry label data; use MvtRuleBasedStyle for labels.

  • Roads are styled by class/kind property where available, with a generic fallback.

  • Outlines are off for area fills — outlining a dense mesh of tiny polygons drops the framerate without improving readability.

  • Shadows are off layer-wide; vector-tile features are flat surface decals, not occluders.

Properties

Link copied to clipboard

Solid base under every fill — the Mapbox background layer. Fills gaps MVT has no polygon for (bare rock, street interiors, highway corridors); null (default) shows whatever is beneath the layer. See Z_BACKGROUND.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun styleFor(layerName: String, geometryType: MvtGeometryType, properties: Map<String, Any?>): ShapeAttributes?

Resolve attributes for one feature. layerName is the MVT layer (e.g. water, transportation, building); geometryType gates polygon-vs-line attribute choice. properties is the inflated feature property map.

Link copied to clipboard
open override fun zOrderFor(layerName: String, geometryType: MvtGeometryType, properties: Map<String, Any?>): Int

Optional paint order within a tile. Features with smaller zOrderFor paint first, features with larger values paint over them. Default 0 — every feature shares the same z-layer, and the order falls through to MVT-server-determined layer iteration order (good enough for OpenMapTiles-schema servers that already order water → landuse → roads → buildings sensibly).