Vespucci Mapbox-GL Style Support#

For the Mapbox documents see https://docs.mapbox.com/mapbox-gl-js/style-spec/

Caveats#

While a number of styles and corresponding vector tile schemas have been tested and within the limits described on this page things work, following specific points should be taken in to account:

  • the support was mainly intended for relatively light weight QA data overlays, as this is based on Android Canvas rendering and not a purpose specific OpenGL rendering implementation, performance will in general be slow. This is further confounded by many sources providing tiles up to a maximum of zoom level 14, these then tend to be very large and often contain far more data than what would be needed for the current view.
  • we've implemented some simple label and icon collision detection, however if a collision is detected, we simply doesn't render one of the colliding objects without attempting to relocate the offending symbol (collision avoidance). Further there is currently a hard wired limit of 200 objects that are handled by this, any further ones are not rendered (the choice of limit is not of any particular significance).

Sources#

Only one vector tile source is currently supported, all other source configuration is ignored.

Source attributes#

Key Value Support Notes
type vector yes source objects of other types are ignored
tiles yes only the first entry is used, if the element is missing the source will be ignored
minzoom yes default: 0
maxzoom yes default: 22
attribution yes default: nothing
bounds yes default: web mercator extent
url no there is currently no TileJSON support
promoteId no
scheme no always xyz
volatile no

Layers#

Supported layers: background, fill, fill-extrusion, line, symbol, circle

fill-extrusion layers are treated as flat fill layers

Unsupported layers: raster, heatmap, hillshade, sky

Unsupported attributes are ignored.

Font selection is not supported, we render with a standard Android system font.

Only a very small number of the new "expression" functions are currently supported, however "old style" filter expressions are supported and interpolation linear, identity and exponential interpolation for numbers, colors and categories work for lots of the supported attributes.

Style attributes#

Key Value Support Notes
version yes ignored
sprite yes

Layer attributes for supported layers#

Value support:

  • l literal
  • z "legacy" zoom based interpolation function
  • m moustache replacement
  • f filter expressions
Key Values Support Notes
All layers
minzoom l yes
maxzoom l yes
ref l yes missing from mapbox documentation
visibility l yes
interactive l yes missing from mapbox documentation
background
background-color l z yes
backgroud-opacity l z yes
background-pattern l z yes
Vector/geometry tile layers
filter f yes
source-layer l yes
fill
fill-antialias l yes
fill-color l z yes
fill_opacity l z yes
fill-outline-color l z yes
fill-pattern l z yes
fill-sort-key no
fill-translate l z yes
fill-translate-anchor no
fill-extrusion
fill-extrusion-base no
fill-extrusion-color l z yes
fill-extrusion-height no
fill-extrusion-opacity l z yes
fill-extrusion-pattern l z yes
fill-extrusion-translate l z yes
fill-extrusion-translate-anchor no
fill-extrusion-vertical-gradient no
line
line-blur no
line-cap l z yes
line_color l z yes
line-dasharray l yes
line-gap-width no
line-gradient no
line-join l z yes
line-miter-limit no
line-offset no
line-opacity l z yes
line-pattern no
line-round-limit no
line-sort-key no
line-translate no
line-translate-anchor no
line-width l z yes
symbol
icon-allow-overlap no
icon-anchor l z yes
icon-color no
icon-halo-blur no
icon-halo-color no
icon-halo-width no
icon-ignore-placement no
icon-image l m z yes
icon-keep-upright no
icon-offset l z yes
icon-opacity no
icon-optional no
icon-padding no
icon-pitch-alignment no
icon-rotate l z yes
icon-rotation-alignment no
icon-size l z yes
icon-text-fit no
icon-text-fit-padding no
icon-translate no
icon-translate-anchor no
symbol-avoid-edges no
symbol-placement l z yes
symbol-sort-key no
symbol-spacing no
symbol-z-order no
text-allow-overlap no
text-anchor l z yes just "top" and "bottom" supported
text-color l z yes
text-field l m yes
text-font no
text-halo-blur no
text-halo-color l z yes
text-halo-width l z yes
text-ignore-placement no
text-justify l z yes "auto" not supported
text-keep-upright no
text-letter-spacing l z yes
text-line-height no
text-max-angle no
text-max-width l z yes
text-offset l z yes
text-opacity l z yes
text-optional no
text-padding no
text-pitch-alignment no
text-radial-offset no
text-rotate no
text-rotation-alignment no
text-size l z yes
text-transform l z yes
text-translate no
text-translate-anchor no
text-variable-anchor no
text-writing-mode no
circle
circle-blur no
circle-color l z yes
circle-opacity l z yes
circle-pitch-alignment no
circle-pitch-scale no
circle-radius l z yes
circle-sort-key no
circle-stroke-color l z yes
circle-stroke-opacity l z yes
circle-stroke-width l z yes
circle-translate l z yes
circle-translate-anchor no
Expressions Support Notes
any in filters legacy
all in filters legacy
!in in filters legacy
in in filters legacy
>= in filters legacy
> in filters legacy
<= in filters legacy
< in filters legacy
!= in filters legacy
== in filters legacy
!has in filters new, 1 argument version only
has in filters new, 1 argument version only
get in filters new, 1 argument version only
id no new
geometry-type no new
properties no new
feature-state no new
array no new
boolean no new
collator no new
format no new
image no new
literal no new
number no new
number-format no new
object no new
string no new
to-boolean in filters new
to-number no new
to-string no new
to-color no new
typeof no new
accumulated no new
feature-state no new
geometry-type no new
line-progress no new
properties no new
at no new
config no new
in no new
index-of no new
length no new
measure-light no new
slice no new
! no new
!= no new
< no new
<= no new
== no new
> no new
>= no new
all no new
any no new
case no new
coalesce no new
match no new
within no new
interpolate no new
interpolate-hci no new
interpolate-lab no new
step no new
let no new
var no new
concat no new
downcase no new
is-supported-script no new
resolved-locals no new
upcase no new
hsl no new
hsla no new
rgb no new
rgba no new
to-rgba no new
- no new
+ no new
/ no new
% no new
abs no new
acos no new
asin no new
atan no new
ceil no new
cos no new
distance no new
e no new
floor no new
ln no new
ln2 no new
log10 no new
log2 no new
max no new
min no new
pi no new
random no new
round no new
sin no new
sqrt no new
tan no new
distance-from-center no new
pitch no new
zoom no new
heatmap-density no new