# Artemyx Example - Match Expression Styling
# Victoria road network colored by classification using a MapLibre match expression.
# Each road class gets a distinct color for quick visual hierarchy, with A/B/C tiers
# shown as brightness gradients within each color family.
# Ferry routes use fitBounds: false so their long cross-strait geometry doesn't
# pull the auto-fit bounds out into the middle of the Juan de Fuca Strait.
map:
center: [-123.3592, 48.4284] # Victoria, BC
zoom: 13
basemap: carto-dark
datasets:
- id: roads
url: "https://maps.victoria.ca/server/rest/services/OpenData/OpenData_Transportation/MapServer/25/query?outFields=*&where=1%3D1&f=geojson"
name: Victoria Roads
color: "#94a3b8"
fitBounds: false
layers:
- id: roads-line
source: roads
tooltip: Class
type: line
paint:
line-color:
- match
- ["get", "Class"]
- Arterial A
- "#ef4444" # red - primary arterial
- Arterial B
- "#f87171" # lighter red - secondary arterial
- Collector A
- "#f59e0b" # amber - primary collector
- Collector B
- "#fbbf24" # yellow - secondary collector
- Collector C
- "#fcd34d" # light yellow - tertiary collector
- Local A
- "#60a5fa" # blue - primary local
- Local B
- "#93bbfd" # light blue - secondary local
- Local C
- "#bfdbfe" # pale blue - tertiary local
- Strata
- "#c084fc" # purple - strata
- Lane
- "#6b7280" # grey - lane/alley
- Trail
- "#34d399" # emerald - trail
- Recreation
- "#2dd4bf" # teal - recreation
- Restricted
- "#fb7185" # rose - restricted
- Ferry
- "#0ea5e9" # sky blue - ferry
- "#475569" # slate fallback
line-width:
- match
- ["get", "Class"]
- Arterial A
- 3
- Arterial B
- 2.5
- Collector A
- 2
- Collector B
- 1.8
- Collector C
- 1.6
- Ferry
- 1.5
- 1 # default width
line-opacity: 0.85