There was an error while loading. Please reload this page.
1 parent 7897f4b commit ea73bc5Copy full SHA for ea73bc5
1 file changed
src/map/core/useMapLayer.js
@@ -13,7 +13,7 @@ const useMapLayer = ({ enabled = true, source, layers, layersDeps, data, dataDep
13
const isGeoJson = !source?.type || source.type === 'geojson';
14
map.addSource(
15
id,
16
- isGeoJson ? { type: 'geojson', data: emptyFeatureCollection, ...source } : source,
+ isGeoJson ? { type: 'geojson', data: data ?? emptyFeatureCollection, ...source } : source,
17
);
18
layers.forEach((layer) => {
19
const { on, key, ...spec } = layer;
0 commit comments