Map data sources
For developers: which map data each sourcedata_id number draws, for every layer type. You need this only to write or check a style file by hand or with an AI. In Studio, Available Layers sets the numbers for you.
How a layer finds its data
A layer draws map data through two fields together: its type and its sourcedata_id. The number alone does not name the data. The same number means different things in different layer types:
type | sourcedata_id | Draws |
|---|---|---|
polygon | 0 | Land |
line | 0 | Motorway |
symbol | 0 | Metropolis (over 500k) labels |
The numbers come in families:
- Roads.
line(the road),street(its name),linkarrows(one-way arrows) androadshield(route number shields) share one numbering: 0 is Motorway in all four. - Areas.
polygonandpolylineshare one numbering, and no number is used by both.areanamelabels an area with the area's own number: 9 is Water as apolygonand Lake Name as anareaname. - Places and points.
symbolhas its own numbering: city labels, POIs, house numbers. - The rest.
buildings,country,raster,hillshade,elevation,wind,backgroundandatmosphereeach draw one kind of data.
A layer takes one sourcedata_id, so each class needs its own layer: motorways and trunk roads are two layers.
All the map data on this page uses "source": "map" unless a table says otherwise.
A water layer, shortened from the Basic 1 template:
{
"COMMENT": "Water",
"id": 37,
"type": "polygon",
"source": "map",
"sourcedata_id": 9,
"minzoom": 0,
"paint": {
"fill-color": {
"color_stops": {
"color_stop": [{ "level_id": 0, "color": 4294957738 }],
"easing_type": 1
}
}
}
}
Where these numbers come from
Every number on this page is used by at least one of Magic Lane's 40 official templates, the ones the portal offers when you create a style. Typical zoom says at which zoom levels the templates show the layer. The map has zoom levels 0 to 17: 0 shows the whole world, 17 a few streets. 4–17 means the layer appears once you zoom in to level 4 and stays visible all the way in to 17; zoomed out further than 4, it is hidden. This is the minzoom and maxzoom most templates give the layer; a range ending in 17 includes layers with no maxzoom. Templates says how many of the 40 use the number.
The map data may hold classes that no template draws. A number that is not on this page may draw nothing.
Roads
Each road class can be drawn by four layer types: the road itself, its name, its one-way arrows and its route number shield (such as A1). All four use the same number. Each cell gives the typical zoom at which the templates show it; — means no official template draws it.
For example, the Motorway row says: the motorway line appears from zoom 4, its name from zoom 11, its one-way arrows from zoom 14 and its shields from zoom 5.
sourcedata_id | Road class | Road line (line) | Name (street) | One-way arrows (linkarrows) | Shield (roadshield) |
|---|---|---|---|---|---|
| 0 | Motorway | 4–17 | 11–17 | 14–17 | 5–17 |
| 1 | Trunk | 4–17 | 11–17 | 14–17 | 8–17 |
| 2 | Primary | 4–17 | 11–17 | 13–17 | 8–17 |
| 3 | Secondary | 4–17 | 11–17 | 14–17 | 9–17 |
| 4 | Tertiary | 4–17 | 11–17 | 14–17 | 10–17 |
| 5 | Unclassified | 11–17 | 12–17 | 14–17 | 10–17 |
| 6 | Residential | 11–17 | 13–17 | 14–17 | — |
| 7 | Service | 13–17 | 13–17 | 14–17 | — |
| 8 | Motorway Link | 8–17 | 11–17 | 14–17 | — |
| 9 | Trunk Link | 10–17 | 13–17 | 14–17 | — |
| 10 | Primary Link | 10–17 | 13–17 | 14–17 | — |
| 11 | Secondary Link | 11–17 | 13–17 | 14–17 | — |
| 12 | Tertiary Link | 11–17 | 13–17 | 14–17 | — |
| 13 | Living Street | 11–17 | 13–17 | 14–17 | — |
| 14 | Pedestrian | 13–17 | 13–17 | 14–17 | — |
| 15 | Track | 12–17 | 13–17 | 14–17 | — |
| 16 | Bus Guideway | 12–17 | 13–17 | 14–17 | — |
| 17 | Raceway | 14–17 | 14–17 | 14–17 | — |
| 18 | Road | 12–17 | 13–17 | 14–17 | — |
| 19 | Footway | 12–17 | 14–17 | 14–17 | — |
| 20 | Cycleway | 14–17 | 14–17 | 14–17 | — |
| 21 | Bridleway | 14–17 | 14–17 | 14–17 | — |
| 22 | Steps | 13–17 | 13–17 | 17–17 | — |
| 23 | Path | 14–17 | 14–17 | 14–17 | — |
| 24 | Unpaved | 11–17 | 13–17 | 14–17 | — |
| 25 | Ferry | 6–17 | 12–17 | 14–17 | — |
| 26 | Train-Ferry | 11–17 | 14–17 | 14–17 | — |
| 27 | Construction | 14–17 | 13–17 | 14–17 | — |
Areas (polygon)
Filled areas. Numbers 96 to 114 are road and path surfaces drawn as areas.
Order matters where areas overlap. The official templates put, from top to bottom: lakes and rivers (Water, 9) above the parks and other land-use areas, then Island (1), Water Sea (94) and Land (0) at the bottom, just above the background. They give the background the water colour.
sourcedata_id | Draws | Typical zoom | Templates |
|---|---|---|---|
| 0 | Land | 0–17 | 30 |
| 1 | Island | 0–17 | 24 |
| 2 | Wood | 3–17 | 14 |
| 3 | Built-up / Urban Areas | 0–17 | 4 |
| 4 | Industry | 8–17 | 4 |
| 5 | Airport | 4–17 | 26 |
| 6 | Green | 0–17 | 8 |
| 9 | Water | 0–17 | 30 |
| 23 | Green Park | 8–17 | 30 |
| 25 | Parking | 11–17 | 12 |
| 26 | Gas Station | 11–17 | 4 |
| 27 | Cemetery | 8–17 | 28 |
| 28 | Marketplace | 11–15 | 8 |
| 29 | Fountain | 0–17 | 30 |
| 30 | Transport Station | 11–17 | 4 |
| 31 | Pedestrian | 10–17 | 6 |
| 32 | Trailer Park | 8–17 | 4 |
| 33 | Farm | 4–17 | 6 |
| 34 | Public Square | 11–17 | 4 |
| 35 | Campground | 11–17 | 4 |
| 36 | Bridge | 0–17 | 20 |
| 39 | Snow | 4–17 | 8 |
| 42 | Archaeological Site | 11–17 | 4 |
| 43 | Sand | 4–17 | 24 |
| 44 | Wetland | 0–17 | 6 |
| 45 | Ice | 4–17 | 4 |
| 46 | Fence | 11–17 | 4 |
| 48 | Yard | 11–17 | 8 |
| 49 | Rock | 3–17 | 14 |
| 51 | Harbour | 0–17 | 30 |
| 53 | Playground | 11–17 | 20 |
| 54 | Sports Pitch | 4–17 | 28 |
| 55 | Commons | 4–17 | 6 |
| 56 | Brownfield | 8–17 | 4 |
| 57 | Vineyard | 4–17 | 6 |
| 58 | Forest | 0–17 | 14 |
| 59 | Military | 8–17 | 4 |
| 60 | Heathland | 0–17 | 8 |
| 61 | Apron | 8–17 | 8 |
| 62 | Runway | 8–17 | 24 |
| 64 | Terminal | 4–17 | 24 |
| 66 | Quarry | 11–17 | 4 |
| 67 | Zoo | 8–17 | 4 |
| 69 | Track Polygon | 11–17 | 4 |
| 70 | Allotments | 11–17 | 4 |
| 71 | Power Station | 11–17 | 4 |
| 73 | School / University | 11–17 | 22 |
| 74 | Rest Area | 11–17 | 4 |
| 76 | Beach | 4–17 | 26 |
| 77 | Desert | 4–17 | 8 |
| 78 | Glacier | 4–17 | 24 |
| 79 | Mud | 8–17 | 4 |
| 80 | Farmyard | 8–17 | 4 |
| 81 | Garages | 0–17 | 8 |
| 82 | Grassland | 4–17 | 6 |
| 84 | Hospital | 9–17 | 24 |
| 85 | Theme Park | 11–17 | 4 |
| 91 | Platform | 11–17 | 4 |
| 94 | Water Sea | 0–17 | 30 |
| 96 | Motorway Area | 4–17 | 6 |
| 97 | Trunk Area | 4–17 | 6 |
| 98 | Primary Area | 4–17 | 6 |
| 99 | Secondary Area | 6–17 | 6 |
| 100 | Tertiary Area | 6–17 | 6 |
| 101 | Unclassified Area | 9–17 | 6 |
| 102 | Residential Area | 11–17 | 2 |
| 103 | Service Area | 11–17 | 2 |
| 104 | Living Street Area | 11–17 | 2 |
| 105 | Pedestrian Area | 11–17 | 2 |
| 106 | Track Area | 11–17 | 2 |
| 107 | Bus Guideway Area | 9–17 | 6 |
| 108 | Raceway Area | 11–17 | 6 |
| 109 | Road Area | 11–17 | 2 |
| 110 | Footway Area | 11–17 | 2 |
| 111 | Cycleway Area | 11–17 | 2 |
| 112 | Bridleway Area | 11–17 | 2 |
| 113 | Path Area | 11–17 | 2 |
| 114 | Unpaved Area | 11–17 | 2 |
Lines that are not roads (polyline)
Borders, rail, water lines and other outlines. Some templates draw a border twice with the same number: a background line underneath and the border on top.
sourcedata_id | Draws | Typical zoom | Templates |
|---|---|---|---|
| 8 | Airplane Road | 8–17 | 24 |
| 10 | Water Line | 0–17 | 4 |
| 11 | Rail | 9–17 | 24 |
| 12 | State Park | 4–17 | 20 |
| 13 | Disputed Border | 0–17 | 33 |
| 14 | Country Border | 0–17 | 33 |
| 17 | State Border | 3–17 | 33 |
| 37 | Track | 5–17 | 8 |
| 38 | Wall | 11–17 | 4 |
| 40 | Dam | 8–17 | 4 |
| 47 | Aerialway | 10–17 | 8 |
| 50 | Subway Bridge | 11–17 | 14 |
| 52 | Slide | 8–17 | 4 |
| 63 | Runway Line | 8–17 | 24 |
| 65 | Harbour Line | 8–17 | 4 |
| 72 | Power Line | 0–17 | 4 |
| 83 | Harbour Outline | 12–17 | 4 |
| 86 | Narrow Water Line | 7–17 | 30 |
| 88 | Subway | 11–17 | 14 |
| 93 | Thick Wall | 11–17 | 4 |
Area labels (areaname)
The name of an area, with the area's own number. 10 and 86 label the water lines drawn by polyline 10 and 86.
sourcedata_id | Draws | Typical zoom | Templates |
|---|---|---|---|
| 1 | Island Label | 5–15 | 23 |
| 4 | Industry Label | 12–17 | 4 |
| 5 | Airport Label | 8–17 | 28 |
| 9 | Lake Name | 9–17 | 34 |
| 10 | Water Line Label | 12–17 | 34 |
| 12 | State Park Label | 7–17 | 8 |
| 23 | Green Park Label | 9–17 | 12 |
| 27 | Cemetery Label | 13–17 | 4 |
| 33 | Farm Label | 9–17 | 4 |
| 58 | Forest Label | 9–17 | 4 |
| 76 | Beach Label | 13–17 | 4 |
| 86 | Narrow Water Line Label | 12–17 | 34 |
| 94 | Water Sea Name | 2–17 | 34 |
Places and points (symbol)
33024 and 3076010 come from the overlay source; the rest from map.
sourcedata_id | Draws | source | Typical zoom | Templates |
|---|---|---|---|---|
| 0 | Metropolis (Over 500k) | map | 3–13 | 35 |
| 1 | Large City (100k-500k) | map | 4–13 | 35 |
| 2 | City (50k-100k) | map | 5–13 | 35 |
| 3 | City (10k-50k) | map | 6–13 | 35 |
| 4 | City (5k-10k) | map | 7–13 | 34 |
| 5 | Small City (1k-5k) | map | 6–13 | 34 |
| 6 | Small City (500-1k) | map | 10–13 | 34 |
| 7 | Village / Hamlet (0-500) | map | 10–13 | 34 |
| 9 | Exit Names | map | 14–17 | 19 |
| 12 | POIs, one layer per category (see Points of interest) | map | 16–17 | 34 |
| 14 | House Numbers | map | 16–17 | 4 |
| 15 | State Name | map | 4–7 | 31 |
| 33024 | Safety Cameras | overlay | 13–17 | 38 |
| 3076010 | Public Transit Stops | overlay | 14–17 | 34 |
Other layer types
type | sourcedata_id | source | Draws | Typical zoom | Templates |
|---|---|---|---|---|---|
country | 0 | map | Country Labels | 0–7 | 35 |
buildings | 3 | map | Built Up (buildings) | 14–17 | 30 |
raster | 5 | satellite, satelliteExternal | Satellite | 0–17 | 9 |
hillshade | 13 | elevation | Hillshade | 0–6 | 13 |
elevation | 13 | elevation | Elevation | 7–17 | 13 |
wind | 11 | weather | Wind | 3–15 | 1 |
background | 0 | leave out | Background | 0–17 | 39 |
atmosphere | 0 | leave out | Atmosphere | 0–17 | 38 |
background must be the last layer in definition.layers, so it is drawn under everything else. A satelliteExternal raster layer also needs its source declared in sources_list; see the style file format.
Contour lines use "source": "contourpolyline", with type contour_polyline for the lines and contour_label for their labels, and contour_interval for the interval between lines. No official template draws them.
Points of interest
POIs are symbol layers on sourcedata_id 12. Most templates draw them as one layer per category, each with the category in metaCategoryID; the map engine draws the category's own icon. The other templates have a single POI layer with no metaCategoryID.
metaCategoryID | Category | Templates |
|---|---|---|
| 1000 | Gas Stations | 21 |
| 1001 | Parking | 21 |
| 1002 | Food and Drink | 21 |
| 1003 | Accommodation | 21 |
| 1004 | Medical Services | 21 |
| 1005 | Shopping | 21 |
| 1006 | Auto Service | 21 |
| 1007 | Transport | 21 |
| 1008 | Wikipedia | 21 |
| 1009 | Education | 21 |
| 1010 | Entertainment | 21 |
| 1011 | Public Services | 20 |
| 1012 | Geographical Areas | 21 |
| 1013 | Business | 20 |
| 1014 | Sightseeing | 21 |
| 1015 | Religious Places | 21 |
| 1016 | Roadside | 21 |
| 1017 | Sports | 21 |
| 1018 | NOC | 21 |
| 1019 | Fire Hydrant | 21 |
| 1020 | Emergency Services | 21 |
| 1021 | Civil Emergency Infrastructure | 21 |
| 1022 | Charging Stations | 12 |
| 1023 | Bicycle Charging Stations | 12 |
| 1024 | Bicycle Parking | 12 |
These are the categories the official templates use. Studio's POI Category field lists the categories the map engine offers.
Fields you can filter on
A layer's filter (the Data Filter tab in Studio) compares the fields below, which the map engine fills in for each kind of map data.
| Layer types | Fields |
|---|---|
line (roads), street (road names) | Class, Lanes count, Country ISO Code, Name |
linkarrows (one-way arrows) | Class, Country ISO Code, Name |
symbol (city labels) | Name, Is Capital, Is Federal State, Is Region Capital, Country ISO code |
polygon, polyline, areaname | Geometry Type (Line or Polygon), Name |
buildings | Height |
Your own data ("source": "overlay") | the features' own properties, and Geometry Type (point, line or polygon) |
Classholds a road's flags: any ofBridge,Construction,Oneway,Tollway,TunnelandRoundabout. Usein, for example{ "key": "Class", "condition": "in", "values": ["Tunnel"] }.Is Capitaland the other "Is" fields holdYesorNo.Lanes countandHeightare numbers.>,<,>=and<=compare whole numbers and work only on these two fields; on any other field, including every property of your own data, they let every feature through.- Comparisons of text ignore upper and lower case, except
inandnotinonClass.
Layers with no sourcedata_id
These layers draw what an app adds at run time, not map data, and carry "isTemplate": 1: routes (route_car_primary and the other route_ types), route labels (route_label_ types), the travelled route (traveled_route_ types), turn_arrow, route_traffic, route_waypoints, traffic_links, traffic_icons, highlighted_lmks, lmk_store, social_reports, and the In-App Drawing types draw_points, draw_poly, drawpath and paths. Their properties are in the layer types reference.
Your own data sources
A layer that draws one of your data sources uses "source": "overlay" and the source's tileset id as its sourcedata_id. Once the source is tiled, the id is on the layer's JSON tab as sourceDataId. The layer's type is symbol, symbol group, polyline or polygon.
See also: Style file format · Layer types reference