Add controls for different WMS sources

33 views
Skip to first unread message

kletter man

unread,
Nov 17, 2016, 6:02:28 AM11/17/16
to Leaflet
Dear all,

first of all, I would like to say hello and thank you all for the great support in this forum.

I'm a scientist working mainly with large hydrological datasets. This data is usually stored as NetCDF-files, which are made public through a THREDDS-server. I can send WMS-requests to this server
in order to create some layers in Leaflet, which works great so far. However, I would like to include multiple datasets and each of these datasets containts different variables (i.e. layers). Currently, the leaflet.wms
plugin allows to add different sources, which can be selected throuh a simple L.control.layers. Like I said, this works great for a single dataset. But now, I am thinking of something like a two-step control. Thus,
in a first step, I would like to select the dataset (i.e. WMS-source) and in a second step the variable of this dataset, which should be displayed on the Leaflet-map. I've seen the Leaflet.AutoLayers-plugin, which
seems to do something quite similar, but I do not know if the plugin would be the right choice.

In fact, I'm looking for a plugion/function/... which adds the following controls to Leaflet:
1. Choose dataset:
- Set 1
- Set 2
- ....

2. Select variable
- Var 1 from selected dataset
- Var 2 from selected dataset
- ...

Currently, all datasets contain the same variables, i.e. it would be sufficcient to just select different WMS-sources (URLs) with the first selection, which will then passed to the L.WMS.source-call (or a different
function). However, in the end, I would like to add a dynamical selection which first seeks through a dataset and then adds the included varbles to the second selection.

Do you know any plugin/function/code which could do something like that? If not, do you have any idea how such a feature could be added?

Best regards and many many thanks in advance,
Christof


Reply all
Reply to author
Forward
0 new messages