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: 2 additions & 2 deletions examples/cloud_optimized_geotiff.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
"layers": {
"6dd80360-2675-40cf-aaee-c7101ef1779a": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "a6a98ac4-0d1c-4a3d-af71-88a91f28ccb9"
},
"type": "RasterLayer",
"visible": true
},
"f75fd646-bc7d-478b-b65b-de34155b8efa": {
"name": "COG Layer",
"opacity": 1.0,
"parameters": {
"color": [
"interpolate",
Expand Down Expand Up @@ -138,7 +139,6 @@
1.0
]
],
"opacity": 1.0,
"source": "8b1d4258-5d46-48da-b466-496d376b593d",
"symbologyState": {
"band": 1.0,
Expand Down
4 changes: 2 additions & 2 deletions examples/earthquakes.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"layers": {
"8c99f4cd-849f-4d11-ae75-4100ea703f03": {
"name": "Earthquakes",
"opacity": 1.0,
"parameters": {
"color": {
"circle-fill-color": [
Expand Down Expand Up @@ -331,7 +332,6 @@
],
"stroke-width": 1.25
},
"opacity": 1.0,
"source": "578fb13e-9c82-4711-91f2-fb3671820583",
"symbologyState": {
"colorRamp": "viridis",
Expand All @@ -347,8 +347,8 @@
},
"8de7c2c0-6024-4716-b542-031a89fb87f9": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "b2ea427a-a51b-43ad-ae72-02cd900736d5"
},
"type": "RasterLayer",
Expand Down
6 changes: 3 additions & 3 deletions examples/france_hiking.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@
"layers": {
"0bfee293-9e2f-4434-8c5a-c90d19836bab": {
"name": "WaymarkedTrails.hiking Layer",
"opacity": 1.0,
"parameters": {
"opacity": 0.6,
"source": "82691e55-f9e2-43be-8a07-3ae0409af7b4"
},
"type": "RasterLayer",
"visible": true
},
"4a0703b3-ed56-4158-8a2e-e008c3d0fee2": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "60da082e-8b70-4fa2-b2f0-48524468fea0"
},
"type": "RasterLayer",
"visible": true
},
"7db81237-a579-4daa-938f-5e61fdfb17e7": {
"name": "NASAGIBS.ModisTerraTrueColorCR Layer",
"opacity": 1.0,
"parameters": {
"opacity": 0.3,
"source": "52252f5d-3cb7-45a8-a724-5793bf9950ec"
},
"type": "RasterLayer",
Expand Down
3 changes: 2 additions & 1 deletion 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": 1.0,
"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 Down
3 changes: 2 additions & 1 deletion examples/hillshade.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
"layers": {
"a82ef521-e727-4209-a5a0-145d66f18a06": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "ceef4036-b757-44bf-8a21-42c6c99dab72"
},
"type": "RasterLayer",
"visible": true
},
"f12a8dfe-4674-43e7-a649-cd49ee83eb34": {
"name": "Custom Hillshade Layer",
"opacity": 1.0,
"parameters": {
"shadowColor": "#473B24",
"source": "e87bb91a-ff2a-485b-bf0e-14b3b848955a"
Expand Down
3 changes: 2 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": "Radar",
"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": 1.0,
"parameters": {
"source": "5f7a1edf-1b76-4f82-893f-540d28998b1d"
},
Expand Down
5 changes: 3 additions & 2 deletions examples/local.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@
"layers": {
"66198b90-5d1c-4637-a15d-450b17c4fcb6": {
"name": "Radar",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "756b4c42-6ca0-40c1-9e3b-90c1f5f99fab"
},
"type": "ImageLayer",
"visible": true
},
"aae4466d-49da-4308-b73d-046e974f92a4": {
"name": "Subset of Manhattan roads",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "d82b24cf-e43a-43aa-bc7b-2578adc7ef8a"
},
"type": "VectorLayer",
"visible": true
},
"f5e91204-3ce9-408e-b179-c6cf5f75f0f7": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 1.0,
"parameters": {
"source": "3bd6b874-a28a-4ef6-bef8-a7257bb35c51"
},
Expand Down
3 changes: 2 additions & 1 deletion examples/pmtiles-raster.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
"layers": {
"2815540d-70c6-4eed-ba86-51596adf6863": {
"name": "Custom Raster Layer",
"opacity": 1.0,
"parameters": {
"opacity": 0.5,
"source": "d3a5ad67-d6fe-4793-a6c5-dd773d76c745"
},
"type": "RasterLayer",
"visible": true
},
"3d4563da-904d-4026-a06b-1e8cffbf536f": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 1.0,
"parameters": {
"source": "d76035d6-9fb2-41db-ad32-ea4d34268dc9"
},
Expand Down
3 changes: 2 additions & 1 deletion examples/pmtiles-vector.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"layers": {
"93077483-0e49-4135-aa1d-244e29e5cf97": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 1.0,
"parameters": {
"source": "c42d25fc-ca10-4447-ba00-ba22b0367739"
},
Expand All @@ -14,9 +15,9 @@
},
"95523f4c-27ef-42db-b755-a226ca017a94": {
"name": "Buildings",
"opacity": 1.0,
"parameters": {
"color": "#FF0000",
"opacity": 1.0,
"source": "e52daf20-9b57-4a14-9521-70eabbe4cda2",
"type": "line"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/roads.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"layers": {
"95bfd9ba-f561-414d-8e2b-bc401dae0d7f": {
"name": "Roads",
"opacity": 1.0,
"parameters": {
"color": {
"stroke-color": [
Expand Down Expand Up @@ -7451,7 +7452,6 @@
]
]
},
"opacity": 1.0,
"source": "b9e30ab1-864e-4395-9071-cddb6ac813e5",
"symbologyState": {
"colorRamp": "rainbow",
Expand Down
5 changes: 3 additions & 2 deletions examples/shapefile.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"layers": {
"54e0ea1f-32fd-4ff2-90fb-ad449a38f902": {
"name": "OpenStreetMap.Mapnik Layer",
"opacity": 1.0,
"parameters": {
"source": "780c4234-ba6d-4da2-9731-739f6c4d8033"
},
Expand All @@ -15,15 +16,16 @@
},
"df947252-afb1-489f-8bce-7057318a50e3": {
"name": "Subset of Manhattan roads",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "c3215d81-4b47-4b93-ae1c-5eb0fe8a68a8"
},
"type": "VectorLayer",
"visible": true
},
"f909d9b9-bf07-42f6-8841-8d6470665dcb": {
"name": "Administrative boundaries",
"opacity": 1.0,
"parameters": {
"color": {
"fill-color": "#eaa4e7",
Expand All @@ -32,7 +34,6 @@
"stroke-line-join": "round",
"stroke-width": 1.25
},
"opacity": 1.0,
"source": "eb4b68da-eab6-44a1-8e75-ca9c871d2755",
"symbologyState": {
"renderType": "Single Symbol"
Expand Down
6 changes: 3 additions & 3 deletions examples/test.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
"layers": {
"2467576f-b527-4cb7-998d-fa1d056fb8a1": {
"name": "Open Street Map",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "699facc9-e7c4-4f38-acf1-1fd7f02d9f36"
},
"type": "RasterLayer",
"visible": true
},
"57ef55ef-facb-48a2-ae1d-c9c824be3e8a": {
"name": "Regions France",
"opacity": 0.6,
"parameters": {
"color": "#e66100",
"opacity": 0.6,
"source": "7d082e75-69d5-447a-82d8-b05cca5945ba",
"type": "line"
},
Expand All @@ -37,8 +37,8 @@
},
"a0044fd7-f167-445f-b3d1-620a8f94b498": {
"name": "Open Topo Map",
"opacity": 1.0,
"parameters": {
"opacity": 1.0,
"source": "5fd42e3b-4681-4607-b15d-65c3a3e89b32"
},
"type": "RasterLayer",
Expand Down
4 changes: 2 additions & 2 deletions examples/world.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"layers": {
"6e55cdae-35b0-4bff-9dd1-c8aa9563b2a6": {
"name": "World",
"opacity": 1.0,
"parameters": {
"color": {
"fill-color": [
Expand Down Expand Up @@ -82,7 +83,6 @@
]
]
},
"opacity": 1.0,
"source": "b4287bea-e217-443c-b527-58f7559c824c",
"symbologyState": {
"colorRamp": "cool",
Expand All @@ -99,6 +99,7 @@
},
"f80d0fa2-3e2b-4922-b7d5-fefd4b085259": {
"name": "France",
"opacity": 1.0,
"parameters": {
"color": {
"fill-color": "#ff0000",
Expand All @@ -107,7 +108,6 @@
"stroke-line-join": "round",
"stroke-width": 1.25
},
"opacity": 1.0,
"source": "5970d6c9-26be-4cc6-84c9-16593dd3edfe",
"symbologyState": {
"renderType": "Single Symbol"
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?

Copy link
Contributor Author

@nakul-py nakul-py Sep 9, 2025

Choose a reason for hiding this comment

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

Do we need this?

I think we need.

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