All docsMapbox BoundariesReferencePolygon tileset reference

Polygon tileset reference

Polygons represent the area covered by a boundary and can be used for choropleth visualizations, pattern fills, or hover and click interactions.


Each polygon tileset contains a single layer named boundaries_{type}_{level}, where {type} is one of the Boundary types, and {level} is the level number.

feature id

The feature id provides an identifier integer for each feature. These IDs are globally unique within a given worldview. Some are duplicated, but only where they represent different versions of the same feature for different worldviews.

What is a Feature ID?

The id is a special property of a vector tile feature. It is always a whole number, and it is treated differently than normal feature properties. To reference an id in a Mapbox GL expression, you would write ["id"] rather than ["get", "property_name"], as you would use for normal properties.

iso_3166_1 text

The iso_3166_1 property contains the ISO 3166-1 code of each feature's administrative level 0 parent (or the feature itself in the case of the adm0 tileset).

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:

ARFeatures for an Argentinian audience
CNFeatures for a mainland Chinese audience
INFeatures for an Indian audience
JPFeatures for a Japanese audience
MAFeatures for a Moroccan audience
RUFeatures for a Russian audience
TRFeatures for a Turkish audience
USFeatures 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.

  ["==", "all", ["get", "worldview"]],
  ["in", "US", ["get", "worldview"]]