Skip to main content

BaseLayer

The base layer component, used to configure the inclusion and exclusion of countries and regions

Import

import { BaseLayer } from '@dynatrace/strato-geo';

Use cases

For rendering map with controlled countries and regions BaseLayer component can be used. It accepts array of country codes and region codes as include or exclude props to control display of regions on map. To include all countries * symbol can be used, to include all country states -* suffix can be used. Display of both country and regions can be controlled in the same array.

Inclusion/Exclusion of countries

Include only Spain and Austria

CodeSandbox

Include all countries, without Spain and Austria

CodeSandbox

Mix of country and state level regions

Include all countries, and all regions of Spain and Austria

CodeSandbox

Include Spain and Austria, without regions: Catalonia, Madrid, Vienna, Upper Austria

CodeSandbox
Still have questions?
Find answers in the Dynatrace Community