Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/buildings.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"name": "Buildings Vector Tile",
"parameters": {
"color": "#086600",
"opacity": 1.0,
"source": "7a7ee6fd-c1e2-4c5d-a4e2-a7974db138a4",
"type": "fill"
},
"type": "VectorTileLayer",
"visible": true
"visible": true,
"opacity": 1
},
"f99eb7b0-5e38-4078-b310-36a0746472aa": {
"name": "OpenStreetMap.Mapnik Layer",
Expand Down
4 changes: 3 additions & 1 deletion examples/earthquakes.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"logicalOp": "all"
},
"name": "Earthquakes",
"opacity": 1.0,
"parameters": {
"color": {
"circle-fill-color": [
Expand Down Expand Up @@ -166,7 +167,6 @@
"stroke-color": "#62a0ea",
"stroke-width": 1.25
},
"opacity": 1.0,
"source": "348d85fa-3a71-447f-8a64-e283ec47cc7c",
"symbologyState": {
"colorRamp": "cool",
Expand All @@ -183,6 +183,7 @@
},
"8de7c2c0-6024-4716-b542-031a89fb87f9": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 1.0,
"parameters": {
"source": "b2ea427a-a51b-43ad-ae72-02cd900736d5"
},
Expand Down Expand Up @@ -218,6 +219,7 @@
"name": "OpenStreetMap.Mapnik",
"parameters": {
"attribution": "(C) OpenStreetMap contributors",
"interpolate": false,
"maxZoom": 19.0,
"minZoom": 0.0,
"provider": "OpenStreetMap",
Expand Down
8 changes: 4 additions & 4 deletions examples/france_hiking.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"0bfee293-9e2f-4434-8c5a-c90d19836bab": {
"name": "WaymarkedTrails.hiking Layer",
"parameters": {
"opacity": 0.6,
"source": "82691e55-f9e2-43be-8a07-3ae0409af7b4"
},
"type": "RasterLayer",
"visible": true
"visible": true,
"opacity": 0.6
},
"4a0703b3-ed56-4158-8a2e-e008c3d0fee2": {
"name": "OpenStreetMap.Mapnik Layer",
Expand All @@ -25,11 +25,11 @@
"7db81237-a579-4daa-938f-5e61fdfb17e7": {
"name": "NASAGIBS.ModisTerraTrueColorCR Layer",
"parameters": {
"opacity": 0.3,
"source": "52252f5d-3cb7-45a8-a724-5793bf9950ec"
},
"type": "RasterLayer",
"visible": true
"visible": true,
"opacity": 0.3
}
},
"metadata": {},
Expand Down
8 changes: 5 additions & 3 deletions examples/geoparquet.jgis
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"layers": {
"9556ca29-a5ec-41af-bf14-4b543c52aafe": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 0.8,
"parameters": {
"source": "2a52082b-7992-40dc-92d6-75e309a1ed27"
},
Expand All @@ -14,8 +15,8 @@
},
"d7a2ad84-0750-4e9b-82c0-542fcc6b3265": {
"name": "GeoParquet Vector Layer",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "c1da95b9-8a71-4fee-b4e3-6f0b5f53d2d4"
},
"type": "VectorLayer",
Expand All @@ -31,8 +32,8 @@
20037508.342789244,
18740664.52872547
],
"latitude": 0.0,
"longitude": 0.0,
"latitude": -7.105427357601002e-14,
"longitude": -1.6732426064452555e-14,
"projection": "EPSG:3857",
"zoom": 1.6220518194563762
},
Expand All @@ -42,6 +43,7 @@
"name": "OpenStreetMap.Mapnik",
"parameters": {
"attribution": "(C) OpenStreetMap contributors",
"interpolate": false,
"maxZoom": 19.0,
"minZoom": 0.0,
"provider": "OpenStreetMap",
Expand Down
4 changes: 2 additions & 2 deletions examples/geotiff.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@
1.0
]
],
"opacity": 1.0,
"source": "8b1d4258-5d46-48da-b466-496d376b593d",
"symbologyState": {
"band": 1.0,
Expand All @@ -149,7 +148,8 @@
}
},
"type": "WebGlLayer",
"visible": true
"visible": true,
"opacity": 1
}
},
"metadata": {},
Expand Down
5 changes: 4 additions & 1 deletion examples/image.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
"layers": {
"756cb737-f817-4ba6-b7c0-8da0b97b9778": {
"name": "Custom Image Layer Layer",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "fb9729b8-82c6-48ac-a12b-6343c0e037ae"
},
"type": "ImageLayer",
"visible": true
},
"acb76fb7-df6d-41da-8e08-0208a1c82136": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 0.4,
"parameters": {
"source": "5f7a1edf-1b76-4f82-893f-540d28998b1d"
},
Expand Down Expand Up @@ -43,6 +44,7 @@
"name": "OpenStreetMap.Mapnik",
"parameters": {
"attribution": "(C) OpenStreetMap contributors",
"interpolate": false,
"maxZoom": 19.0,
"minZoom": 0.0,
"provider": "OpenStreetMap",
Expand Down Expand Up @@ -72,6 +74,7 @@
37.936
]
],
"interpolate": true,
"path": "https://maplibre.org/maplibre-gl-js/docs/assets/radar.gif"
},
"type": "ImageSource"
Expand Down
7 changes: 5 additions & 2 deletions examples/local.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"layers": {
"042f37ac-6d05-4b07-a944-8f56fb889612": {
"name": "Custom Shapefile Layer",
"opacity": 1.0,
"parameters": {
"color": {
"fill-color": "#cc3342",
Expand All @@ -15,7 +16,6 @@
"stroke-line-join": "round",
"stroke-width": 1.25
},
"opacity": 1.0,
"source": "0e9d027f-56ea-427e-a845-a5ee33427e67",
"symbologyState": {
"renderType": "Single Symbol"
Expand All @@ -27,15 +27,16 @@
},
"52e46caf-e212-4276-ade9-6b0683642f8d": {
"name": "Custom Image Layer",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "f124c6de-e444-4798-be88-61c3ee8968db"
},
"type": "ImageLayer",
"visible": true
},
"f5e91204-3ce9-408e-b179-c6cf5f75f0f7": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 1.0,
"parameters": {
"source": "3bd6b874-a28a-4ef6-bef8-a7257bb35c51"
},
Expand Down Expand Up @@ -74,6 +75,7 @@
"name": "OpenStreetMap.Mapnik",
"parameters": {
"attribution": "(C) OpenStreetMap contributors",
"interpolate": false,
"maxZoom": 19.0,
"minZoom": 0.0,
"provider": "OpenStreetMap",
Expand Down Expand Up @@ -103,6 +105,7 @@
37.936
]
],
"interpolate": false,
"path": "radar.gif"
},
"type": "ImageSource"
Expand Down
4 changes: 2 additions & 2 deletions examples/pmtiles-raster.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"2815540d-70c6-4eed-ba86-51596adf6863": {
"name": "Custom Raster Layer",
"parameters": {
"opacity": 0.5,
"source": "d3a5ad67-d6fe-4793-a6c5-dd773d76c745"
},
"type": "RasterLayer",
"visible": true
"visible": true,
"opacity": 0.5
},
"3d4563da-904d-4026-a06b-1e8cffbf536f": {
"name": "OpenStreetMap.Mapnik Layer",
Expand Down
4 changes: 2 additions & 2 deletions examples/pmtiles-vector.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"name": "Buildings",
"parameters": {
"color": "#FF0000",
"opacity": 1.0,
"source": "e52daf20-9b57-4a14-9521-70eabbe4cda2",
"type": "line"
},
"type": "VectorTileLayer",
"visible": true
"visible": true,
"opacity": 1
}
},
"metadata": {},
Expand Down
4 changes: 2 additions & 2 deletions examples/roads.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -7451,7 +7451,6 @@
]
]
},
"opacity": 1.0,
"source": "b9e30ab1-864e-4395-9071-cddb6ac813e5",
"symbologyState": {
"colorRamp": "rainbow",
Expand All @@ -7463,7 +7462,8 @@
"type": "line"
},
"type": "VectorLayer",
"visible": true
"visible": true,
"opacity": 1.0
}
},
"metadata": {},
Expand Down
4 changes: 2 additions & 2 deletions examples/shapefile.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"stroke-line-join": "round",
"stroke-width": 1.25
},
"opacity": 1.0,
"source": "eb4b68da-eab6-44a1-8e75-ca9c871d2755",
"symbologyState": {
"renderType": "Single Symbol"
},
"type": "line"
},
"type": "VectorLayer",
"visible": true
"visible": true,
"opacity": 1
}
},
"metadata": {},
Expand Down
4 changes: 2 additions & 2 deletions examples/test.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"name": "Regions France",
"parameters": {
"color": "#e66100",
"opacity": 0.6,
"source": "7d082e75-69d5-447a-82d8-b05cca5945ba",
"type": "line"
},
"type": "VectorLayer",
"visible": true
"visible": true,
"opacity": 0.6
},
"a0044fd7-f167-445f-b3d1-620a8f94b498": {
"name": "Open Topo Map",
Expand Down
8 changes: 4 additions & 4 deletions examples/world.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
]
]
},
"opacity": 1.0,
"source": "b4287bea-e217-443c-b527-58f7559c824c",
"symbologyState": {
"colorRamp": "cool",
Expand All @@ -95,7 +94,8 @@
"type": "fill"
},
"type": "VectorLayer",
"visible": true
"visible": true,
"opacity": 1
},
"f80d0fa2-3e2b-4922-b7d5-fefd4b085259": {
"name": "France",
Expand All @@ -107,15 +107,15 @@
"stroke-line-join": "round",
"stroke-width": 1.25
},
"opacity": 1.0,
"source": "5970d6c9-26be-4cc6-84c9-16593dd3edfe",
"symbologyState": {
"renderType": "Single Symbol"
},
"type": "line"
},
"type": "VectorLayer",
"visible": true
"visible": true,
"opacity": 1
}
},
"metadata": {},
Expand Down
1 change: 1 addition & 0 deletions packages/base/src/dialogs/layerBrowserDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export const LayerBrowserComponent: React.FC<ILayerBrowserDialogProps> = ({
source: sourceId,
},
visible: true,
opacity: 1.0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want, we can omit this since the default is 1

name: tile.name + ' Layer',
};

Expand Down
11 changes: 10 additions & 1 deletion packages/base/src/formbuilder/creationform.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ export class CreationForm extends React.Component<ICreationFormProps, any> {
layerSchema['required'] = ['name', ...layerSchema['required']];
layerSchema['properties'] = {
name: { type: 'string', description: 'The name of the layer' },
opacity: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? It should already be part of the object, right?

type: 'number',
description: 'The opacity of the object',
default: 1,
multipleOf: 0.1,
minimum: 0,
maximum: 1,
},
...layerSchema['properties'],
};
}
Expand Down Expand Up @@ -173,7 +181,7 @@ export class CreationForm extends React.Component<ICreationFormProps, any> {
if (this.props.createLayer) {
let actualName = '';

const { name, ...layerData } =
const { name, opacity, ...layerData } =
(await layerCreationPromise?.promise) as IDict;

actualName =
Expand All @@ -184,6 +192,7 @@ export class CreationForm extends React.Component<ICreationFormProps, any> {
type: this.props.layerType || 'RasterLayer',
parameters: layerData,
visible: true,
opacity: opacity ?? 1,
name: actualName,
};

Expand Down
Loading
Loading