We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31a0bb4 commit 557ee59Copy full SHA for 557ee59
packages/base/src/dialogs/symbology/hooks/useGetProperties.ts
@@ -25,11 +25,17 @@ async function getGeoJsonProperties({
25
}): Promise<Record<string, Set<any>>> {
26
const result: Record<string, Set<any>> = {};
27
28
- const data = await loadFile({
29
- filepath: source.parameters?.path,
30
- type: 'GeoJSONSource',
31
- model,
32
- });
+ const data = await (async () => {
+ if (source.parameters.path) {
+ return await loadFile({
+ filepath: source.parameters.path,
+ type: 'GeoJSONSource',
33
+ model,
34
+ });
35
+ } else if (source.parameters.data) {
36
+ return source.parameters.data;
37
+ }
38
+ })();
39
40
if (!data) {
41
throw new Error('Failed to read GeoJSON data');
0 commit comments