Skip to content
Vue Neshan MapsDeveloper documentation

Leaflet compatibility

Integrate raster maps and understand the legacy live-layer limits.

1 min readVue 3 / Nuxt 4Live example included
On this pageLeaflet
Interactive exampleLeaflet

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.

Leaflet#

Use NeshanMapLeaflet for existing Leaflet integrations. The coordinate model and declarative shape props follow the same pattern, but native options and GeoJSON styling are engine-specific.

vue
<script setup lang="ts">
import { ref } from 'vue'
import { NeshanMapLeaflet, type Coordinates, type MapMarker } from 'vue-neshan-maps'
import 'vue-neshan-maps/style.css'
const webKey = import.meta.env.VITE_NESHAN_WEB_KEY
const center = ref<Coordinates>([35.6997, 51.338])
const zoom = ref(13)
const markers: MapMarker[] = [{ id: 'azadi', position: [35.6997, 51.338], popup: 'Azadi Square' }]
</script>
<template>
  <NeshanMapLeaflet v-model="center" v-model:zoom="zoom" :api-key="webKey"
    :options="{ maptype: 'dreamy' }" :markers="markers" :center-marker="false"
    :styles="{ height: '500px' }" />
</template>

Leaflet map with markers and sample service geometry

The official legacy SDK no longer updates traffic and POI. Those options are ignored with a warning; use MapLibre for live layers. Some supplemental raster label requests can return HTTP 204 without an image. Observe tile events when diagnosing partial delivery.

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