Skip to content
Vue Neshan MapsDeveloper documentation

Models & coordinates

Synchronize center and zoom, and build a location picker.

1 min readVue 3 / Nuxt 4Live example included
On this pagePicking
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.

Picking#

v-model is the map center, in [latitude, longitude] order. Panning updates it even when picking is off. pickOnClick moves that center to the clicked position; centerMarker displays a fixed pin. These props do not save an address or add a marker to your array.

For a checkout picker, keep a separate confirmed value. A confirm button can copy center.value into your form. Use the click event's coordinates if you only want the clicked point rather than the current center. Both engines expose latitude-first click coordinates.

ts
const confirmedLocation = ref<Coordinates>()
function confirmLocation() { confirmedLocation.value = [...center.value] }

Reverse geocoding is a separate server-side service integration. This library displays maps and coordinates; it does not turn a point into an address.

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