From 37917445967412864b736a676c7ec4de0c6a4899 Mon Sep 17 00:00:00 2001 From: Florence Haudin Date: Wed, 14 Sep 2022 16:39:36 +0200 Subject: [PATCH] Update options of various controls. --- examples/GeoportalControls.ipynb | 30 +++------------------------- ipyleaflet/geoportal.py | 10 +--------- js/src/controls/GeoportalControls.js | 2 +- 3 files changed, 5 insertions(+), 37 deletions(-) diff --git a/examples/GeoportalControls.ipynb b/examples/GeoportalControls.ipynb index f76fd5595..ede5248af 100644 --- a/examples/GeoportalControls.ipynb +++ b/examples/GeoportalControls.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "6bb0dd68-f96d-45c5-b3de-48c2092f2690", "metadata": {}, "outputs": [], @@ -28,26 +28,10 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "3a686d99-c3ca-4596-81aa-24442564bea2", "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "47bf5fd8b8aa413fb0eacad5627beee6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Map(center=[44.799999, 2.26667], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', '…" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "#LayerSwitcher control\n", "m1 = Map(center=(44.799999, 2.26667), zoom=10, zoom_control=True)\n", @@ -111,14 +95,6 @@ "isocurve_control = GeoportalIsocurve()\n", "m5.add(isocurve_control)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "b6ca529f-62dd-4464-ba19-e2f4b5b15df5", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/ipyleaflet/geoportal.py b/ipyleaflet/geoportal.py index f74d8eb2b..8c08d2c21 100644 --- a/ipyleaflet/geoportal.py +++ b/ipyleaflet/geoportal.py @@ -36,17 +36,9 @@ class GeoportalLayerSwitcher(Control): _view_name = Unicode("LeafletGeoportalLayerSwitcherView").tag(sync=True) _model_name = Unicode("LeafletGeoportalLayerSwitcherModel").tag(sync=True) - position = Unicode("bottomleft").tag(sync=True, o=True) + position = Unicode("topright").tag(sync=True, o=True) collapsed = Bool(False).tag(sync=True, o=True) layers = List([]).tag(sync=True, o=True) - layer = Instance(TileLayer).tag(sync=True, o=True) - display = Bool(True).tag(sync=True, o=True) - config = Any().tag(sync=True, o=True) - visibility = Unicode("").tag(sync=True, o=True) - title = Unicode("").tag(sync=True, o=True) - description = Unicode("").tag(sync=True, o=True) - quicklook_url = Unicode("").tag(sync=True, o=True) - legends = List([]).tag(sync=True, o=True) class GeoportalSearchEngine(Control): diff --git a/js/src/controls/GeoportalControls.js b/js/src/controls/GeoportalControls.js index 40207e31a..3959702ae 100644 --- a/js/src/controls/GeoportalControls.js +++ b/js/src/controls/GeoportalControls.js @@ -11,7 +11,7 @@ export class LeafletGeoportalLayerSwitcherModel extends control.LeafletControlMo ...super.defaults(), _view_name: 'LeafletGeoportalLayerSwitcherView', _model_name: 'LeafletGeoportalLayerSwitcherModel', - position : "bottomleft", + position : "topright", collapsed : false, layers : [] };