Overlays
An overlay is a separate data layer that you put on top of the vector map. The basemap stays the same; the overlay data is updated on its own and reaches the map by itself. Overlays work with all map styles.
Cadastral parcels
The boundaries of Estonian cadastral parcels with the cadastral code, land use purpose, area and address.
The data is updated every month. The map attribution has the form
Katastriüksuste piirid: Maa- ja Ruumiamet DD.MM.YYYY, where the date is the date of the data
(data version). It comes from the TileJSON and the map library shows it below the map
by itself; with a new data version the date changes too. If you show the data in another way, add the same attribution.
The base URL is https://api.elemroot.com; all addresses need the parameter key.
| Address | Content |
|---|---|
/tiles/v2/elemroot-cadastre-v1.json | TileJSON, current data version (start here) |
/tiles/v2/elemroot-cadastre-v1/{data_version}.json | a specific data version |
/tiles/v2/elemroot-cadastre-v1/{data_version}/{z}/{x}/{y}.mvt | tiles (MVT) |
The key is the same as for the vector map: it needs the vector map (tiles) service right.
Overlay requests are counted like vector map requests. The tiles are at zoom levels 12–16 and cover Estonia;
closer in, the map library scales up the z16 tiles, so the boundaries are visible at high zoom too.
The layer is also in the map app: maps.elemroot.com (menu “More” → “Cadastral parcels”).
Cadastre on the map (MapLibre GL JS)
Add the TileJSON as a source and put the boundaries below the style layer metadata["elemroot:before_id"]:
this keeps street names and other labels above the cadastral boundaries (see your own layers on the map).
An invisible fill makes the parcel clickable.
const map = new maplibregl.Map({
container: 'map',
attributionControl: { compact: true },
style: 'https://api.elemroot.com/styles/v2/daylight/style.json?key=docs_3d4e64fa1755d7299cb78bf6',
center: [24.7365, 59.4448],
zoom: 16
});
map.on('load', () => {
const beforeId = map.getStyle().metadata['elemroot:before_id'];
map.addSource('cadastre', {
type: 'vector',
url: 'https://api.elemroot.com/tiles/v2/elemroot-cadastre-v1.json?key=docs_3d4e64fa1755d7299cb78bf6'
});
map.addLayer({
id: 'cadastre-area', type: 'fill', source: 'cadastre', 'source-layer': 'cadastre', minzoom: 14,
paint: { 'fill-color': '#000000', 'fill-opacity': 0 }
}, beforeId);
map.addLayer({
id: 'cadastre-line', type: 'line', source: 'cadastre', 'source-layer': 'cadastre', minzoom: 14,
paint: {
'line-color': '#a3417b',
'line-width': ['interpolate', ['linear'], ['zoom'], 14, 0.5, 16, 0.9, 19, 1.6]
}
}, beforeId);
});
map.on('click', 'cadastre-area', (e) => {
const p = e.features[0].properties;
new maplibregl.Popup()
.setLngLat(e.lngLat)
.setText(p.tunnus + ' · ' + p.purpose + ' · ' + p.area_m2 + ' m²')
.addTo(map);
});
In a city one z13 tile holds thousands of parcels; the boundaries are readable from z14 (minzoom: 14).
A dark line suits a light basemap; on the orthophoto (style hybrid) a light line with a dark casing.
Changing the style with setStyle removes the added source and layers; add them again after the change.
Layers and fields
| Layer | Content | Zoom |
|---|---|---|
cadastre | cadastral parcels as areas (polygons) | 12–16 |
cadastre_label | one point inside each parcel, field tunnus; for a cadastral code label at high zoom | 16 |
Field (cadastre) | Type | Content |
|---|---|---|
tunnus | text | cadastral code, for example 78401:001:0049 |
address | text | address of the parcel; several addresses are separated by // |
purpose | text | land use purpose as a code (see land use purposes) |
purpose_pct | number | share of the purpose in per cent |
purpose2 | text | second land use purpose; empty if there is none |
purpose2_pct | number | share of the second purpose; only when there is a second purpose |
area_m2 | number | registered area in square metres |
settlement | text | settlement unit or city district, for example Kesklinna linnaosa |
municipality | text | municipality, for example Tallinn |
Example of the fields of one parcel:
{
"tunnus": "78401:001:0049",
"address": "Lastekodu tn 42",
"purpose": "ELAMUMAA",
"purpose_pct": 90,
"purpose2": "ARIMAA",
"purpose2_pct": 10,
"area_m2": 1296,
"settlement": "Kesklinna linnaosa",
"municipality": "Tallinn"
}
Land use purposes
The fields purpose and purpose2 are codes in capital letters without diacritics:
| Code | Estonian name | Land use purpose |
|---|---|---|
ELAMUMAA | Elamumaa | Residential land |
ARIMAA | Ärimaa | Commercial land |
TOOTMISMAA | Tootmismaa | Industrial land |
MAATULUNDUSMAA | Maatulundusmaa | Agricultural and forest land |
TRANSPORDIMAA | Transpordimaa | Transport land |
ULDKASUTATAV_MAA | Üldkasutatav maa | Public open space |
UHISKONDLIKE_EHITISTE_MAA | Ühiskondlike ehitiste maa | Land for public buildings |
SOTSIAALMAA | Sotsiaalmaa | Social land |
KAITSEALUNE_MAA | Kaitsealune maa | Protected land |
RIIGIKAITSEMAA | Riigikaitsemaa | National defence land |
VEEKOGUDE_MAA | Veekogude maa | Water body land |
MAETOOSTUSMAA | Mäetööstusmaa | Mining land |
TURBATOOSTUSMAA | Turbatööstusmaa | Peat extraction land |
JAATMEHOIDLA_MAA | Jäätmehoidla maa | Waste disposal land |
SIHTOTSTARBETA_MAA | Sihtotstarbeta maa | Land without a designated purpose |
Data version
The data version is the date of the cadastral data in the form YYYYMMDD (TileJSON field
elemroot:data_version). The unversioned TileJSON always points to the current data version, so new
data reaches the map by itself. The server keeps the last three data versions; the addresses of an older version
return 404.
| Resource | Cache-Control |
|---|---|
| Tiles at the address with a data version | public, max-age=31536000, immutable |
| Tiles at the unversioned address | public, max-age=86400 (24 h) |
| TileJSON | public, max-age=3600 (1 h) |
Error handling
| Code | Meaning |
|---|---|
403 | Wrong or missing key, or the key lacks the vector map (tiles) service right: body {"error":"invalid_api_key"} |
204 | Empty tile (no cadastral parcels there, for example the sea): normal |
404 | Zoom outside the range 12–16 or an unknown data version |