jupytergis-lab 0.2.1__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/PKG-INFO +4 -8
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/__init__.py +0 -7
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/_version.py +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/labextension/package.json +10 -10
- jupytergis_lab-0.4.0/jupytergis_lab/labextension/static/432.d90a772f461ebee639dc.js +1 -0
- jupytergis_lab-0.4.0/jupytergis_lab/labextension/static/484.425ad4b1d9e52a956ab4.js +1 -0
- jupytergis_lab-0.2.1/jupytergis_lab/labextension/static/remoteEntry.d2db51504b645b5966c8.js → jupytergis_lab-0.4.0/jupytergis_lab/labextension/static/remoteEntry.df6c06d6aaf9d206e774.js +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/labextension/static/third-party-licenses.json +2 -2
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/gis_document.py +125 -15
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/__init__.py +2 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/__init__.py +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/geoTiffSource.py +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/geojson.py +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/geojsonsource.py +1 -1
- jupytergis_lab-0.4.0/jupytergis_lab/notebook/objects/_schema/heatmapLayer.py +30 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/hillshadeLayer.py +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/imageLayer.py +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/imageSource.py +2 -2
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/jgis.py +5 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/rasterDemSource.py +1 -9
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/rasterlayer.py +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/rastersource.py +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/shapefileSource.py +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/vectorTileLayer.py +1 -2
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/vectorlayer.py +1 -2
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/vectortilesource.py +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/videoSource.py +1 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/objects/_schema/webGlLayer.py +9 -6
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/tests/test_api.py +1 -16
- jupytergis_lab-0.4.0/jupytergis_lab/notebook/utils.py +17 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/y_connector.py +4 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/lib/index.js +15 -50
- jupytergis_lab-0.4.0/lib/notebookrenderer.d.ts +35 -0
- jupytergis_lab-0.4.0/lib/notebookrenderer.js +147 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/package.json +9 -9
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/pyproject.toml +3 -7
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/src/index.ts +21 -64
- jupytergis_lab-0.4.0/src/notebookrenderer.ts +232 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/style/base.css +16 -1
- jupytergis_lab-0.4.0/tsconfig.tsbuildinfo +1 -0
- jupytergis_lab-0.2.1/jupytergis_lab/labextension/static/432.b9e4425867aaf84b8265.js +0 -1
- jupytergis_lab-0.2.1/jupytergis_lab/labextension/static/484.2e0ff3a3ffb4e8547762.js +0 -1
- jupytergis_lab-0.2.1/jupytergis_lab/notebook/utils.py +0 -43
- jupytergis_lab-0.2.1/lib/notebookrenderer.d.ts +0 -23
- jupytergis_lab-0.2.1/lib/notebookrenderer.js +0 -67
- jupytergis_lab-0.2.1/src/notebookrenderer.ts +0 -118
- jupytergis_lab-0.2.1/tsconfig.tsbuildinfo +0 -1
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/.gitignore +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/.prettierignore +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/LICENSE +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/README.md +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/install.json +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/labextension/static/234.c2d7ed33ae9ca2244b0d.js +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/labextension/static/style.js +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/__init__.py +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/jupytergis_lab/notebook/tests/__init__.py +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/lib/index.d.ts +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/scripts/bump-version.py +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/setup.py +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/style/index.css +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/style/index.js +0 -0
- {jupytergis_lab-0.2.1 → jupytergis_lab-0.4.0}/tsconfig.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jupytergis_lab
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Dynamic: Keywords
|
|
5
5
|
Summary: JupyterGIS Lab extension.
|
|
6
6
|
Project-URL: Homepage, https://github.com/geojupyter/jupytergis
|
|
@@ -50,17 +50,13 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
50
50
|
Classifier: Programming Language :: Python :: 3.10
|
|
51
51
|
Classifier: Programming Language :: Python :: 3.11
|
|
52
52
|
Classifier: Programming Language :: Python :: 3.12
|
|
53
|
-
Requires-Python: >=3.
|
|
53
|
+
Requires-Python: >=3.10
|
|
54
54
|
Requires-Dist: comm<0.2.0,>=0.1.2
|
|
55
|
-
Requires-Dist: jupyter-
|
|
56
|
-
Requires-Dist: jupyter-server<3,>=2.0.1
|
|
57
|
-
Requires-Dist: jupyter-ydoc<3,>=2
|
|
55
|
+
Requires-Dist: jupyter-ydoc<4,>=2
|
|
58
56
|
Requires-Dist: jupytergis-core<1,>=0.1.0
|
|
59
|
-
Requires-Dist: jupyterlab<5,>=4.3
|
|
60
|
-
Requires-Dist: mapbox-vector-tile
|
|
61
57
|
Requires-Dist: pydantic<3,>=2
|
|
62
58
|
Requires-Dist: requests
|
|
63
|
-
Requires-Dist: yjs-widgets<0.
|
|
59
|
+
Requires-Dist: yjs-widgets<0.5,>=0.4
|
|
64
60
|
Requires-Dist: ypywidgets<0.10.0,>=0.9.0
|
|
65
61
|
Description-Content-Type: text/markdown
|
|
66
62
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupytergis/jupytergis-lab",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "JupyterGIS Lab extension.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -53,23 +53,23 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@jupyter/collaborative-drive": "^3.0.0",
|
|
56
|
-
"@jupytergis/base": "^0.
|
|
57
|
-
"@jupytergis/
|
|
58
|
-
"@jupytergis/schema": "^0.2.1",
|
|
56
|
+
"@jupytergis/base": "^0.4.0",
|
|
57
|
+
"@jupytergis/schema": "^0.4.0",
|
|
59
58
|
"@jupyterlab/application": "^4.3.0",
|
|
60
59
|
"@jupyterlab/apputils": "^4.3.0",
|
|
60
|
+
"@jupyterlab/completer": "^4.3.0",
|
|
61
|
+
"@jupyterlab/console": "^4.3.0",
|
|
61
62
|
"@jupyterlab/coreutils": "^6.3.0",
|
|
62
|
-
"@jupyterlab/docregistry": "^4.3.0",
|
|
63
|
-
"@jupyterlab/filebrowser": "^4.3.0",
|
|
64
|
-
"@jupyterlab/launcher": "^4.3.0",
|
|
65
63
|
"@jupyterlab/mainmenu": "^4.3.0",
|
|
64
|
+
"@jupyterlab/notebook": "^4.3.0",
|
|
66
65
|
"@jupyterlab/services": "^7.3.0",
|
|
66
|
+
"@jupyterlab/statedb": "^4.3.0",
|
|
67
67
|
"@jupyterlab/translation": "^4.3.0",
|
|
68
|
-
"@
|
|
68
|
+
"@lumino/commands": "^2.0.0",
|
|
69
69
|
"@lumino/messaging": "^2.0.0",
|
|
70
70
|
"@lumino/widgets": "^2.0.0",
|
|
71
71
|
"react": "^18.0.1",
|
|
72
|
-
"yjs-widgets": "^0.
|
|
72
|
+
"yjs-widgets": "^0.4"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@jupyterlab/builder": "^4.3.0",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
"_build": {
|
|
127
|
-
"load": "static/remoteEntry.
|
|
127
|
+
"load": "static/remoteEntry.df6c06d6aaf9d206e774.js",
|
|
128
128
|
"extension": "./extension",
|
|
129
129
|
"style": "./style"
|
|
130
130
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_jupytergis_jupytergis_lab=self.webpackChunk_jupytergis_jupytergis_lab||[]).push([[432],{4:(n,o,e)=>{e.d(o,{A:()=>l});var r=e(758),t=e.n(r),i=e(935),a=e.n(i)()(t());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const l=a},79:(n,o,e)=>{e.d(o,{A:()=>m});var r=e(758),t=e.n(r),i=e(935),a=e.n(i),l=e(564),p=e(365),s=e(633),d=e(606),c=e(543),g=e(367),u=e(301),f=e(4),b=a()(t());b.i(l.A),b.i(p.A),b.i(s.A),b.i(d.A),b.i(c.A),b.i(g.A),b.i(u.A),b.i(f.A),b.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jGIS-Toolbar-GroupName {\n font-size: var(--jp-ui-font-size0);\n padding-left: 3px;\n}\n\n/* Overwrite forms CSS */\n.jGIS-property-panel .array-item-list {\n display: flex;\n gap: 1rem;\n}\n\n.jGIS-property-panel .rjsf .array-item:not(:last-child) {\n border-bottom: none;\n margin-bottom: unset;\n padding-bottom: unset;\n}\n\n.jGIS-property-panel .rjsf .array-item {\n flex: 1 0 0%;\n align-items: center;\n}\n\n.jGIS-property-panel .rjsf fieldset fieldset {\n padding-left: unset;\n border-left: none;\n}\n\n.jGIS-property-panel .rjsf .array-item-list:has(.field-array) {\n flex-direction: column;\n}\n\n.jp-gis-text-label {\n margin: 0;\n padding: 0;\n font-weight: bold;\n display: block;\n position: relative;\n}\n\n/*This is being upstreamed. Will remove once upstream's been fixed.*/\nbutton.jp-mod-styled.jp-mod-accept {\n background-color: var(--jp-brand-color1) !important;\n}\n\nbutton.jp-mod-styled.jp-mod-reject {\n background-color: var(--jp-layout-color4) !important;\n}\n",""]);const m=b},564:(n,o,e)=>{e.d(o,{A:()=>l});var r=e(758),t=e.n(r),i=e(935),a=e.n(i)()(t());a.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jGIS-property-panel .rjsf .jp-select-wrapper select {\n background-image: unset;\n}\n",""]);const l=a},606:(n,o,e)=>{e.d(o,{A:()=>l});var r=e(758),t=e.n(r),i=e(935),a=e.n(i)()(t());a.push([n.id,".jp-gis-filter-main {\n display: flex;\n flex-direction: column;\n padding: 10px;\n gap: 1rem;\n}\n\n.jp-gis-filter-list {\n display: flex;\n flex-direction: column;\n}\n\n.jp-gis-filter-button-container {\n display: flex;\n justify-content: space-between;\n}\n\n.jp-gis-filter-main > .jp-Dialog-button {\n width: fit-content;\n align-self: flex-end;\n}\n\n.jp-gis-logical-select {\n width: fit-content !important;\n padding: 0 8px !important;\n text-align: center;\n}\n\n.jp-gis-filter-select-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.jp-gis-filter-row {\n display: flex;\n justify-content: space-around;\n width: 100%;\n gap: 0.25rem;\n}\n\n.jp-gis-filter-row > select {\n text-transform: capitalize;\n padding: 0;\n text-align: center;\n}\n\n.jp-gis-filter-row > option {\n text-transform: capitalize;\n font-size: var(--jp-ui-font-size1);\n}\n\n.jp-gis-filter-row > button {\n color: var(--jp-ui-font-color0);\n background: none;\n}\n\n.jp-gis-filter-row > button:hover {\n color: var(--jp-warn-color-hover);\n}\n\n.jp-gis-filter-icon:hover {\n scale: 1.3;\n cursor: pointer;\n}\n\n.jp-gis-filter-icon > svg {\n height: 16px;\n width: 16px;\n}\n",""]);const l=a},378:(n,o,e)=>{e.d(o,{A:()=>s});var r=e(758),t=e.n(r),i=e(935),a=e.n(i),l=e(79),p=a()(t());p.i(l.A),p.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n",""]);const s=p},365:(n,o,e)=>{e.d(o,{A:()=>l});var r=e(758),t=e.n(r),i=e(935),a=e.n(i)()(t());a.push([n.id,".jGIS-layerbrowser-FormDialog .jp-Dialog-header {\n padding: 0;\n}\n\n.jGIS-layerbrowser-FormDialog .jp-Dialog-content {\n width: calc(100% - 4rem);\n max-width: 100%;\n height: calc(100% - 2rem);\n max-height: 100%;\n}\n\n.jGIS-layerbrowser-FormDialog form {\n padding: 10px;\n}\n\n.jGIS-customlayer-form {\n height: 100%;\n overflow: auto;\n}\n\n.jGIS-layer-browser-container * {\n box-sizing: border-box;\n}\n\n.jGIS-layer-browser-container {\n display: flex;\n flex-direction: column;\n}\n\n.jGIS-layer-browser-header-container {\n position: sticky;\n top: 0;\n z-index: 40;\n background-color: var(--jp-layout-color1);\n}\n\n.jGIS-layer-browser-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 20px;\n padding: 1rem 2rem;\n}\n\n.jGIS-layer-browser-header-text {\n padding-right: 1rem;\n font-weight: bold;\n}\n\n.jGIS-layer-browser-header-search-container {\n display: flex;\n align-items: center;\n flex-grow: 1;\n position: relative;\n}\n\n.jGIS-layer-browser-header-search-icon {\n position: absolute;\n top: 50%;\n left: 0.75rem;\n transform: translateY(-50%);\n}\n\n.jGIS-layer-browser-header-search {\n box-shadow: none;\n flex: 1 1 0%;\n height: 40px;\n padding: 1rem 2rem;\n padding-left: 2.5rem;\n background-color: transparent;\n border: 1px solid var(--jp-border-color1);\n border-radius: 8px;\n color: var(--jp-ui-font-color1);\n}\n\n.jGIS-layer-browser-grid {\n display: grid;\n gap: 1.25rem;\n grid-template-rows: 1fr;\n grid-template-columns: repeat(3, minmax(0px, 1fr));\n padding: 1rem 2rem;\n}\n\n@media (min-width: 1400px) {\n .jGIS-layer-browser-grid {\n grid-template-columns: repeat(5, minmax(0px, 1fr));\n }\n}\n\n.jGIS-layer-browser-categories {\n display: flex;\n gap: 2rem;\n padding: 0 2rem;\n border-bottom: 2px solid var(--jp-border-color1);\n}\n\n.jGIS-layer-browser-category {\n position: relative;\n opacity: 0.7;\n padding: 4px 0 14px;\n cursor: pointer;\n text-decoration: none;\n}\n\n.jGIS-layer-browser-category::after {\n content: '';\n position: absolute;\n bottom: -2px;\n left: 0;\n width: 0px;\n height: 3px;\n transition:\n background-color 300ms ease-in,\n width 300ms ease-in,\n opacity 300ms ease-in;\n background-color: transparent;\n}\n\n.jGIS-layer-browser-category.jGIS-layer-browser-category-selected::after {\n width: 100%;\n background-color: var(--jp-inverse-layout-color2);\n}\n\n.jGIS-layer-browser-category.jGIS-layer-browser-category-selected {\n opacity: 1;\n font-weight: bold;\n}\n\n.jGIS-layer-browser-tile {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n position: relative;\n margin-top: 4px;\n padding: 8px;\n transition: transform 150ms ease-out;\n cursor: pointer;\n border: 1px solid var(--jp-border-color1);\n background-color: var(--jp-layout-color1);\n border-radius: 8px;\n}\n\n.jGIS-layer-browser-custom-tile {\n border: 1px solid var(--jp-border-color2);\n background-color: var(--jp-layout-color2);\n}\n\n.jGIS-layer-browser-tile:hover {\n box-shadow: var(--jp-layout-color2);\n transform: translateY(-4px);\n background-color: var(--jp-brand-color2);\n}\n\n.jGIS-layer-browser-tile-img-container {\n /* isolation: isolate; */\n /* border: medium; */\n /* background: transparent; */\n /* padding: 0px; */\n /* width: 100%; */\n aspect-ratio: 16 / 10;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n}\n\n.jGIS-layer-browser-img {\n /* position: absolute; */\n /* height: 100%; */\n /* object-fit: cover; */\n /* box-sizing: border-box; */\n width: 100%;\n}\n\n.jGIS-layer-browser-icon {\n padding-inline: 8px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n overflow: hidden;\n box-sizing: border-box;\n width: 32px;\n height: 32px;\n transition:\n width 125ms ease-in-out,\n background-color 125ms ease-in-out,\n opacity 150ms ease-out;\n background-color: var(--jp-accent-color1);\n border-radius: 20px;\n}\n\n.jGIS-layer-browser-tile:not(.jGIS-layer-browser-tile:hover)\n .jGIS-layer-browser-icon {\n opacity: 0;\n}\n\n.jGIS-layer-browser-added {\n display: inline-flex;\n gap: 0.35rem;\n opacity: 1 !important;\n width: 7rem;\n color: var(--jp-ui-inverse-font-color1);\n}\n\n.jGIS-layer-browser-text-container {\n padding-inline: 4px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: 8px;\n flex: 1 1 0%;\n box-sizing: border-box;\n}\n\n.jGIS-layer-browser-text-info {\n display: flex;\n flex-direction: column;\n gap: 8px;\n box-sizing: border-box;\n}\n\n.jGIS-layer-browser-text-header {\n overflow: hidden;\n font-weight: bold;\n text-transform: capitalize;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.jGIS-layer-browser-text-p {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.jGIS-layer-browser-text-source {\n overflow: hidden;\n font-size: 0.75rem;\n font-weight: lighter;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.jGIS-layer-browser-text-description {\n -webkit-line-clamp: 2;\n -moz-box-orient: vertical;\n display: -webkit-box;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.jGIS-layer-browser-text-general {\n margin: 0;\n}\n",""]);const l=a},633:(n,o,e)=>{e.d(o,{A:()=>l});var r=e(758),t=e.n(r),i=e(935),a=e.n(i)()(t());a.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-gis-sourcePanel,\n.jp-gis-layerPanel {\n min-height: 3em;\n}\n\n.jp-gis-layerItem,\n.jp-gis-source {\n padding: 2px 0 2px 12px;\n}\n\n.jp-gis-layerGroup {\n display: flex;\n flex-direction: column;\n}\n\n.jp-gis-layerGroupHeader {\n display: flex;\n margin-left: -2px;\n padding-bottom: 4px;\n}\n\n.jp-gis-layerGroupHeader:hover {\n cursor: pointer;\n}\n\n.jp-gis-layerGroupCollapser {\n transform: rotate(-90deg);\n margin: auto 0;\n height: 16px;\n}\n\n.jp-gis-layerGroupCollapser.jp-mod-expanded {\n transform: rotate(0deg);\n}\n\n.jp-gis-layer,\n.jp-gis-source {\n display: flex;\n flex-direction: row;\n align-items: center;\n color: var(--jp-ui-font-color1);\n}\n\n.jp-gis-layer.jp-mod-selected,\n.jp-gis-source.jp-mod-selected,\n.jp-gis-layerGroupHeader.jp-mod-selected {\n color: var(--jp-ui-inverse-font-color1);\n background: var(--jp-brand-color1);\n}\n\n.jp-gis-layer:hover:not(.jp-mod-selected),\n.jp-gis-source:hover:not(.jp-mod-selected) {\n cursor: pointer;\n background: var(--jp-layout-color2);\n}\n\n.jp-gis-layer.jp-mod-selected .jp-icon-selectable,\n.jp-gis-source.jp-mod-selected .jp-icon-selectable,\n.jp-gis-layerGroupHeader.jp-mod-selected .jp-icon-selectable {\n fill: var(--jp-ui-inverse-font-color1);\n}\n.jp-gis-layer.jp-mod-selected path,\n.jp-gis-source.jp-mod-selected path {\n fill: var(--jp-ui-inverse-font-color1);\n}\n.jp-gis-layer.jp-mod-selected button:hover,\n.jp-gis-source.jp-mod-selected button:hover {\n background: none;\n}\n\n.jp-gis-layer button,\n.jp-gis-source button {\n margin-left: auto;\n min-height: unset;\n min-width: unset;\n padding: unset;\n margin-right: 4px;\n}\n\n.jp-gis-layer.jp-mod-selected button:hover .jp-icon-selectable,\n.jp-gis-source.jp-mod-selected button:hover .jp-icon-selectable {\n fill: var(--jp-ui-font-color1);\n}\n\n.jp-gis-layerIcon,\n.jp-gis-sourceIcon {\n display: flex;\n align-items: center;\n}\n\n.jp-gis-layerIcon > svg,\n.jp-gis-sourceIcon > svg {\n height: 16px;\n width: 16px;\n}\n\n.jp-gis-layerTitle,\n.jp-gis-sourceTitle {\n display: flex;\n flex-grow: 1;\n align-items: center;\n}\n\n.jp-gis-layerText:focus,\n.jp-gis-sourceText:focus {\n outline: none;\n}\n\n.jp-gis-layerTitle .jp-gis-layerIcon,\n.jp-gis-sourceTitle .jp-gis-sourceIcon {\n padding-right: 4px;\n}\n\n.jp-gis-layerIcon.jp-gis-mod-hidden path,\n.jp-gis-sourceIcon.jp-gis-mod-hidden path {\n fill: var(--jp-warn-color0);\n}\n\n.jp-gis-left-panel-input {\n background-color: transparent;\n border: 1px solid var(--jp-border-color1);\n border-radius: 8px;\n color: var(--jp-ui-font-color1);\n flex-grow: 1;\n margin-right: 4px;\n outline: none;\n padding: 2px 7px;\n}\n\n.jp-gis-left-panel-input:focus {\n border: 1px solid var(--jp-brand-color1);\n}\n\n.jp-gis-layerText,\n.jp-gis-sourceText {\n padding: 3px 0;\n cursor: pointer;\n}\n\nli .lm-Menu-itemLabel {\n text-transform: capitalize;\n}\n\n.jp-gis-sourceInfo {\n font-size: var(--jp-ui-font-size0);\n font-style: italic;\n padding-left: 5px;\n color: var(--jp-ui-font-color2);\n}\n\n#jp-drag-indicator {\n top: calc(-1 * var(--jp-border-width) + 1px);\n left: calc(-1 * var(--jp-border-width));\n content: '';\n height: var(--jp-private-horizontal-tab-active-top-border);\n width: calc(100% + 2 * var(--jp-border-width));\n background: var(--jp-brand-color1);\n}\n",""]);const l=a},367:(n,o,e)=>{e.d(o,{A:()=>l});var r=e(758),t=e.n(r),i=e(935),a=e.n(i)()(t());a.push([n.id,".jgis-status-bar {\n display: flex;\n justify-content: space-around;\n align-items: center;\n height: 16px;\n background-color: var(--jp-layout-color1);\n font-size: var(--jp-ui-font-size0);\n}\n\n.jgis-status-bar-item {\n flex: 0 0 content;\n}\n\n.jgis-status-bar-coords {\n min-width: 160px;\n}\n",""]);const l=a},543:(n,o,e)=>{e.d(o,{A:()=>l});var r=e(758),t=e.n(r),i=e(935),a=e.n(i)()(t());a.push([n.id,"select,\nselect option {\n text-transform: capitalize;\n}\n\n.jp-gis-symbology-dialog .jp-Dialog-header {\n font-weight: bold;\n}\n\n.jp-gis-symbology-dialog .jp-Dialog-content {\n width: calc(80% - 4rem);\n max-width: 80%;\n height: fit-content;\n max-height: 80%;\n}\n\n.jp-gis-symbology-row {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n gap: 2rem;\n}\n\n.jp-gis-symbology-row label {\n font-size: var(--jp-ui-font-size2);\n flex: 0 1 20%;\n}\n\n.jp-gis-symbology-row > .jp-select-wrapper,\n.jp-gis-symbology-row > .jp-mod-styled {\n flex: 1 0 50%;\n max-width: 50%;\n}\n\n.jp-gis-color-ramp-div {\n display: flex;\n flex: 1 1 50%;\n max-width: 50%;\n justify-content: space-between;\n align-items: baseline;\n}\n\n.jp-gis-color-ramp-div > .jp-select-wrapper {\n flex: 1 0 40%;\n}\n\n.jp-gis-color-ramp-div:last-child {\n flex-shrink: 0;\n}\n\n.jp-gis-color-ramp-div > input {\n max-width: 25%;\n}\n\n.jp-gis-band-container {\n display: flex;\n flex-direction: column;\n gap: 13px;\n}\n\n.jp-gis-layer-symbology-container {\n display: flex;\n flex-direction: column;\n gap: 13px;\n border-top: 1px solid var(--jp-border-color2);\n padding-top: 8px;\n}\n\n.jp-gis-layer-symbology-container .jp-select-wrapper {\n margin-bottom: unset;\n}\n\n.jp-gis-color-ramp-container {\n display: flex;\n flex-direction: column;\n gap: 13px;\n}\n\n.jp-gis-stop-container {\n display: flex;\n flex-direction: column;\n gap: 0.1rem;\n}\n\n.jp-gis-stop-labels {\n display: flex;\n font-weight: bold;\n font-size: var(--jp-ui-font-size1);\n gap: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n.jp-gis-stop-labels > span {\n flex: 0 0 18%;\n}\n\n.jp-gis-color-row {\n display: flex;\n width: 100%;\n gap: 0.25rem;\n height: 32px;\n}\n\n.jp-gis-color-row-value-input {\n flex: 0 1 18%;\n min-width: 0px;\n}\n\n.jp-gis-color-row-output-input {\n flex-grow: 1;\n}\n\n.jp-gis-color-row > button {\n color: var(--jp-ui-font-color0);\n background: none;\n padding-right: 0px;\n}\n\n.jp-gis-symbology-button-container {\n padding-top: 0.5rem;\n}\n\n.jp-gis-band-info-loading-container {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 2rem;\n margin: auto;\n}\n\n.jp-gis-loading-spinner {\n animation: spin 4s linear infinite;\n font-size: 1.5rem;\n padding: 1rem 0;\n margin: auto;\n}\n\n.jp-gis-band-info-loading-container > span {\n font-size: 1rem;\n}\n\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n.jp-gis-color-ramp-dropdown {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n position: absolute;\n overflow-x: hidden;\n overflow-y: auto;\n visibility: hidden;\n z-index: 40;\n flex: 1 1 auto;\n width: 97%;\n max-height: 20rem;\n background: var(--jp-input-background);\n padding-left: 8px;\n border: var(--jp-border-width) solid var(--jp-input-border-color);\n border-radius: 0;\n outline: none;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n}\n\n.jp-gis-open {\n visibility: visible;\n}\n\n.jp-gis-color-ramp-entry {\n display: flex;\n align-items: center;\n font-size: var(--jp-ui-font-size2);\n color: var(--jp-ui-font-color0);\n appearance: none;\n text-transform: capitalize;\n cursor: pointer;\n -webkit-appearance: none;\n -moz-appearance: none;\n}\n\n.jp-gis-color-label {\n color: white;\n position: absolute;\n transition: transform 0.3s ease;\n}\n\n.jp-gis-color-ramp-entry:hover .jp-gis-color-label {\n transform: scale(1.2);\n}\n\n.jp-gis-color-canvas {\n margin: 0 -7px;\n border-radius: 4px;\n width: 100%;\n max-height: 38px;\n}\n\n.jp-gis-color-canvas-display {\n width: 100%;\n height: 30px;\n visibility: initial;\n border-radius: var(--jp-border-radius);\n}\n\n.jp-Dialog-content:has(.jp-gis-heatmap),\n.jp-Dialog-body:has(.jp-gis-heatmap) {\n overflow: visible;\n}\n\n.jp-gis-canvas-button-wrapper {\n flex: 1 0 50%;\n max-width: 50%;\n position: relative;\n}\n\n#jp-gis-canvas-button.jp-gis-canvas-button {\n visibility: hidden;\n margin: 0;\n padding: 0 1px 0 0;\n width: 100%;\n}\n",""]);const l=a},301:(n,o,e)=>{e.d(o,{A:()=>l});var r=e(758),t=e.n(r),i=e(935),a=e.n(i)()(t());a.push([n.id,".jp-gis-temporal-slider-container {\n display: flex;\n flex-direction: column;\n gap: 0.2rem;\n padding: 0.5rem;\n background-color: var(--jp-layout-color1);\n border-bottom: 1px solid var(--jp-border-color1);\n}\n\n.jp-gis-temporal-slider-container span,\n.jp-gis-temporal-slider-container label {\n font-weight: bold;\n}\n\n.jp-gis-temporal-slider-row {\n display: flex;\n gap: 0.25rem;\n justify-content: space-between;\n align-items: center;\n}\n\n.jp-gis-temporal-slider-controls {\n display: flex;\n flex-grow: 1;\n justify-content: space-around;\n}\n\n.jp-gis-temporal-slider-sub-controls {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 0.25rem;\n}\n\n.jp-gis-temporal-slider-sub-controls > input {\n width: 35px;\n}\n\nselect,\nselect option {\n text-transform: capitalize;\n}\n\n.jp-gis-temporal-slider {\n flex: 1 0 40%;\n min-width: 300px;\n}\n",""]);const l=a},296:(n,o,e)=>{e.d(o,{A:()=>u});var r=e(758),t=e.n(r),i=e(935),a=e.n(i),l=e(378),p=e(62),s=e.n(p),d=new URL(e(248),e.b),c=a()(t());c.i(l.A);var g=s()(d);c.push([n.id,`.jGIS-Spinner {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 10;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n outline: none;\n background: #00000075;\n}\n\n.jGIS-SpinnerContent {\n border: solid #f376269e;\n margin: 50px auto;\n text-indent: -9999em;\n width: 6em;\n height: 6em;\n border-radius: 50%;\n position: relative;\n animation:\n load3 1s infinite linear,\n fadeIn 1s;\n}\n\n.jGIS-SpinnerContent:before {\n width: 50%;\n height: 50%;\n background: #f3762605;\n border-radius: 100% 0 100% 0;\n box-shadow: inset 6px 5px 0 1px #f37626;\n position: absolute;\n top: 0;\n left: 0;\n content: '';\n}\n\n.jGIS-SpinnerContent:after {\n width: 75%;\n height: 75%;\n border-radius: 50%;\n content: '';\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n}\n\n.jGIS-camera-client {\n width: 15px;\n height: 15px;\n position: absolute;\n z-index: 10;\n background-color: var(--jp-private-notebook-active-color);\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.jGIS-control-panel {\n color: var(--jp-ui-font-color1);\n background: var(--jp-layout-color1);\n height: 100%;\n}\n\n.jGIS-control-panel * {\n font-family: var(--jp-ui-font-family);\n}\n\n.jGIS-control-panel-title {\n border-bottom: solid var(--jp-border-width) var(--jp-border-color1);\n box-shadow: var(--jp-toolbar-box-shadow);\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: 24px;\n height: var(--jp-debugger-header-height);\n background-color: var(--jp-layout-color2);\n}\n\n.jGIS-control-panel-title h2 {\n text-transform: uppercase;\n font-weight: 600;\n font-size: var(--jp-ui-font-size0);\n color: var(--jp-ui-font-color1);\n padding-left: 8px;\n padding-right: 4px;\n}\n\n.jGIS-sidepanel-widget {\n height: 100%;\n}\n\n.jGIS-sidebar-treepanel {\n display: flex;\n flex-direction: column;\n min-height: 50px;\n padding-top: 3px;\n}\n\n.jGIS-sidebar-propertiespanel {\n display: flex;\n flex-direction: column;\n min-height: 50px;\n padding-top: 3px;\n}\n\n.jGIS-treeview-wrapper {\n overflow: auto;\n height: 100%;\n}\n\n.jGIS-treeview-wrapper > div {\n padding: 0 !important;\n}\n/* TODO: More robust selector */\n.jGIS-treeview-wrapper div[style*='align-items: center;']:first-of-type {\n flex-grow: 1;\n}\n\n.jGIS-control-panel-tree {\n flex-grow: 1;\n}\n\n.jGIS-sidebar-propertiespanel > div {\n overflow: auto;\n}\n\n.jGIS-property-outer {\n padding: 10px;\n flex-grow: 1;\n overflow: auto;\n}\n\n.jGIS-property-buttons {\n display: flex;\n justify-content: end;\n padding: 10px;\n}\n\n.jGIS-property-panel {\n display: flex;\n flex-flow: column;\n height: 100%;\n overflow: hidden;\n}\n\n.jGIS-hidden-field {\n display: none;\n}\n\ndiv.field.field-array > label + span {\n display: none;\n}\n\n.jGIS-layer-CreationFormDialog .jp-Dialog-content {\n width: 60%;\n}\n\n.jGIS-layer-CreationFormDialog form {\n padding: 10px;\n}\n\n/* TODO Upstream this to jupyterlab jrfs */\n.jGIS-property-panel .rjsf .control-label,\n.jGIS-property-panel .rjsf legend {\n position: inherit;\n text-transform: capitalize;\n}\n\ndiv.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child {\n flex-grow: 1;\n}\n\n.jGIS-toolbar-usertoolbar {\n flex-grow: 1;\n display: flex;\n flex-direction: row-reverse;\n}\n.jGIS-toolbar-react-widget {\n display: flex;\n flex-direction: row;\n align-items: center;\n flex-grow: 1;\n}\n\n.jGIS-Toolbar-Separator {\n min-height: 25px;\n width: var(--jp-border-width);\n background-color: var(--jp-border-color1);\n padding-left: 0px !important;\n padding-right: 0px !important;\n}\n\n.jGIS-toolbar-usertoolbar .jp-MenuBar-anonymousIcon,\n.jGIS-toolbar-usertoolbar .jp-MenuBar-imageIcon {\n position: unset !important;\n margin-right: 2px;\n height: 22px;\n box-sizing: border-box;\n}\n\n.jGIS-toolbar-usertoolbar .jp-MenuBar-anonymousIcon.selected,\n.jGIS-toolbar-usertoolbar .jp-MenuBar-imageIcon.selected {\n border: solid 1.5px red;\n}\n\n.jGIS-Mainview-Container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.jGIS-Mainview {\n width: 100%;\n box-sizing: border-box;\n flex: 1;\n}\n\n.jGIS-Popup-Wrapper {\n position: absolute;\n opacity: 1;\n transition: opacity 0.1s linear 0.15s;\n}\n\n.jGIS-Annotation {\n z-index: 1;\n margin-left: 1px;\n margin-top: 1px;\n padding: 1em;\n color: #fff;\n background: var(--jp-layout-color1);\n border-radius: 0.5em;\n font-size: 12px;\n line-height: 1.2;\n transition: opacity 0.5s;\n}\n\n.jGIS-FloatingAnnotation {\n position: absolute;\n width: 250px;\n box-shadow: var(--jp-elevation-z6);\n z-index: 40;\n max-height: 400px;\n overflow: auto;\n}\n\n.jGIS-Annotations {\n overflow: auto;\n}\n\n.jGIS-Annotation-Card {\n max-height: 400px;\n overflow: auto;\n}\n\n.jGIS-Annotations-Separator {\n border-color: var(--jp-layout-color4);\n border-style: solid;\n border-width: 1px;\n}\n\n.jGIS-Annotation-Handler {\n position: absolute;\n top: -5px;\n left: -5px;\n width: 8px;\n height: 8px;\n border: 1px solid #ffffffc2;\n border-radius: 50%;\n background: rgb(0 0 0 / 63%);\n cursor: pointer;\n transition-property: width, height, left, top;\n transition-duration: 0.2s;\n z-index: 20;\n}\n\n.jGIS-Annotation-Handler:hover {\n top: -9px;\n left: -9px;\n width: 16px;\n height: 16px;\n}\n\n.jGIS-Annotation-Message {\n display: flex;\n margin-top: 10px;\n gap: 5px;\n align-items: center;\n justify-content: center;\n}\n\n.jGIS-Annotation-Message .jGIS-Annotation-User-Icon {\n border-radius: 100%;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n vertical-align: middle;\n color: var(--jp-ui-font-color1);\n}\n\n.jGIS-Annotation-Message textarea {\n border-radius: var(--jp-border-radius);\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color2);\n flex-grow: 1;\n resize: none;\n border: none;\n padding: 0.5em;\n outline: thin solid var(--jp-border-color0);\n}\n\n.jGIS-Annotation-Message-Content {\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color2);\n border-radius: var(--jp-border-radius);\n flex-grow: 1;\n}\n\n.jGIS-Popup-Topbar {\n display: flex;\n flex-direction: row-reverse;\n}\n\n.jGIS-Popup-TopBarIcon {\n cursor: pointer;\n transform: rotate(180deg);\n}\n\n.jGIS-Annotation-Submit > svg {\n width: 30px;\n height: 30px;\n}\n\n.jGIS-Annotation-Submit g {\n fill: #f6f7f8 !important;\n}\n\n.jGIS-Annotation-Submit:hover {\n opacity: 70%;\n cursor: pointer;\n}\n\n.jGIS-Annotation-Submit {\n background-color: var(--jp-brand-color1);\n border-radius: 100%;\n width: 30px;\n height: 30px;\n}\n\n.jGIS-Annotation-Buttons {\n display: flex;\n justify-content: space-around;\n padding-top: 1em;\n}\n\n.jGIS-Annotation-Buttons > button {\n border-radius: var(--jp-border-radius);\n flex-grow: 1;\n max-width: 68px;\n}\n\n.jGIS-Remote-Pointer {\n position: absolute;\n transition-property: left, top, width, height;\n transition-duration: 150ms;\n transition-timing-function: ease;\n z-index: 20;\n}\n\n.jGIS-Remote-Pointer-Icon:hover {\n scale: 1.3;\n}\n\n.jGIS-Floating-Pointer-Popup {\n position: absolute;\n width: 160px;\n box-shadow: var(--jp-elevation-z6);\n z-index: 40;\n max-height: 400px;\n overflow: auto;\n}\n\n.jGIS-Remote-Pointer-Popup {\n margin-left: 7px;\n margin-top: 14px;\n color: #fff;\n padding: 1em;\n border-radius: 0.5em;\n font-size: 12px;\n line-height: 1.2;\n}\n\n.jGIS-Remote-Pointer-Popup-Name {\n font-size: 16px;\n color: #333;\n}\n\n.jGIS-Remote-Pointer-Popup-Coordinates {\n font-size: 14px;\n}\n\n/* Hack to remove the malformed form button */\n.object-property-expand {\n display: none;\n}\n\n.highlight {\n background-color: var(--jp-layout-color2) !important;\n}\n.jupytergis-notebook-widget {\n height: 600px;\n width: 100%;\n}\n.jupytergis-notebook-widget > div {\n height: 100%;\n width: 100%;\n}\n\n.jGIS-property-panel .rjsf .control-label,\n.jGIS-property-panel .rjsf legend {\n width: 100%;\n}\n\n.jpgis-console {\n border-top: var(--jp-border-width) solid var(--jp-toolbar-border-color);\n}\n\n.jpgis-console .jp-CodeConsole-banner {\n display: none;\n}\n\n/* FormComponent CSS */\n.jGIS-property-panel .rjsf {\n color: var(--jp-ui-font-color1);\n}\n\n.jGIS-property-panel .rjsf > form {\n padding: var(--jp-ui-font-size1);\n}\n\n.jGIS-property-panel .rjsf fieldset {\n border: 0;\n margin: 0;\n padding: 0;\n}\n\n.jGIS-property-panel .rjsf button[type='submit'] {\n display: none;\n}\n\n.jGIS-property-panel .rjsf .control-label,\n.jGIS-property-panel .rjsf legend {\n margin: 0;\n padding: 0;\n font-weight: bold;\n position: relative;\n width: 100%;\n}\n\n.jGIS-property-panel .rjsf legend > :first-child,\n.jGIS-property-panel .rjsf .control-label > :first-child {\n margin-top: 0;\n padding-top: 0;\n}\n\n.jGIS-property-panel .rjsf .form-group .form-group {\n margin-bottom: var(--jp-ui-font-size1);\n}\n\n.jGIS-property-panel .rjsf .form-group:last-child {\n margin-bottom: 0;\n}\n\n.jGIS-property-panel .rjsf .jp-FormGroup-description,\n.jGIS-property-panel .rjsf .field-description,\n.jGIS-property-panel .rjsf .help-block {\n color: var(--jp-ui-font-color2);\n margin-top: 2px;\n margin-bottom: 2px;\n}\n\n.jGIS-property-panel\n .jp-FormGroup-content\n fieldset\n .jp-inputFieldWrapper\n > input {\n box-sizing: border-box;\n border: var(--jp-border-width) solid var(--jp-border-color1);\n background-color: var(--jp-layout-color0);\n color: var(--jp-ui-font-color0);\n font-size: var(--jp-ui-font-size2);\n min-width: 0;\n outline: none !important;\n padding: 2px 7px;\n width: 100%;\n max-width: 100%;\n}\n\n.jGIS-property-panel\n .jp-FormGroup-content\n fieldset\n .jp-inputFieldWrapper\n > input#root_Color,\n.jGIS-property-panel\n .jp-FormGroup-content\n fieldset\n .jp-inputFieldWrapper\n > input#root_shadowColor {\n height: revert;\n}\n\n.jGIS-property-panel .jp-FormGroup-contentNormal {\n display: flex;\n flex-direction: column;\n align-items: inherit;\n}\n\n.jGIS-property-panel .jp-FormGroup-contentNormal .jp-FormGroup-fieldLabel {\n font-weight: bold;\n order: 1;\n margin-top: 2px;\n margin-bottom: 2px;\n text-transform: capitalize;\n}\n\n.jGIS-property-panel\n .jp-FormGroup-content\n .jp-FormGroup-contentNormal\n .jp-FormGroup-description,\n.jGIS-property-panel .field-description {\n order: 2;\n color: var(--jp-ui-font-color2);\n}\n\n.jGIS-property-panel .jp-FormGroup-content .jp-inputFieldWrapper {\n order: 3;\n}\n\n.jGIS-property-panel .jp-FormGroup-contentNormal .validationErrors,\n.jGIS-property-panel .jp-FormGroup-contentNormal .validationErrors ul {\n order: 4;\n list-style: none;\n color: var(--jp-warn-color0);\n margin: 0;\n padding: 0;\n}\n\n.jGIS-property-panel .jp-objectFieldWrapper,\n.jGIS-property-panel .jp-arrayFieldWrapper {\n padding-left: var(--jp-notebook-padding);\n border-left: solid 4px var(--jp-border-color3);\n}\n\n.jGIS-property-panel .array-item {\n border: none;\n}\n\n.jGIS-property-panel\n .jp-FormGroup-content\n .jp-FormGroup-contentNormal\n .jp-arrayFieldWrapper\n + .jp-FormGroup-description {\n display: none;\n}\n\n.jGIS-property-panel .rjsf .errors {\n color: var(--jp-warn-color0);\n}\n\n.jGIS-property-panel .rjsf .errors ul,\n.jGIS-property-panel .rjsf .validationErrors ul,\n.jGIS-property-panel .rjsf .validationErrors li,\n.jGIS-property-panel .rjsf .errors li {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.jGIS-property-panel .rjsf .jp-ArrayOperationsButton {\n display: none;\n}\n\n/* Hide additional property fields with remove buttons that should not be displayed in the form */\n.jGIS-property-panel\n .form-group:has(.jp-FormGroup-removeButton):not(:has(.jp-root)) {\n display: none;\n}\n\n.jGIS-property-panel .jp-arrayFieldWrapper .array-item legend,\n.jGIS-property-panel\n .jp-arrayFieldWrapper\n .field-array-of-array\n .field-array-of-number\n legend,\n.jGIS-property-panel\n .jp-arrayFieldWrapper\n .field-array-of-array\n .field-array-of-number\n .jp-FormGroup-fieldLabel {\n display: none;\n}\n.jGIS-property-panel\n .jp-arrayFieldWrapper\n .field-array-of-array\n .array-item\n .form-group\n .field-array-of-number {\n display: flex;\n}\n\n.jGIS-property-panel\n .jp-arrayFieldWrapper\n .field-array-of-array\n .array-item\n .form-group\n .field-array-of-number\n > div:nth-child(1) {\n order: 2;\n}\n\n.jGIS-property-panel\n .jp-arrayFieldWrapper\n .field-array-of-array\n .array-item\n .form-group\n .field-array-of-number\n > div:nth-child(2) {\n order: 1;\n}\n\n.jGIS-property-panel .required {\n font-size: var(--jp-ui-font-size3);\n color: var(--jp-warn-color1);\n font-weight: 800;\n position: absolute;\n top: 0;\n right: 0;\n display: block;\n}\n\n.jGIS-property-panel\n .jp-FormGroup-content\n fieldset\n .jp-inputFieldWrapper\n select {\n width: 100%;\n font-size: var(--jp-ui-font-size1);\n background: var(--jp-input-background);\n color: var(--jp-ui-font-color0);\n padding: calc(var(--jp-ui-font-size1) / 2);\n padding-right: var(--jp-ui-font-size3);\n background-image: url(${g});\n background-repeat: no-repeat;\n background-position: 99% center;\n background-size: 18px;\n border: var(--jp-border-width) solid var(--jp-input-border-color);\n border-radius: 0;\n outline: none;\n appearance: none;\n}\n\n.jGIS-property-panel .jp-select-wrapper select {\n background-image: unset !important;\n}\n\n.lm-TabBar-tabIcon .jgis-main-logo[fill] {\n fill: var(--jp-inverse-layout-color3);\n}\n\n.jGIS-identify-tool {\n cursor: crosshair;\n}\n\n.jgis-identify-grid-item {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: auto auto;\n position: relative;\n gap: 1px;\n}\n\n.jgis-identify-grid-item-header {\n display: flex;\n grid-column: span 2;\n font-weight: bold;\n font-size: var(--jp-ui-font-size1);\n padding: 2px 0;\n cursor: pointer;\n margin: 0 5px;\n line-height: 25px;\n}\n\n.jgis-identify-grid-item:not(:last-of-type)::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n width: 90%;\n border-bottom: 1px solid var(--jp-border-color0);\n}\n\n.jgis-identify-grid-body {\n display: contents;\n}\n\n.jgis-identify-grid-body span a:link {\n color: var(--jp-content-link-color);\n cursor: pointer;\n text-decoration: underline;\n}\n\n.jgis-identify-grid-body span a:visited {\n color: var(--jp-content-link-visited-color);\n cursor: pointer;\n text-decoration: underline;\n}\n\n.jgis-identify-grid-body strong {\n grid-column: 1;\n text-transform: capitalize;\n margin-left: 21px;\n}\n\n.jgis-identify-grid-body span {\n grid-column: 2;\n}\n\n.jgis-identify-grid-body:last-of-type strong:last-of-type {\n padding-bottom: 8px;\n}\n\n/* Style the file path text */\n.file-container {\n display: flex;\n align-items: center;\n margin-bottom: 16px;\n gap: 10px;\n}\n`,""]);const u=c},935:n=>{n.exports=function(n){var o=[];return o.toString=function(){return this.map((function(o){var e="",r=void 0!==o[5];return o[4]&&(e+="@supports (".concat(o[4],") {")),o[2]&&(e+="@media ".concat(o[2]," {")),r&&(e+="@layer".concat(o[5].length>0?" ".concat(o[5]):""," {")),e+=n(o),r&&(e+="}"),o[2]&&(e+="}"),o[4]&&(e+="}"),e})).join("")},o.i=function(n,e,r,t,i){"string"==typeof n&&(n=[[null,n,void 0]]);var a={};if(r)for(var l=0;l<this.length;l++){var p=this[l][0];null!=p&&(a[p]=!0)}for(var s=0;s<n.length;s++){var d=[].concat(n[s]);r&&a[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),e&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=e):d[2]=e),t&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=t):d[4]="".concat(t)),o.push(d))}},o}},62:n=>{n.exports=function(n,o){return o||(o={}),n?(n=String(n.__esModule?n.default:n),/^['"].*['"]$/.test(n)&&(n=n.slice(1,-1)),o.hash&&(n+=o.hash),/["'() \t\n]|(%20)/.test(n)||o.needQuotes?'"'.concat(n.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):n):n}},758:n=>{n.exports=function(n){return n[1]}},591:n=>{var o=[];function e(n){for(var e=-1,r=0;r<o.length;r++)if(o[r].identifier===n){e=r;break}return e}function r(n,r){for(var i={},a=[],l=0;l<n.length;l++){var p=n[l],s=r.base?p[0]+r.base:p[0],d=i[s]||0,c="".concat(s," ").concat(d);i[s]=d+1;var g=e(c),u={css:p[1],media:p[2],sourceMap:p[3],supports:p[4],layer:p[5]};if(-1!==g)o[g].references++,o[g].updater(u);else{var f=t(u,r);r.byIndex=l,o.splice(l,0,{identifier:c,updater:f,references:1})}a.push(c)}return a}function t(n,o){var e=o.domAPI(o);return e.update(n),function(o){if(o){if(o.css===n.css&&o.media===n.media&&o.sourceMap===n.sourceMap&&o.supports===n.supports&&o.layer===n.layer)return;e.update(n=o)}else e.remove()}}n.exports=function(n,t){var i=r(n=n||[],t=t||{});return function(n){n=n||[];for(var a=0;a<i.length;a++){var l=e(i[a]);o[l].references--}for(var p=r(n,t),s=0;s<i.length;s++){var d=e(i[s]);0===o[d].references&&(o[d].updater(),o.splice(d,1))}i=p}}},128:n=>{var o={};n.exports=function(n,e){var r=function(n){if(void 0===o[n]){var e=document.querySelector(n);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(n){e=null}o[n]=e}return o[n]}(n);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(e)}},51:n=>{n.exports=function(n){var o=document.createElement("style");return n.setAttributes(o,n.attributes),n.insert(o,n.options),o}},855:(n,o,e)=>{n.exports=function(n){var o=e.nc;o&&n.setAttribute("nonce",o)}},740:n=>{n.exports=function(n){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var o=n.insertStyleElement(n);return{update:function(e){!function(n,o,e){var r="";e.supports&&(r+="@supports (".concat(e.supports,") {")),e.media&&(r+="@media ".concat(e.media," {"));var t=void 0!==e.layer;t&&(r+="@layer".concat(e.layer.length>0?" ".concat(e.layer):""," {")),r+=e.css,t&&(r+="}"),e.media&&(r+="}"),e.supports&&(r+="}");var i=e.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),o.styleTagTransform(r,n,o.options)}(o,n,e)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(o)}}}},656:n=>{n.exports=function(n,o){if(o.styleSheet)o.styleSheet.cssText=n;else{for(;o.firstChild;)o.removeChild(o.firstChild);o.appendChild(document.createTextNode(n))}}},432:(n,o,e)=>{var r=e(591),t=e.n(r),i=e(740),a=e.n(i),l=e(128),p=e.n(l),s=e(855),d=e.n(s),c=e(51),g=e.n(c),u=e(656),f=e.n(u),b=e(296),m={};m.styleTagTransform=f(),m.setAttributes=d(),m.insert=p().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=g(),t()(b.A,m),b.A&&b.A.locals&&b.A.locals},248:n=>{n.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 viewBox=%270 0 20 20%27%3e %3cg class=%27jp-icon3%27 fill=%27%23616161%27 shape-rendering=%27geometricPrecision%27%3e %3cpolygon class=%27st1%27 points=%279.9%2c13.6 3.6%2c7.4 4.4%2c6.6 9.9%2c12.2 15.4%2c6.7 16.1%2c7.4 %27/%3e %3c/g%3e %3c/svg%3e"}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_jupytergis_jupytergis_lab=self.webpackChunk_jupytergis_jupytergis_lab||[]).push([[484],{484:(e,t,a)=>{a.r(t),a.d(t,{default:()=>v});var o=a(907),n=a(769),r=a(738),s=a(621),d=a(198),i=a(162),m=a(625),l=a(256),c=a(903),u=a(209),g=a(259),p=a(310),y=a(123),I=a(230),h=a(173);class M extends h.JupyterYModel{}class j extends l.Panel{constructor(e){super(),this._buildWidget=e=>{const{commands:t,model:a,externalCommands:n,tracker:r}=e,s=new o.JupyterGISPanel({model:a,commandRegistry:t});let d;a.filePath&&(d=new o.ToolbarWidget({commands:t,model:a,externalCommands:(null==n?void 0:n.getCommands())||[]})),this._jgisWidget=new o.JupyterGISOutputWidget({model:a,content:s,toolbar:d}),this.addWidget(this._jgisWidget),null==r||r.add(this._jgisWidget)};const{model:t}=e;this.addClass("jupytergis-notebook-widget"),this._buildWidget(e),t.sharedModel.changed.connect(((t,a)=>{a.stateChange&&a.stateChange.forEach((t=>{var a;"path"===t.name&&(null===(a=this.layout)||void 0===a||a.removeWidget(this._jgisWidget),this._jgisWidget.dispose(),this._buildWidget(e))}))}))}get jgisWidget(){return this._jgisWidget}}const b={id:"jupytergis:yjswidget-plugin",autoStart:!0,optional:[n.IJGISExternalCommandRegistryToken,n.IJupyterGISDocTracker,h.IJupyterYWidgetManager,c.ICollaborativeDrive],activate:(e,t,a,o,r)=>{o?o.registerWidget("@jupytergis:widget",class extends M{async initialize(t){const{path:a,format:o,contentType:s}=t,d=o;if(!r)throw(0,u.showErrorMessage)("Error using the JupyterGIS Python API","You cannot use the JupyterGIS Python API without a collaborative drive. You need to install a package providing collaboration features (e.g. jupyter-collaboration)."),new Error("Failed to create the YDoc without a collaborative drive");let i="";const m=e.shell.currentWidget;(m instanceof y.NotebookPanel||m instanceof g.ConsolePanel)&&(i=m.sessionContext.path);let l="";if(a){l=p.PathExt.join(p.PathExt.dirname(i),a);try{await e.serviceManager.contents.get(l)}catch(t){await e.serviceManager.contents.save(l,{content:btoa("{}"),format:"base64"})}}else l=p.PathExt.join(p.PathExt.dirname(i),"unsaved_project");const c=r.sharedModelFactory.createNew({path:l,format:d,contentType:s,collaborative:!0});this.jupyterGISModel=new n.JupyterGISModel({sharedModel:c}),this.jupyterGISModel.contentsManager=e.serviceManager.contents,this.jupyterGISModel.filePath=l,this.ydoc=this.jupyterGISModel.sharedModel.ydoc,this.sharedModel=new h.JupyterYDoc(t,this.ydoc)}},class{constructor(o,n){this.yModel=o,this.node=n;const r=new j({commands:e.commands,model:o.jupyterGISModel,externalCommands:t,tracker:a});this._jgisWidget=r.jgisWidget,I.MessageLoop.sendMessage(r,l.Widget.Msg.BeforeAttach),n.appendChild(r.node),I.MessageLoop.sendMessage(r,l.Widget.Msg.AfterAttach)}dispose(){this._jgisWidget.dispose()}}):console.error("Missing IJupyterYWidgetManager token!")}},C="jupytergis",v=[{id:"jupytergis:lab:main-menu",autoStart:!0,requires:[n.IJupyterGISDocTracker,n.IJGISFormSchemaRegistryToken,n.IJGISLayerBrowserRegistryToken,i.IStateDB],optional:[d.IMainMenu,m.ITranslator,s.ICompletionProviderManager],activate:(e,t,a,n,r,s,d,i)=>{console.log("jupytergis:lab:main-menu is activated!"),d=null!=d?d:m.nullTranslator;(0,o.createDefaultLayerRegistry)(n),o.GlobalStateDbManager.getInstance().initialize(r),(0,o.addCommands)(e,t,d,a,n,r,i),e.shell.addClass("data-jgis-keybinding");const c=new l.Menu({commands:e.commands});c.title.label=d.load("jupyterlab").__("Add Source"),c.id="jp-gis-contextmenu-addSource",e.contextMenu.addItem({type:"submenu",selector:".jp-gis-sourcePanel",rank:3,submenu:c}),c.addItem({command:o.CommandIDs.newRasterSource,args:{from:"contextMenu"}}),c.addItem({command:o.CommandIDs.newVectorSource,args:{from:"contextMenu"}}),c.addItem({command:o.CommandIDs.newGeoJSONSource,args:{from:"contextMenu"}}),c.addItem({command:o.CommandIDs.newRasterDemSource,args:{from:"contextMenu"}}),c.addItem({command:o.CommandIDs.newImageSource,args:{from:"contextMenu"}}),e.contextMenu.addItem({type:"separator",selector:".jp-gis-sourcePanel",rank:2}),e.contextMenu.addItem({selector:".jp-gis-source.jp-gis-sourceUnused",rank:1,command:o.CommandIDs.removeSource}),e.contextMenu.addItem({selector:".jp-gis-source",rank:1,command:o.CommandIDs.renameSource}),e.contextMenu.addItem({command:o.CommandIDs.symbology,selector:".jp-gis-layerItem",rank:1}),e.contextMenu.addItem({type:"separator",selector:".jp-gis-layerPanel",rank:1}),e.contextMenu.addItem({command:o.CommandIDs.removeLayer,selector:".jp-gis-layerItem",rank:2}),e.contextMenu.addItem({command:o.CommandIDs.renameLayer,selector:".jp-gis-layerItem",rank:2}),e.contextMenu.addItem({command:o.CommandIDs.zoomToLayer,selector:".jp-gis-layerItem",rank:2});const u=new l.Menu({commands:e.commands});u.title.label=d.load("jupyterlab").__("Move Selected Layers to Group"),u.id="jp-gis-contextmenu-movelayer",e.contextMenu.addItem({type:"submenu",selector:".jp-gis-layerItem",rank:2,submenu:u}),e.contextMenu.opened.connect((()=>function(e,t){var a,n,r,s;if(!(null===(a=t.currentWidget)||void 0===a?void 0:a.model))return;const d=null===(n=t.currentWidget)||void 0===n?void 0:n.model,i=null!==(s=null===(r=e.menu.items.find((e=>{var t;return"submenu"===e.type&&"jp-gis-contextmenu-movelayer"===(null===(t=e.submenu)||void 0===t?void 0:t.id)})))||void 0===r?void 0:r.submenu)&&void 0!==s?s:null;if(!i)return;i.clearItems();const m=function e(t){const a=[];for(const o of t)if("string"!=typeof o&&o.layers){a.push(o.name);const t=e(o.layers);a.push(...t)}return a}(d.getLayerTree());i.addItem({command:o.CommandIDs.moveLayersToGroup,args:{label:""}}),m.forEach((e=>{i.addItem({command:o.CommandIDs.moveLayersToGroup,args:{label:e}})})),i.addItem({command:o.CommandIDs.moveLayerToNewGroup})}(e.contextMenu,t))),e.contextMenu.addItem({command:o.CommandIDs.removeGroup,selector:".jp-gis-layerGroupHeader",rank:2}),e.contextMenu.addItem({command:o.CommandIDs.renameGroup,selector:".jp-gis-layerGroupHeader",rank:2}),e.contextMenu.addItem({type:"separator",selector:".jp-gis-layerPanel",rank:2});const g=new l.Menu({commands:e.commands});g.title.label=d.load("jupyterlab").__("Add Layer"),g.id="jp-gis-contextmenu-addLayer",e.contextMenu.addItem({type:"submenu",selector:".jp-gis-layerPanel",rank:3,submenu:g}),g.addItem({command:o.CommandIDs.newRasterLayer,args:{from:"contextMenu"}}),g.addItem({command:o.CommandIDs.newVectorLayer,args:{from:"contextMenu"}}),g.addItem({command:o.CommandIDs.newHillshadeLayer,args:{from:"contextMenu"}}),g.addItem({command:o.CommandIDs.newImageLayer,args:{from:"contextMenu"}}),g.addItem({command:o.CommandIDs.newHeatmapLayer,args:{from:"contextMenu"}}),s&&function(e,t){e.editMenu.undoers.redo.add({id:o.CommandIDs.redo,isEnabled:t}),e.editMenu.undoers.undo.add({id:o.CommandIDs.undo,isEnabled:t})}(s,(()=>null!==t.currentWidget&&t.currentWidget===e.shell.currentWidget))}},{id:"jupytergis:lab:controlpanel",autoStart:!0,requires:[r.ILayoutRestorer,n.IJupyterGISDocTracker,n.IJGISFormSchemaRegistryToken,i.IStateDB,n.IAnnotationToken],activate:(e,t,a,n,r,s)=>{const d=new o.ControlPanelModel({tracker:a}),i=new o.LeftPanelWidget({model:d,tracker:a,state:r,commands:e.commands});i.id="jupytergis::leftControlPanel",i.title.caption="JupyterGIS Control Panel",i.title.icon=o.logoMiniIcon;const m=new o.RightPanelWidget({model:d,tracker:a,formSchemaRegistry:n,annotationModel:s});m.id="jupytergis::rightControlPanel",m.title.caption="JupyterGIS Control Panel",m.title.icon=o.logoMiniIcon,t&&(t.add(i,C),t.add(m,C)),e.shell.add(i,"left",{rank:2e3}),e.shell.add(m,"right",{rank:2e3})}},b]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,n,a,o,i,u,l,s,f,d,p,c,h,v,g,
|
|
1
|
+
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,n,a,o,i,u,l,s,f,d,p,c,h,v,b,g,y,m,j,w,S,k={450:(e,r,t)=>{var n={"./index":()=>t.e(484).then((()=>()=>t(484))),"./extension":()=>t.e(484).then((()=>()=>t(484))),"./style":()=>t.e(432).then((()=>()=>t(432)))},a=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),o=(e,r)=>{if(t.S){var n="default",a=t.S[n];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>a,init:()=>o})}},E={};function P(e){var r=E[e];if(void 0!==r)return r.exports;var t=E[e]={id:e,exports:{}};return k[e](t,t.exports,P),t.exports}P.m=k,P.c=E,P.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return P.d(r,{a:r}),r},P.d=(e,r)=>{for(var t in r)P.o(r,t)&&!P.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},P.f={},P.e=e=>Promise.all(Object.keys(P.f).reduce(((r,t)=>(P.f[t](e,r),r)),[])),P.u=e=>e+"."+{234:"c2d7ed33ae9ca2244b0d",432:"d90a772f461ebee639dc",484:"425ad4b1d9e52a956ab4"}[e]+".js?v="+{234:"c2d7ed33ae9ca2244b0d",432:"d90a772f461ebee639dc",484:"425ad4b1d9e52a956ab4"}[e],P.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),P.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@jupytergis/jupytergis-lab:",P.l=(t,n,a,o)=>{if(e[t])e[t].push(n);else{var i,u;if(void 0!==a)for(var l=document.getElementsByTagName("script"),s=0;s<l.length;s++){var f=l[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+a){i=f;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,P.nc&&i.setAttribute("nonce",P.nc),i.setAttribute("data-webpack",r+a),i.src=t),e[t]=[n];var d=(r,n)=>{i.onerror=i.onload=null,clearTimeout(p);var a=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((e=>e(n))),r)return r(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),u&&document.head.appendChild(i)}},P.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{P.S={};var e={},r={};P.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];P.o(P.S,t)||(P.S[t]={});var o=P.S[t],i="@jupytergis/jupytergis-lab",u=(e,r,t,n)=>{var a=o[e]=o[e]||{},u=a[r];(!u||!u.loaded&&(!n!=!u.eager?n:i>u.from))&&(a[r]={get:t,from:i,eager:!!n})},l=[];return"default"===t&&(u("@jupyter/collaborative-drive","3.1.0",(()=>P.e(234).then((()=>()=>P(234))))),u("@jupytergis/jupytergis-lab","0.4.0",(()=>P.e(484).then((()=>()=>P(484)))))),e[t]=l.length?Promise.all(l).then((()=>e[t]=1)):1}}})(),(()=>{var e;P.g.importScripts&&(e=P.g.location+"");var r=P.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),P.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var a=e[n],o=(typeof a)[0];if(n>=r.length)return"u"==o;var i=r[n],u=(typeof i)[0];if(o!=u)return"o"==o&&"n"==u||"s"==u||"u"==o;if("o"!=o&&"u"!=o&&a!=i)return a<i;n++}},a=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,t+="u"==(typeof(u=e[o]))[0]?"-":(n>0?".":"")+(n=2,u);return t}var i=[];for(o=1;o<e.length;o++){var u=e[o];i.push(0===u?"not("+l()+")":1===u?"("+l()+" || "+l()+")":2===u?i.pop()+" "+i.pop():a(u))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},o=(e,r)=>{if(0 in e){r=t(r);var n=e[0],a=n<0;a&&(n=-n-1);for(var i=0,u=1,l=!0;;u++,i++){var s,f,d=u<e.length?(typeof e[u])[0]:"";if(i>=r.length||"o"==(f=(typeof(s=r[i]))[0]))return!l||("u"==d?u>n&&!a:""==d!=a);if("u"==f){if(!l||"u"!=d)return!1}else if(l)if(d==f)if(u<=n){if(s!=e[u])return!1}else{if(a?s>e[u]:s<e[u])return!1;s!=e[u]&&(l=!1)}else if("s"!=d&&"n"!=d){if(a||u<=n)return!1;l=!1,u--}else{if(u<=n||f<d!=a)return!1;l=!1}else"s"!=d&&"n"!=d&&(l=!1,u--)}}var p=[],c=p.pop.bind(p);for(i=1;i<e.length;i++){var h=e[i];p.push(1==h?c()|c():2==h?c()&c():h?o(h,r):!c())}return!!c()},i=(e,r)=>e&&P.o(e,r),u=e=>(e.loaded=1,e.get()),l=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),s=(e,r,t,a)=>{var i=a?l(e[r]):e[r];return(r=Object.keys(i).reduce(((e,r)=>!o(t,r)||e&&!n(e,r)?e:r),0))&&i[r]},f=(e,r,t)=>{var a=t?l(e[r]):e[r];return Object.keys(a).reduce(((e,r)=>!e||!a[e].loaded&&n(e,r)?r:e),0)},d=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+a(n)+")",p=(e,r,t,n,o)=>{var i=e[t];return"No satisfying version ("+a(n)+")"+(o?" for eager consumption":"")+" of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(i).map((e=>e+" from "+i[e].from)).join(", ")},c=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},b=(e,r,t)=>t?t():((e,r)=>c("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),g=(v=e=>function(r,t,n,a,o){var i=P.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,P.S[r],t,!1,a,o)):e(r,P.S[r],t,n,a,o)})(((e,r,t,n,a,o)=>{if(!i(r,t))return b(e,t,o);var l=s(r,t,a,n);return l?u(l):o?o():void c(p(r,e,t,a,n))})),y=v(((e,r,t,n,a,l)=>{if(!i(r,t))return b(e,t,l);var s=f(r,t,n);return o(a,s)||h(d(r,t,s,a)),u(r[t][s])})),m={},j={123:()=>y("default","@jupyterlab/notebook",!1,[1,4,3,5]),162:()=>y("default","@jupyterlab/statedb",!1,[1,4,3,5]),173:()=>y("default","yjs-widgets",!1,[2,0,4]),198:()=>y("default","@jupyterlab/mainmenu",!1,[1,4,3,5]),209:()=>y("default","@jupyterlab/apputils",!1,[1,4,4,5]),230:()=>y("default","@lumino/messaging",!1,[1,2,0,0]),256:()=>y("default","@lumino/widgets",!1,[1,2,3,1,,"alpha",0]),259:()=>y("default","@jupyterlab/console",!1,[1,4,3,5]),310:()=>y("default","@jupyterlab/coreutils",!1,[1,6,3,5]),621:()=>y("default","@jupyterlab/completer",!1,[1,4,3,5]),625:()=>y("default","@jupyterlab/translation",!1,[1,4,3,5]),738:()=>y("default","@jupyterlab/application",!1,[1,4,3,5]),769:()=>y("default","@jupytergis/schema",!1,[2,0,4,0]),903:()=>g("default","@jupyter/collaborative-drive",!1,[1,3,0,0],(()=>P.e(234).then((()=>()=>P(234))))),907:()=>y("default","@jupytergis/base",!1,[2,0,4,0]),262:()=>y("default","@lumino/coreutils",!1,[1,2,0,0])},w={234:[262],484:[123,162,173,198,209,230,256,259,310,621,625,738,769,903,907]},S={},P.f.consumes=(e,r)=>{P.o(w,e)&&w[e].forEach((e=>{if(P.o(m,e))return r.push(m[e]);if(!S[e]){var t=r=>{m[e]=0,P.m[e]=t=>{delete P.c[e],t.exports=r()}};S[e]=!0;var n=r=>{delete m[e],P.m[e]=t=>{throw delete P.c[e],r}};try{var a=j[e]();a.then?r.push(m[e]=a.then(t).catch(n)):t(a)}catch(e){n(e)}}}))},(()=>{P.b=document.baseURI||self.location.href;var e={738:0};P.f.j=(r,t)=>{var n=P.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else{var a=new Promise(((t,a)=>n=e[r]=[t,a]));t.push(n[2]=a);var o=P.p+P.u(r),i=new Error;P.l(o,(t=>{if(P.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[o,i,u]=t,l=0;if(o.some((r=>0!==e[r]))){for(n in i)P.o(i,n)&&(P.m[n]=i[n]);u&&u(P)}for(r&&r(t);l<o.length;l++)a=o[l],P.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=self.webpackChunk_jupytergis_jupytergis_lab=self.webpackChunk_jupytergis_jupytergis_lab||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),P.nc=void 0;var _=P(450);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["@jupytergis/jupytergis-lab"]=_})();
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"name": "@jupytergis/base",
|
|
11
|
-
"versionInfo": "0.
|
|
11
|
+
"versionInfo": "0.4.0",
|
|
12
12
|
"licenseId": "BSD-3-Clause",
|
|
13
13
|
"extractedText": ""
|
|
14
14
|
},
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"name": "ol",
|
|
23
|
-
"versionInfo": "10.
|
|
23
|
+
"versionInfo": "10.4.0",
|
|
24
24
|
"licenseId": "BSD-2-Clause",
|
|
25
25
|
"extractedText": "BSD 2-Clause License\n\nCopyright 2005-present, OpenLayers Contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
|
|
26
26
|
},
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
import logging
|
|
5
|
+
import os
|
|
5
6
|
from pathlib import Path
|
|
6
7
|
from typing import Any, Dict, List, Literal, Optional, Union
|
|
7
8
|
from uuid import uuid4
|
|
@@ -13,9 +14,11 @@ from ypywidgets.comm import CommWidget
|
|
|
13
14
|
from .objects import (
|
|
14
15
|
IGeoJSONSource,
|
|
15
16
|
IGeoTiffSource,
|
|
17
|
+
IHeatmapLayer,
|
|
16
18
|
IHillshadeLayer,
|
|
17
19
|
IImageLayer,
|
|
18
20
|
IImageSource,
|
|
21
|
+
IRasterDemSource,
|
|
19
22
|
IRasterLayer,
|
|
20
23
|
IRasterSource,
|
|
21
24
|
IVectorLayer,
|
|
@@ -26,7 +29,6 @@ from .objects import (
|
|
|
26
29
|
LayerType,
|
|
27
30
|
SourceType,
|
|
28
31
|
)
|
|
29
|
-
from .utils import get_source_layer_names, normalize_path
|
|
30
32
|
|
|
31
33
|
logger = logging.getLogger(__file__)
|
|
32
34
|
|
|
@@ -47,7 +49,7 @@ class GISDocument(CommWidget):
|
|
|
47
49
|
|
|
48
50
|
def __init__(
|
|
49
51
|
self,
|
|
50
|
-
path: Optional[str] = None,
|
|
52
|
+
path: Optional[str | Path] = None,
|
|
51
53
|
latitude: Optional[float] = None,
|
|
52
54
|
longitude: Optional[float] = None,
|
|
53
55
|
zoom: Optional[float] = None,
|
|
@@ -56,6 +58,9 @@ class GISDocument(CommWidget):
|
|
|
56
58
|
pitch: Optional[float] = None,
|
|
57
59
|
projection: Optional[str] = None,
|
|
58
60
|
):
|
|
61
|
+
if isinstance(path, Path):
|
|
62
|
+
path = str(path)
|
|
63
|
+
|
|
59
64
|
comm_metadata = GISDocument._path_to_comm(path)
|
|
60
65
|
|
|
61
66
|
ydoc = Doc()
|
|
@@ -101,10 +106,13 @@ class GISDocument(CommWidget):
|
|
|
101
106
|
"""
|
|
102
107
|
return self._layerTree.to_py()
|
|
103
108
|
|
|
104
|
-
def export_to_qgis(self, path: str) -> bool:
|
|
109
|
+
def export_to_qgis(self, path: str | Path) -> bool:
|
|
105
110
|
# Lazy import, jupytergis_qgis of qgis may not be installed
|
|
106
111
|
from jupytergis_qgis.qgis_loader import export_project_to_qgis
|
|
107
112
|
|
|
113
|
+
if isinstance(path, Path):
|
|
114
|
+
path = str(path)
|
|
115
|
+
|
|
108
116
|
virtual_file = {
|
|
109
117
|
"layers": self._layers.to_py(),
|
|
110
118
|
"sources": self._sources.to_py(),
|
|
@@ -158,7 +166,6 @@ class GISDocument(CommWidget):
|
|
|
158
166
|
self,
|
|
159
167
|
url: str,
|
|
160
168
|
name: str = "Vector Tile Layer",
|
|
161
|
-
source_layer: str | None = None,
|
|
162
169
|
attribution: str = "",
|
|
163
170
|
min_zoom: int = 0,
|
|
164
171
|
max_zoom: int = 24,
|
|
@@ -175,15 +182,9 @@ class GISDocument(CommWidget):
|
|
|
175
182
|
|
|
176
183
|
:param name: The name that will be used for the object in the document.
|
|
177
184
|
:param url: The tiles url.
|
|
178
|
-
:param source_layer: The source layer to use.
|
|
179
185
|
:param attribution: The attribution.
|
|
180
186
|
:param opacity: The opacity, between 0 and 1.
|
|
181
187
|
"""
|
|
182
|
-
source_layers = get_source_layer_names(url)
|
|
183
|
-
if source_layer is None and len(source_layers) == 1:
|
|
184
|
-
source_layer = source_layers[0]
|
|
185
|
-
if source_layer not in source_layers:
|
|
186
|
-
raise ValueError(f"source_layer should be one of {source_layers}")
|
|
187
188
|
|
|
188
189
|
source = {
|
|
189
190
|
"type": SourceType.VectorTileSource,
|
|
@@ -210,7 +211,6 @@ class GISDocument(CommWidget):
|
|
|
210
211
|
"source": source_id,
|
|
211
212
|
"type": type,
|
|
212
213
|
"opacity": opacity,
|
|
213
|
-
"sourceLayer": source_layer,
|
|
214
214
|
"color": color_expr,
|
|
215
215
|
"opacity": opacity,
|
|
216
216
|
},
|
|
@@ -226,7 +226,7 @@ class GISDocument(CommWidget):
|
|
|
226
226
|
|
|
227
227
|
def add_geojson_layer(
|
|
228
228
|
self,
|
|
229
|
-
path: str | None = None,
|
|
229
|
+
path: str | Path | None = None,
|
|
230
230
|
data: Dict | None = None,
|
|
231
231
|
name: str = "GeoJSON Layer",
|
|
232
232
|
type: "circle" | "fill" | "line" = "line",
|
|
@@ -248,6 +248,9 @@ class GISDocument(CommWidget):
|
|
|
248
248
|
:param opacity: The opacity, between 0 and 1.
|
|
249
249
|
:param color_expr: The style expression used to style the layer, defaults to None
|
|
250
250
|
"""
|
|
251
|
+
if isinstance(path, Path):
|
|
252
|
+
path = str(path)
|
|
253
|
+
|
|
251
254
|
if path is None and data is None:
|
|
252
255
|
raise ValueError("Cannot create a GeoJSON layer without data")
|
|
253
256
|
|
|
@@ -315,7 +318,7 @@ class GISDocument(CommWidget):
|
|
|
315
318
|
source = {
|
|
316
319
|
"type": SourceType.ImageSource,
|
|
317
320
|
"name": f"{name} Source",
|
|
318
|
-
"parameters": {"
|
|
321
|
+
"parameters": {"path": url, "coordinates": coordinates},
|
|
319
322
|
}
|
|
320
323
|
|
|
321
324
|
source_id = self._add_source(OBJECT_FACTORY.create_source(source, self))
|
|
@@ -414,6 +417,109 @@ class GISDocument(CommWidget):
|
|
|
414
417
|
|
|
415
418
|
return self._add_layer(OBJECT_FACTORY.create_layer(layer, self))
|
|
416
419
|
|
|
420
|
+
def add_hillshade_layer(
|
|
421
|
+
self,
|
|
422
|
+
url: str,
|
|
423
|
+
name: str = "Hillshade Layer",
|
|
424
|
+
urlParameters: Dict = {},
|
|
425
|
+
attribution: str = "",
|
|
426
|
+
):
|
|
427
|
+
"""
|
|
428
|
+
Add a hillshade layer
|
|
429
|
+
|
|
430
|
+
:param str url: URL of the hillshade layer
|
|
431
|
+
:param str name: The name that will be used for the object in the document, defaults to "Hillshade Layer"
|
|
432
|
+
:param attribution: The attribution.
|
|
433
|
+
"""
|
|
434
|
+
|
|
435
|
+
source = {
|
|
436
|
+
"type": SourceType.RasterDemSource,
|
|
437
|
+
"name": f"{name} Source",
|
|
438
|
+
"parameters": {
|
|
439
|
+
"url": url,
|
|
440
|
+
"attribution": attribution,
|
|
441
|
+
"urlParameters": urlParameters,
|
|
442
|
+
},
|
|
443
|
+
}
|
|
444
|
+
source_id = self._add_source(OBJECT_FACTORY.create_source(source, self))
|
|
445
|
+
|
|
446
|
+
layer = {
|
|
447
|
+
"type": LayerType.HillshadeLayer,
|
|
448
|
+
"name": name,
|
|
449
|
+
"visible": True,
|
|
450
|
+
"parameters": {"source": source_id},
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
return self._add_layer(OBJECT_FACTORY.create_layer(layer, self))
|
|
454
|
+
|
|
455
|
+
def add_heatmap_layer(
|
|
456
|
+
self,
|
|
457
|
+
feature: string,
|
|
458
|
+
path: str | Path | None = None,
|
|
459
|
+
data: Dict | None = None,
|
|
460
|
+
name: str = "Heatmap Layer",
|
|
461
|
+
opacity: float = 1,
|
|
462
|
+
blur: number = 15,
|
|
463
|
+
radius: number = 8,
|
|
464
|
+
gradient: List[str] = ["#00f", "#0ff", "#0f0", "#ff0", "#f00"],
|
|
465
|
+
):
|
|
466
|
+
"""
|
|
467
|
+
Add a Heatmap Layer to the document.
|
|
468
|
+
|
|
469
|
+
:param name: The name that will be used for the object in the document.
|
|
470
|
+
:param path: The path to the JSON file to embed into the jGIS file.
|
|
471
|
+
:param data: The raw GeoJSON data to embed into the jGIS file.
|
|
472
|
+
:param gradient: The color gradient to apply.
|
|
473
|
+
:param opacity: The opacity, between 0 and 1.
|
|
474
|
+
:param blur: The blur size in pixels
|
|
475
|
+
:param radius: The radius size in pixels
|
|
476
|
+
:param feature: The feature to use to heatmap weights
|
|
477
|
+
"""
|
|
478
|
+
if isinstance(path, Path):
|
|
479
|
+
path = str(path)
|
|
480
|
+
|
|
481
|
+
if path is None and data is None:
|
|
482
|
+
raise ValueError("Cannot create a GeoJSON source without data")
|
|
483
|
+
|
|
484
|
+
if path is not None and data is not None:
|
|
485
|
+
raise ValueError("Cannot set GeoJSON source data and path at the same time")
|
|
486
|
+
|
|
487
|
+
if path is not None:
|
|
488
|
+
# We cannot put the path to the file in the model
|
|
489
|
+
# We don't know where the kernel runs/live
|
|
490
|
+
# The front-end would have no way of finding the file reliably
|
|
491
|
+
# TODO Support urls to JSON files, in that case, don't embed the data
|
|
492
|
+
with open(path, "r") as fobj:
|
|
493
|
+
parameters = {"data": json.loads(fobj.read())}
|
|
494
|
+
|
|
495
|
+
if data is not None:
|
|
496
|
+
parameters = {"data": data}
|
|
497
|
+
|
|
498
|
+
source = {
|
|
499
|
+
"type": SourceType.GeoJSONSource,
|
|
500
|
+
"name": f"{name} Source",
|
|
501
|
+
"parameters": parameters,
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
source_id = self._add_source(OBJECT_FACTORY.create_source(source, self))
|
|
505
|
+
|
|
506
|
+
layer = {
|
|
507
|
+
"type": LayerType.HeatmapLayer,
|
|
508
|
+
"name": name,
|
|
509
|
+
"visible": True,
|
|
510
|
+
"parameters": {
|
|
511
|
+
"source": source_id,
|
|
512
|
+
"type": type,
|
|
513
|
+
"color": gradient,
|
|
514
|
+
"opacity": opacity,
|
|
515
|
+
"blur": blur,
|
|
516
|
+
"radius": radius,
|
|
517
|
+
"feature": feature,
|
|
518
|
+
},
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
return self._add_layer(OBJECT_FACTORY.create_layer(layer, self))
|
|
522
|
+
|
|
417
523
|
def create_color_expr(
|
|
418
524
|
self,
|
|
419
525
|
color_stops: Dict,
|
|
@@ -596,7 +702,7 @@ class GISDocument(CommWidget):
|
|
|
596
702
|
contentType = None
|
|
597
703
|
|
|
598
704
|
if filePath is not None:
|
|
599
|
-
path =
|
|
705
|
+
path = filePath
|
|
600
706
|
file_name = Path(path).name
|
|
601
707
|
try:
|
|
602
708
|
ext = file_name.split(".")[1].lower()
|
|
@@ -614,7 +720,7 @@ class GISDocument(CommWidget):
|
|
|
614
720
|
else:
|
|
615
721
|
raise ValueError("File extension is not supported!")
|
|
616
722
|
return dict(
|
|
617
|
-
path=path, format=format, contentType=contentType,
|
|
723
|
+
path=path, format=format, contentType=contentType, create_ydoc=path is None
|
|
618
724
|
)
|
|
619
725
|
|
|
620
726
|
|
|
@@ -633,6 +739,7 @@ class JGISLayer(BaseModel):
|
|
|
633
739
|
IHillshadeLayer,
|
|
634
740
|
IImageLayer,
|
|
635
741
|
IWebGlLayer,
|
|
742
|
+
IHeatmapLayer,
|
|
636
743
|
]
|
|
637
744
|
_parent = Optional[GISDocument]
|
|
638
745
|
|
|
@@ -655,6 +762,7 @@ class JGISSource(BaseModel):
|
|
|
655
762
|
IImageSource,
|
|
656
763
|
IVideoSource,
|
|
657
764
|
IGeoTiffSource,
|
|
765
|
+
IRasterDemSource,
|
|
658
766
|
]
|
|
659
767
|
_parent = Optional[GISDocument]
|
|
660
768
|
|
|
@@ -733,6 +841,7 @@ OBJECT_FACTORY.register_factory(LayerType.VectorTileLayer, IVectorTileLayer)
|
|
|
733
841
|
OBJECT_FACTORY.register_factory(LayerType.HillshadeLayer, IHillshadeLayer)
|
|
734
842
|
OBJECT_FACTORY.register_factory(LayerType.WebGlLayer, IWebGlLayer)
|
|
735
843
|
OBJECT_FACTORY.register_factory(LayerType.ImageLayer, IImageLayer)
|
|
844
|
+
OBJECT_FACTORY.register_factory(LayerType.HeatmapLayer, IHeatmapLayer)
|
|
736
845
|
|
|
737
846
|
OBJECT_FACTORY.register_factory(SourceType.VectorTileSource, IVectorTileSource)
|
|
738
847
|
OBJECT_FACTORY.register_factory(SourceType.RasterSource, IRasterSource)
|
|
@@ -740,3 +849,4 @@ OBJECT_FACTORY.register_factory(SourceType.GeoJSONSource, IGeoJSONSource)
|
|
|
740
849
|
OBJECT_FACTORY.register_factory(SourceType.ImageSource, IImageSource)
|
|
741
850
|
OBJECT_FACTORY.register_factory(SourceType.VideoSource, IVideoSource)
|
|
742
851
|
OBJECT_FACTORY.register_factory(SourceType.GeoTiffSource, IGeoTiffSource)
|
|
852
|
+
OBJECT_FACTORY.register_factory(SourceType.RasterDemSource, IRasterDemSource)
|
|
@@ -6,6 +6,7 @@ from ._schema.vectorTileLayer import IVectorTileLayer # noqa
|
|
|
6
6
|
from ._schema.hillshadeLayer import IHillshadeLayer # noqa
|
|
7
7
|
from ._schema.imageLayer import IImageLayer # noqa
|
|
8
8
|
from ._schema.webGlLayer import IWebGlLayer # noqa
|
|
9
|
+
from ._schema.heatmapLayer import IHeatmapLayer # noqa
|
|
9
10
|
|
|
10
11
|
from ._schema.vectortilesource import IVectorTileSource # noqa
|
|
11
12
|
from ._schema.rastersource import IRasterSource # noqa
|
|
@@ -13,3 +14,4 @@ from ._schema.geojsonsource import IGeoJSONSource # noqa
|
|
|
13
14
|
from ._schema.videoSource import IVideoSource # noqa
|
|
14
15
|
from ._schema.imageSource import IImageSource # noqa
|
|
15
16
|
from ._schema.geoTiffSource import IGeoTiffSource # noqa
|
|
17
|
+
from ._schema.rasterDemSource import IRasterDemSource # noqa
|