Line tileset reference
Lines represent the edge between two boundaries and allow for clean dashed line styles and special display of disputed boundaries.
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 (
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 is a number from 0 through 4 representing the lowest-numbered level the boundary is a part of.
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
null). You should style boundary lines with a
dispute value of
true using a dashed or otherwise distinct style from non-disputed lines.
coastal field contains the text
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
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
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.
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:
|Features for a mainland Chinese audience|
|Features for an Indian audience|
|Features for a Japanese audience|
|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"]] ]