Overview

  • Data-driven styling for boundaries allows you to style Google's administrative boundary polygons and display them on your maps, targeting regions by place ID.

  • You can select from various feature types like COUNTRY, ADMINISTRATIVE_AREA_LEVEL_1, LOCALITY, and more, to enable on your map style.

  • Boundary polygon styling options include fill (color, opacity) and stroke (color, opacity, stroke weight), enabling features like highlighting specific boundaries or creating choropleth maps.

  • Google provides per-country boundary coverage information to understand the availability of feature types for different regions.

  • Data-driven styling for boundaries can be integrated with the Geocoding and Places APIs for enhanced functionality.

Select platform: Android iOS JavaScript

Data-driven styling for boundaries lets you access Google's polygons for administrative boundaries, apply styling to boundary polygons, and display them on your maps.

Data-driven styling for boundaries lets you target regions by place ID and apply custom styling to boundary polygons on the map. Each feature type represents a type of region; you select which feature types to enable when configuring a map style.

Consult Google boundaries coverage to see per-country boundary coverage.

Feature types

Data-driven styling provides access to Google boundaries for feature types that represent administrative areas. Administrative areas are categorized by function, for example country, state, locality, and postal code. Feature types are arranged by administrative level, the structure of which varies by country. The following feature types are supported for data-driven styling for boundaries:

  • COUNTRY — The national political entity, typically the highest order type.
  • ADMINISTRATIVE_AREA_LEVEL_1 — A first-order civil entity below the country level. Within the United States, these administrative levels are states.
  • ADMINISTRATIVE_AREA_LEVEL_2 — A second-order civil entity below the country level. Within the United States, these administrative levels are counties.
  • LOCALITY — An incorporated city or town political entity.
  • POSTAL_CODE — A postal code, as used to address postal mail within the country.
  • SCHOOL_DISTRICT — A school district; includes unified, elementary, and secondary.

Administrative areas are represented on the map as feature layers; each type has its own layer. Feature layers are enabled per map style. You can choose which feature layers to enable when setting up your map style in the Google Cloud console.

Style boundary polygons

You can apply styles to boundary polygons for fill (color, opacity), and stroke (color, opacity, stroke weight). Use styling to:

Google boundaries coverage shows per-country availability of feature types.

Next steps