Skip to content

Commit

Permalink
fire our own dataloading/dataload events
Browse files Browse the repository at this point in the history
  • Loading branch information
atvaccaro committed Jul 14, 2023
1 parent 2fe3b87 commit 8337a74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/maps/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@
type: layer.type,
...(layer.properties || {})
};
map.fire("dataloading");
return new GeoJsonLayer({
id: layer.name,
data: fetchGeoJSON(layer.url),
Expand All @@ -313,8 +314,8 @@
getFillColor: (feature) => getColor(feature, layer, 1, 200),
highlightColor: ({ object, layer }) => getColor(object, layer, layerProperties.highlight_saturation_multiplier || 0.7),
onDataLoad: (data) => {
// map.fire("dataload");
console.log("Finished loading", layer);
map.fire("dataload");
if (idx === state.layers.length - 1) {
if (state.bbox) {
Expand Down

0 comments on commit 8337a74

Please sign in to comment.