Data-driven styling lets you access Google's polygons for administrative boundaries, apply styling to boundary polygons, display them on your maps, and combine your own business data to create rich, customized choropleth maps. Also included is the Region Lookup API which lets you search for the place IDs of regions.
Data-driven styling lets you target regions by place ID or display name, 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.
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 the Preview release of Data-driven styling:
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.
ADMINISTRATIVE_AREA_LEVEL_3— A third-order civil entity below the country level.
ADMINISTRATIVE_AREA_LEVEL_4— A fourth-order civil entity below the country level.
LOCALITY— An incorporated city or town political entity.
SUBLOCALITY_LEVEL_1— A first-order civil entity below a locality.
NEIGHBORHOOD— A named neighborhood.
POSTAL_CODE— A postal code, as used to address postal mail within the country.
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:
- Style a boundary polygon or show all the boundaries for a feature type.
- Create a choropleth map by joining your own business data.
Google boundaries coverage shows per-country availability of feature types.