Overview

In the following article, I introduced how to use Leaflet Marker Cluster with Nuxt 3. This time, I updated it to use the Composition API, so here are my notes.

Installation

Install the following:

npm i leaflet leaflet.markercluster @vue-leaflet/vue-leaflet
npm i -D @types/leaflet @types/leaflet.markercluster

Source Code

Please refer to the following:

https://github.com/nakamura196/nuxt3-demo/blob/main/components/map/MarkerCluster.vue

Summary

There are some parts where TypeScript support is incomplete, but I hope this serves as a useful reference.