diff --git a/XYZHubConnector/xyz_qgis/gui/ui/tab_dialog.ui b/XYZHubConnector/xyz_qgis/gui/ui/tab_dialog.ui
index 220167b..cb12556 100644
--- a/XYZHubConnector/xyz_qgis/gui/ui/tab_dialog.ui
+++ b/XYZHubConnector/xyz_qgis/gui/ui/tab_dialog.ui
@@ -663,6 +663,22 @@
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Context
+
+
+
+ -
+
+
@@ -1109,6 +1125,7 @@
lineEdit_limit
lineEdit_max_feat
comboBox_similarity_threshold
+ comboBox_context
radioButton_loading_live
radioButton_loading_tile
radioButton_loading_single
diff --git a/XYZHubConnector/xyz_qgis/gui/ux/connect_ux.py b/XYZHubConnector/xyz_qgis/gui/ux/connect_ux.py
index f03c42d..6210bd9 100644
--- a/XYZHubConnector/xyz_qgis/gui/ux/connect_ux.py
+++ b/XYZHubConnector/xyz_qgis/gui/ux/connect_ux.py
@@ -42,6 +42,7 @@ def __init__(self, *a):
self.lineEdit_tags = None
self.comboBox_similarity_threshold = None
self.filter_dialog = None
+ self.comboBox_context = None
def config(self, *a):
# super().config(*a)
@@ -115,6 +116,14 @@ def config(self, *a):
self.lineEdit_selection.setToolTip("Load only the selected properties of features")
self.btn_filter.setToolTip("Query features by property")
+ for text, data in [
+ ("default", "default"),
+ ("extension", "extension"),
+ ("super", "super"),
+ ]:
+ self.comboBox_context.addItem(text, data)
+ self.comboBox_context.setCurrentIndex(0)
+
def _get_loading_mode(self) -> str:
for mode, box in zip(
LOADING_MODES,
@@ -144,6 +153,7 @@ def get_params(self):
"loading_mode",
"selection",
"filters",
+ "context",
]
val = [
strip_list_string(self.lineEdit_tags.text().strip()),
@@ -154,8 +164,9 @@ def get_params(self):
self._get_loading_mode(),
strip_list_string(self.lineEdit_selection.text().strip()),
self._get_filters(),
+ self.comboBox_context.currentData(),
]
- fn = [str, int, int, int, str, str, str, list]
+ fn = [str, int, int, int, str, str, str, list, str]
return dict(
(k, f(v)) for k, v, f in zip(key, val, fn) if v is not None and len(str(v)) > 0
)
diff --git a/XYZHubConnector/xyz_qgis/loader/layer_loader.py b/XYZHubConnector/xyz_qgis/loader/layer_loader.py
index a305e58..a80dc4b 100644
--- a/XYZHubConnector/xyz_qgis/loader/layer_loader.py
+++ b/XYZHubConnector/xyz_qgis/loader/layer_loader.py
@@ -76,7 +76,7 @@ def __init__(self, network: NetManager, layer: XYZLayer = None, n_parallel=1):
self.n_parallel = 1
self.status = self.LOADING
- self.fixed_keys = ["tags", "filters", "selection"]
+ self.fixed_keys = ["tags", "filters", "selection", "context"]
self.layer = layer
self.max_feat: int = None
self.kw: dict = None
@@ -314,7 +314,7 @@ def show_info_msg(self, msg, dt=1):
class TileLayerLoader(LoadLayerController):
def __init__(self, network: NetManager, *a, layer: XYZLayer = None, **kw):
super().__init__(network, *a, **kw)
- self.fixed_keys = ["tags", "limit", "tile_schema", "filters", "selection"]
+ self.fixed_keys = ["tags", "limit", "tile_schema", "filters", "selection", "context"]
self.params_queue = queue.SimpleQueue(key="tile_id") # dont have retry logic
self.layer = layer
self.total_params = 0