1
This code is on a button. There are two doubts,
How to write this line without using Arrow Function?
And whenever I run the first time it comes back Undefined me but the second one works, I think you have to add Promises? How do you solve this?
let results;
this.$refs.myMap.$mapObject.data.toGeoJson((geojson) => {
results = JSON.stringify(geojson, null, 2);
});
console.log( results );