Skip to content
Vue Neshan MapsDeveloper documentation

Map styles & live layers

Switch styles and control real traffic and POI visibility.

1 min readVue 3 / Nuxt 4Live example included
On this pageLive layers
Interactive exampleMapLibre

Run on a real Neshan map

Bring a domain-allowed web key. Sample geometry; real basemap.

Allow sajadjanat.github.io. Your key stays in memory and is excluded from copied code.

Live layers#

Bind traffic and poi to booleans, as in the complete example. Both default to false. The standard Neshan styles contain the required sources. MAPLIBRE_STYLES provides light, dark, monochrome_light, monochrome_dark and pastel.

Changing mapStyle preserves the map instance, DOM markers and popups; managed overlays and live visibility are restored after style loading. A custom version-8 style or URL must contain compatible Neshan traffic and points_source sources/layers to display live data. Listen to warning for missing groups and live-layers for matched layer IDs.

Traffic tiles are requested again every 60 seconds while enabled. Data freshness, HTTP caches, availability and quotas are controlled by Neshan. POI may not appear at low zoom. getDiagnostics() counts rendered features in the current view; a checked switch alone does not prove that data loaded.

Independent community library. Map services and attribution belong to Neshan and OpenStreetMap. · Sajad Janat · MIT