phegman / vue-mapbox-gl

A Vue.js component for Mapbox GL JS
GNU General Public License v3.0
270 stars 33 forks source link

error Popup example not fount #90

Closed david34corbalan closed 3 years ago

david34corbalan commented 3 years ago

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");
    }

`

david34corbalan commented 3 years ago

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