MapLibre GL JS Compatibility

Vector tile support via ShumateVectorRenderer is based on the MapLibre GL JS style specification. A style is a JSON document describing the vector data source and the layers that are drawn to render the map. It includes a JSON-based expression format that allows style authors to do a wide range of data-based styling.

Not all of the features in the spec are implemented in libshumate, and some features have important differences. These differences are described here.

Rasterization

The most important architectural difference between MapLibre GL JS and libshumate is that, while MapLibre uses WebGL to render vector data directly to the screen, libshumate rasterizes the tiles first. This has broad effects because once a tile is rendered, its pixel contents do not change as you zoom.

Style Root

bearing ❌ Not supported
center ❌ Not supported
glyphs ❌ Not supported. Text is drawn using Pango and the system fonts.
layers ✅ Supported
light ❌ Not supported
name ✅ Supported
pitch ❌ Not supported
sources ✅ Supported, but see caveats below
sprite ❌ Not supported. Sprite sheets are set using shumate_vector_renderer_set_sprite_sheet_data(). Only one sprite sheet may be used.
terrain ❌ Not supported
transition ❌ Not supported
version ❌ Not supported
zoom ❌ Not supported

Sources

Exactly one source must be provided. Only vector sources are supported; for raster maps, use ShumateRasterRenderer. TileJSON URLs via the “url” property are not supported.

vector

attribution ❌ Not supported. Use ShumateMapSource:license and ShumateMapSource:license-uri instead.
bounds ❌ Not supported
maxzoom ✅ Supported
minzoom ✅ Supported
promoteId ❌ Not supported
scheme ❌ Not supported
tiles ✅ Supported
url ❌ Not supported. The stylesheet will fail to parse if this property is present.
volatile ❌ Not supported

Layers

filter ✅ Supported
id ✅ Supported
maxzoom ✅ Supported
minzoom ✅ Supported
source ❌ Not supported. ShumateVectorRenderer only supports a single data source, so this property is ignored.
source-layer ✅ Supported
type ✅ Supported

background

background-color ✅ Supported
background-opacity ✅ Supported
background-pattern ❌ Not supported
visibility ❌ Not supported

fill

fill-antialias ❌ Not supported
fill-color ✅ Supported
fill-opacity ✅ Supported
fill-outline-color ❌ Not supported
fill-pattern ✅ Supported
fill-sort-key ❌ Not supported
fill-translate ❌ Not supported
fill-translate-anchor ❌ Not supported
visibility ❌ Not supported

line

line-blur ❌ Not supported
line-cap ✅ Supported
line-color ✅ Supported
line-dasharray Supported, but does not support expressions.
line-gap-width ❌ Not supported
line-gradient ❌ Not supported
line-join ✅ Supported
line-miter-limit ❌ Not supported
line-offset ❌ Not supported
line-opacity ✅ Supported
line-pattern ❌ Not supported
line-round-limit ❌ Not supported
line-sort-key ❌ Not supported
line-translate ❌ Not supported
line-translate-anchor ❌ Not supported
line-width ✅ Supported
visibility ❌ Not supported

symbol

Symbols are rendered using Pango and system fonts, not the glyphs defined in the spec.

icon-allow-overlap ❌ Not supported
icon-anchor ✅ Supported
icon-color ❌ Not supported
icon-halo-blur ❌ Not supported
icon-halo-color ❌ Not supported
icon-halo-width ❌ Not supported
icon-ignore-placement ❌ Not supported
icon-image ✅ Supported
icon-keep-upright ❌ Not supported
icon-offset Expressions are not supported.
icon-opacity ❌ Not supported
icon-optional ❌ Not supported
icon-overlap ❌ Not supported
icon-padding ❌ Not supported
icon-pitch-alignment ❌ Not supported
icon-rotate ❌ Not supported
icon-rotation-alignment ✅ Supported
icon-size ✅ Supported
icon-text-fit ❌ Not supported
icon-text-fit-padding ❌ Not supported
icon-translate ❌ Not supported
icon-translate-anchor ❌ Not supported
symbol-avoid-edges ❌ Not supported
symbol-placement “line-center” is treated like “line”.
symbol-sort-key ✅ Supported
symbol-spacing ✅ Supported
symbol-z-order ❌ Not supported
text-allow-overlap ❌ Not supported
text-anchor Not supported when glyphs are positioned along a line geometry.
text-color ✅ Supported
text-field Only plain strings are supported, not formatted strings.
text-font Expressions are not supported. Fallback fonts are not handled correctly.
text-halo-blur ❌ Not supported
text-halo-color ❌ Not supported
text-halo-width ❌ Not supported
text-ignore-placement ❌ Not supported
text-justify ❌ Not supported
text-keep-upright ✅ Supported
text-letter-spacing ❌ Not supported
text-line-height ❌ Not supported
text-max-angle ❌ Not supported
text-max-width ❌ Not supported
text-offset Not supported when glyphs are positioned along a line geometry. Expressions are not supported.
text-opacity ❌ Not supported
text-optional ❌ Not supported
text-overlap ❌ Not supported
text-padding ✅ Supported
text-pitch-alignment ❌ Not supported
text-radial-offset ❌ Not supported
text-rotate ❌ Not supported
text-rotation-alignment ✅ Supported
text-size ✅ Supported
text-transform ❌ Not supported
text-translate ❌ Not supported
text-translate-anchor ❌ Not supported
text-variable-anchor ❌ Not supported
text-writing-mode ❌ Not supported
visibility ❌ Not supported

raster

❌ Not supported. Use ShumateRasterRenderer instead.

circle

❌ Not supported

fill-extrusion

❌ Not supported

heatmap

❌ Not supported

hillshade

❌ Not supported

Expressions

Unlike MapLibre GL JS, libshumate does not check expression types when the style is parsed, only when they are evaluated.

Due to limitations in libshumate’s rendering pipeline, all expressions are evaluated at integer zoom levels only.

Types

array ❌ Not supported
boolean ❌ Not supported
collator ❌ Not supported
format ❌ Not supported
image ✅ Supported
literal Only array literals are supported, not objects.
number ❌ Not supported
number-format ❌ Not supported
object ❌ Not supported
string ❌ Not supported
to-boolean ❌ Not supported
to-color ❌ Not supported
to-number ❌ Not supported
to-string ❌ Not supported
typeof ❌ Not supported

Feature data

accumulated ❌ Not supported
feature-state ❌ Not supported
geometry-type ✅ Supported
id ❌ Not supported
line-progress ❌ Not supported
properties ❌ Not supported

Lookup

at ❌ Not supported
get The object argument is not supported.
has The object argument is not supported.
in Only supports arrays, not substring search.
index-of ❌ Not supported
length ❌ Not supported
slice ❌ Not supported

Decision

! ✅ Supported
!= Does not support the collator argument.
< Does not support the collator argument.
<= Does not support the collator argument.
== Does not support the collator argument.
> Does not support the collator argument.
>= Does not support the collator argument.
all ✅ Supported
any ✅ Supported
case ✅ Supported. The fallback argument is optional in libshumate; if no case matches, then the expression fails to evaluate.
coalesce ✅ Supported. Arguments that fail to evaluate will be skipped rather than causing the entire expression to fail.
match ❌ Not supported
within ❌ Not supported

Ramps, scales, curves

interpolate ❌ Not supported
interpolate-hcl ❌ Not supported
interpolate-lab ❌ Not supported
step ❌ Not supported

Variable binding

let ✅ Supported
var ✅ Supported

String

concat ✅ Supported
downcase ✅ Supported
is-supported-script ❌ Not supported
resolved-locale ❌ Not supported
upcase ✅ Supported

Color

rgb ❌ Not supported
rgba ❌ Not supported
to-rgba ❌ Not supported

Math

- (subtraction) ✅ Supported
* (multiplication) ✅ Supported
/ (division) ✅ Supported
% (remainder) ✅ Supported
^ (exponent) ✅ Supported
+ (sum) ✅ Supported
abs ✅ Supported
acos ✅ Supported
asin ✅ Supported
atan ✅ Supported
ceil ✅ Supported
cos ✅ Supported
distance ❌ Not supported
e ✅ Supported
floor ✅ Supported
ln ✅ Supported
ln2 ✅ Supported
log10 ✅ Supported
log2 ✅ Supported
max ✅ Supported
min ✅ Supported
pi ✅ Supported
round ✅ Supported
sin ✅ Supported
sqrt ✅ Supported
tan ✅ Supported

Zoom

✅ Supported. Zoom expressions are supported anywhere in libshumate, not just as the input to a top-level “step” or “interpolate” expression.

Heatmap

❌ Not supported