feat: extract fuel.map component and wire Leaflet to map-update browser event
This commit is contained in:
@@ -65,11 +65,13 @@ export function stationMap(results, meta, radius) {
|
||||
maxZoom: 19,
|
||||
}).addTo(this._map);
|
||||
|
||||
if (this.results && this.results.length > 0) {
|
||||
window.addEventListener('map-update', (e) => {
|
||||
this.results = e.detail.results;
|
||||
this.meta = e.detail.meta;
|
||||
this.radius = e.detail.radius;
|
||||
this._plotMarkers();
|
||||
}
|
||||
});
|
||||
|
||||
this.$watch('results', () => this._plotMarkers());
|
||||
this.locateUser();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user