# Basic example
First marker is placed at 47.41322, -1.219482
Center is at LatLng(47.41322, -1.219482) and the zoom is: 11.5
![](https://c.tile.openstreetmap.org/13/4068/2867.png)
![](https://b.tile.openstreetmap.org/13/4068/2866.png)
![](https://b.tile.openstreetmap.org/13/4067/2867.png)
![](https://a.tile.openstreetmap.org/13/4069/2867.png)
![](https://a.tile.openstreetmap.org/13/4068/2868.png)
![](https://a.tile.openstreetmap.org/13/4067/2866.png)
![](https://c.tile.openstreetmap.org/13/4069/2866.png)
![](https://c.tile.openstreetmap.org/13/4067/2868.png)
![](https://b.tile.openstreetmap.org/13/4069/2868.png)
![](https://a.tile.openstreetmap.org/13/4066/2867.png)
![](https://b.tile.openstreetmap.org/13/4070/2867.png)
![](https://c.tile.openstreetmap.org/13/4066/2866.png)
![](https://a.tile.openstreetmap.org/13/4070/2866.png)
![](https://b.tile.openstreetmap.org/13/4066/2868.png)
![](https://c.tile.openstreetmap.org/13/4070/2868.png)
I am a tooltip
Leaflet | © OpenStreetMap contributors
show code
<template> <div style="height: 500px; width: 100%"> <div style="height: 200px; overflow: auto;"> <p>First marker is placed at {{ withPopup.lat }}, {{ withPopup.lng }}</p> <p>Center is at {{ currentCenter }} and the zoom is: {{ currentZoom }}</p> <button @click="showLongText"> Toggle long popup </button> <button @click="showMap = !showMap"> Toggle map </button> </div> <l-map v-if="showMap" :zoom="zoom" :center="center" :options="mapOptions" style="height: 80%" @update:center="centerUpdate" @update:zoom="zoomUpdate" > <l-tile-layer :url="url" :attribution="attribution" /> <l-marker :lat-lng="withPopup"> <l-popup> <div @click="innerClick"> I am a popup <p v-show="showParagraph"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed pretium nisl, ut sagittis sapien. Sed vel sollicitudin nisi. Donec finibus semper metus id malesuada. </p> </div> </l-popup> </l-marker> <l-marker :lat-lng="withTooltip"> <l-tooltip :options="{ permanent: true, interactive: true }"> <div @click="innerClick"> I am a tooltip <p v-show="showParagraph"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed pretium nisl, ut sagittis sapien. Sed vel sollicitudin nisi. Donec finibus semper metus id malesuada. </p> </div> </l-tooltip> </l-marker> </l-map> </div> </template> <script> import { latLng } from "leaflet"; import { LMap, LTileLayer, LMarker, LPopup, LTooltip } from "vue2-leaflet"; export default { name: "Example", components: { LMap, LTileLayer, LMarker, LPopup, LTooltip }, data() { return { zoom: 13, center: latLng(47.41322, -1.219482), url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors', withPopup: latLng(47.41322, -1.219482), withTooltip: latLng(47.41422, -1.250482), currentZoom: 11.5, currentCenter: latLng(47.41322, -1.219482), showParagraph: false, mapOptions: { zoomSnap: 0.5 }, showMap: true }; }, methods: { zoomUpdate(zoom) { this.currentZoom = zoom; }, centerUpdate(center) { this.currentCenter = center; }, showLongText() { this.showParagraph = !this.showParagraph; }, innerClick() { alert("Click!"); } } }; </script>
Copied!