Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve) => {
reverseGeocode()
.latlng(location)
.run((error, result) => {
let address;
if (!error) {
address = result.address.LongLabel;
}
const propsData = {lat: location.lat, lng: location.lng, address};
const popup = new LocationPopupComponent({propsData});
const html = popup.$mount().$el.outerHTML;
resolve(html);
});
});
}