Line tileset reference
Lines represent the edge between two boundaries and allow for clean dashed line styles and special display of disputed boundaries.
boundaries_admin_lines
Only the administrative (adm
) boundary type is available as line data. The administrative lines tileset contains a single layer containing boundary lines for all administrative levels (adm0
through adm4
).
id
text
Boundary line IDs are usually composed by combining the IDs of the polygons from either side of the line (sorted alphanumerically and separated by a hyphen).
level
text
The level
is a number from 0 through 4 representing the lowest-numbered level the boundary is a part of.
dispute
text
While no single map will reflect all global perspectives, acknowledging disputes where they exist is an important aspect of cartography and can lead to more universally usable maps. The dispute
value will always be either true
or false
(never null
). You should style boundary lines with a dispute
value of true
using a dashed or otherwise distinct style from non-disputed lines.
coastal
text
The coastal
field contains the text true
or false
indicating whether the boundary is along a coast or not. Most coastal boundaries are omitted from the line layer, so the values are nearly always false
.
iso_3166_1
text
For boundaries with an level
of 1 through 5, the iso_3166_1
value contains the id
of the admin level 0 area that contains the boundary. For boundaries with a level
of 0, the iso_3166_1
values is the same as the line id
.
worldview
text
The vector tiles contain multiple versions of some boundaries, each with a worldview
value indicating the intended audience. It is important to apply a worldview filter to all your style layers. If you do not apply a worldview filter, your map will show conflicting and overlapping boundaries.
The worldview
property will be either all
or a comma-separated list of one or more ISO 3166-1 country codes. The supported region-specific worldviews are:
Value | Description |
---|---|
AR | Features for an Argentinian audience |
CN | Features for a mainland Chinese audience |
IN | Features for an Indian audience |
JP | Features for a Japanese audience |
MA | Features for a Moroccan audience |
RU | Features for a Russian audience |
TR | Features for a Turkish audience |
US | Features for an American audience |
Returned features are not officially approved for use by the above countries' respective governments.
Since a single feature can belong to more than one worldview, you will need to use the "in"
operator (available in Mapbox GL JS 1.6.0 or later) to construct a layer filter.
This example filter enables a US worldview. Be sure to always include both "all"
and one of the region-specific values.
[
"any",
["==", "all", ["get", "worldview"]],
["in", "us", ["get", "worldview"]]
]