phegman / vue-mapbox-gl

A Vue.js component for Mapbox GL JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error Popup example not fount

david34corbalan opened this issue · comments

Uncaught TypeError: i[s].call is not a function
at e.Evented.fire (evented.js:87)
at h (bind_handlers.js:139)
at HTMLDivElement.s (bind_handlers.js:114)

hola, utilizo el ejemplo que tienen, y no me funciona, no existe... alguna ayuda de porque sucede esto?
`
if (e.features) {
const coordinates = e.features[0].geometry.coordinates.slice();

        // Ensure that if the map is zoomed out such that multiple
        // copies of the feature are visible, the popup appears
        // over the copy being pointed to.
        while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) {
            coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360;
        }

        new mapboxgl.Popup()
             .setLngLat({ lng: coordinates[0], lat: coordinates[1] })
            .setHTML('<div id="vue-popup-content"></div>')
            .addTo(map);

        new PopupContent({
            propsData: { feature: e.features[0] },
        }).$mount("#vue-popup-content");
    }

`

para lo que se les presento el mismo problemo que yo, encontre una solucion en este enlace
https://codespots.com/library/item/1923