Skip to content

Commit 7b899f0

Browse files
Change apiKey to api_key for the Python side, change layer_name to layer.
1 parent ecbd305 commit 7b899f0

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

examples/Geoportal.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"outputs": [],
3838
"source": [
3939
"m2 = Map(center=(44.400002, 3.36667), zoom=8, zoom_control=True)\n",
40-
"layer2 = GeoportalWMTS(layer_name = 'ELEVATION.SLOPES', apiKey = 'altimetrie')\n",
40+
"layer2 = GeoportalWMTS(layer = 'ELEVATION.SLOPES', api_key = 'altimetrie')\n",
4141
"m2.add(layer2)"
4242
]
4343
},
@@ -49,14 +49,14 @@
4949
"outputs": [],
5050
"source": [
5151
"m3 = Map(center=(48.799999, 2.26667), zoom=10, zoom_control=True)\n",
52-
"layer3 = GeoportalWMTS(layer_name = 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2', apiKey = 'cartes')\n",
52+
"layer3 = GeoportalWMTS(layer = 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2', api_key = 'cartes')\n",
5353
"m3.add(layer3)"
5454
]
5555
},
5656
{
5757
"cell_type": "code",
5858
"execution_count": null,
59-
"id": "24a0dda1-4d07-437e-9c39-396176d5fa53",
59+
"id": "54d2e006-a2f3-406b-9bb0-c1d7cb6b250e",
6060
"metadata": {},
6161
"outputs": [],
6262
"source": []

ipyleaflet/geoportal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ class GeoportalWMTS(TileLayer):
1515
----------
1616
layer_name: string, default "ORTHOIMAGERY.ORTHOPHOTOS"
1717
name of the layer to show.
18-
apiKey: string, default "essentiels"
18+
api_key: string, default "essentiels"
1919
key to access a given ressource, detailed correspondances are given here : https://geoservices.ign.fr/documentation/services/tableau_ressources
2020
"""
2121

2222
_view_name = Unicode('LeafletGeoportalWMTSView').tag(sync=True)
2323
_model_name = Unicode('LeafletGeoportalWMTSModel').tag(sync=True)
24-
layer_name = Unicode("ORTHOIMAGERY.ORTHOPHOTOS").tag(sync=True, o=True)
25-
apiKey = Unicode("essentiels").tag(sync=True, o=True)
24+
layer = Unicode("ORTHOIMAGERY.ORTHOPHOTOS").tag(sync=True, o=True)
25+
api_key = Unicode("essentiels").tag(sync=True, o=True)

js/src/layers/Geoportal.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ export class LeafletGeoportalWMTSModel extends layer.LeafletTileLayerModel {
1111
...super.defaults(),
1212
_view_name: 'LeafletGeoportalWMTSView',
1313
_model_name: 'LeafletGeoportalWMTSModel',
14-
layer_name : "ORTHOIMAGERY.ORTHOPHOTOS",
14+
layer : "ORTHOIMAGERY.ORTHOPHOTOS",
1515
apiKey : "essentiels"
1616
};
1717
}
1818
}
1919

2020
export class LeafletGeoportalWMTSView extends layer.LeafletTileLayerView {
2121
create_obj() {
22-
this.obj = L.geoportalLayer.WMTS({layer : this.model.get('layer_name'), apiKey : this.model.get('apiKey')})
22+
this.obj = L.geoportalLayer.WMTS({layer : this.model.get('layer'), apiKey : this.model.get('api_key')})
2323
}
2424
}
25-

0 commit comments

Comments
 (0)