2👍
✅
You may use a global event bus in scenario like this
const EventBus = new Vue();
google.maps.event.addListenerOnce(map, "bounds_changed", function() {
// ...
EventBus.$emit("bounds_changed", {
bounds,
northEast,
southWest
});
});
new Vue({
el: "#app",
created() {
EventBus.$on("bounds_changed", ({ bounds, northEast, southWest }) => {
// put your operation in vue here
});
}
});
Source:stackexchange.com