|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 | 4 | "cell_type": "code",
|
5 |
| - "execution_count": null, |
| 5 | + "execution_count": 1, |
6 | 6 | "id": "6bb0dd68-f96d-45c5-b3de-48c2092f2690",
|
7 | 7 | "metadata": {},
|
8 | 8 | "outputs": [],
|
9 | 9 | "source": [
|
10 | 10 | "from ipyleaflet import *\n",
|
11 |
| - "from ipyleaflet.geoportal import GeoportalWMTS, GeoportalLayerSwitcher, GeoportalSearchEngine\n", |
| 11 | + "from ipyleaflet.geoportal import GeoportalWMTS, GeoportalLayerSwitcher, GeoportalSearchEngine, GeoportalRoute" |
| 12 | + ] |
| 13 | + }, |
| 14 | + { |
| 15 | + "cell_type": "code", |
| 16 | + "execution_count": 3, |
| 17 | + "id": "fdeacb8e-3113-453d-ab63-a5ab639bf0c8", |
| 18 | + "metadata": {}, |
| 19 | + "outputs": [ |
| 20 | + { |
| 21 | + "data": { |
| 22 | + "application/vnd.jupyter.widget-view+json": { |
| 23 | + "model_id": "95aeab83e1fe49fc87dcae3e3c80b6a9", |
| 24 | + "version_major": 2, |
| 25 | + "version_minor": 0 |
| 26 | + }, |
| 27 | + "text/plain": [ |
| 28 | + "Map(center=[44.799999, 2.26667], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', '…" |
| 29 | + ] |
| 30 | + }, |
| 31 | + "metadata": {}, |
| 32 | + "output_type": "display_data" |
| 33 | + } |
| 34 | + ], |
| 35 | + "source": [ |
| 36 | + "#Route for itinerary calculation\n", |
| 37 | + "layer = GeoportalWMTS(layer = 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2', api_key = 'cartes', format = 'image/png')\n", |
12 | 38 | "m = Map(center=(44.799999, 2.26667), zoom=10, zoom_control=True)\n",
|
| 39 | + "m.add(layer)\n", |
| 40 | + "route_control = GeoportalRoute()\n", |
| 41 | + "m.add(route_control)" |
| 42 | + ] |
| 43 | + }, |
| 44 | + { |
| 45 | + "cell_type": "code", |
| 46 | + "execution_count": 8, |
| 47 | + "id": "3a686d99-c3ca-4596-81aa-24442564bea2", |
| 48 | + "metadata": {}, |
| 49 | + "outputs": [ |
| 50 | + { |
| 51 | + "data": { |
| 52 | + "application/vnd.jupyter.widget-view+json": { |
| 53 | + "model_id": "6111476c55a64564b77ba196455b171c", |
| 54 | + "version_major": 2, |
| 55 | + "version_minor": 0 |
| 56 | + }, |
| 57 | + "text/plain": [ |
| 58 | + "Map(center=[44.799999, 2.26667], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', '…" |
| 59 | + ] |
| 60 | + }, |
| 61 | + "metadata": {}, |
| 62 | + "output_type": "display_data" |
| 63 | + } |
| 64 | + ], |
| 65 | + "source": [ |
| 66 | + "#LayerSwitcher\n", |
| 67 | + "m1 = Map(center=(44.799999, 2.26667), zoom=10, zoom_control=True)\n", |
13 | 68 | "layer1 = GeoportalWMTS() #default\n",
|
14 |
| - "layer2 = GeoportalWMTS(layer = 'ELEVATION.SLOPE')\n", |
15 |
| - "m.add(layer1)\n", |
16 |
| - "m.add(layer2)\n", |
| 69 | + "layer2 = GeoportalWMTS(layer = 'ELEVATION.SLOPES', api_key = 'altimetrie')\n", |
| 70 | + "layer3 = GeoportalWMTS(layer = 'HYDROGRAPHY.BCAE.LATEST', api_key = 'agriculture', format = 'image/png')\n", |
| 71 | + "layer4 = GeoportalWMTS(layer = 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2', api_key = 'cartes', format = 'image/png')\n", |
| 72 | + "m1.add(layer1)\n", |
| 73 | + "m1.add(layer2)\n", |
| 74 | + "m1.add(layer3)\n", |
| 75 | + "m1.add(layer4)\n", |
17 | 76 | "layer_control = GeoportalLayerSwitcher()\n",
|
18 |
| - "search_control = GeoportalSearchEngine()\n", |
19 |
| - "m.add(layer_control)\n", |
20 |
| - "m.add(search_control)" |
| 77 | + "m1.add(layer_control)" |
21 | 78 | ]
|
22 | 79 | },
|
23 | 80 | {
|
|
45 | 102 | "name": "python",
|
46 | 103 | "nbconvert_exporter": "python",
|
47 | 104 | "pygments_lexer": "ipython3",
|
48 |
| - "version": "3.10.5" |
| 105 | + "version": "3.9.12" |
49 | 106 | }
|
50 | 107 | },
|
51 | 108 | "nbformat": 4,
|
|
0 commit comments