Leaflet.PixiOverlay
Leaflet.PixiOverlay copied to clipboard
Vue with PixiOverlay event is not defined
Hey guys,
I'm trying to use Pixioverlay with Vue and Vue2-Leaflet, however, some functions do not work. for example the variable "event"
var pixiOverlay = L.pixiOverlay( (utils, event) => {}
if (event.type === "add") {}
In this 'if event.type' is saying indefinite, I do not understand why, below follows my source code. Who can help thank you.
Follow the link, if you prefer to see here https://github.com/lordjack/introducao_vue/blob/main/src/components/PixiOverlayTeste6.vue
'
Olá {{ msg }}
<div style="height: 500px; width: 100%">
<div style="height: 200px; overflow: auto">
<h1>teste6</h1>
<p>Marcação lugar no Mapa {{ withPopup.lat }}, {{ withPopup.lng }}</p>
<p>Centro {{ currentCenter }} o zoom é: {{ currentZoom }}</p>
<button @click="showLongText">Teste</button>
<button @click="showMap = !showMap">Mostrar/Ocutar</button>
</div>
<l-map
ref="map"
v-if="showMap"
:zoom="zoom"
:center="center"
:options="mapOptions"
style="height: 90%"
@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">
Eu sou um teste
<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>
<router-view></router-view>