Skip to content
Vue Neshan MapsDeveloper documentation

Performance & production

Plan data ownership, updates, cleanup, security and accessibility.

3 min readVue 3 / Nuxt 4
On this pageUpdates, lifecycle and performanceProductionVazir font

Updates, lifecycle and performance#

  • Geometry updates call GeoJSONSource.setData() in place. Unchanged source configuration and layer definitions keep their native identity.
  • Cluster source configuration changes rebuild that source and its dependent layers. Changing paint/filter/layout definitions rebuilds affected managed layers.
  • Polyline color, width and opacity use per-feature expressions. Lines with the same normalized dash pattern share a layer; 100 equally dashed lines do not create 100 layers.
  • Geometry watchers batch changes into one microtask per overlay kind. Unmount cancels pending work, requests, timers and event listeners.
  • Style switching restores managed sources, clusters, heatmap and advanced layers; existing DOM markers and open popups are retained.
  • Native setData() still rebuilds worker indexes; this is not a partial feature-diff API. For large arrays use shallowRef, replace data in batches and avoid continually rewriting unchanged data. Native updateData() is available through the map ref for application-owned sources.

getDiagnostics() additionally reports clusterFeatures, heatmap, advancedLayers (scoped IDs), sourceCount and layerCount. Rendered counts depend on the viewport and zoom and are not dataset totals. heatmap indicates the requested setting, not successful rendering by itself.

Production#

Restrict web keys to your actual domains and keep attribution visible. Import package CSS once and give the map a nonzero height. Test modern WebGL/DecompressionStream support for MapLibre. All concurrent Neshan MapLibre instances must use the same API key because the vendor protocol has page-global state.

Search, geocoding, routing, measurement interfaces and persistence are application concerns. The playground demonstrates some of these interactions; it is not a bundle of UI widgets exported by this package. A polyline displays supplied coordinates and does not calculate a route.

The renderer is patched in 2.2.0. Read security and adapter compatibility and the complete advanced feature guide.

If something fails, start with the README's troubleshooting table, then include package/engine/browser versions and a small reproduction in an issue. Remove credentials from reports.

Vazir font#

Vazir 30.1.0 regular and bold are bundled as self-hosted WOFF2 files. The original SIL OFL license and author credits are included in fonts. No font CDN is required.

ts
import 'vue-neshan-maps/fonts/vazir.css'
html
<div class="neshan-font-vazir" lang="fa" dir="rtl">
  <!-- Your map, popups and Persian controls -->
</div>

The class styles the interface and HTML popups. Vector labels use the Neshan style glyphs; raster labels are part of tile images. This font does not replace either. GitHub controls its Markdown typography; Persian screenshots are captured with Vazir.

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