Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getCapabilitiesLayerName Not Working #193

Open
bambryan opened this issue May 8, 2020 · 2 comments
Open

getCapabilitiesLayerName Not Working #193

bambryan opened this issue May 8, 2020 · 2 comments

Comments

@bambryan
Copy link

bambryan commented May 8, 2020

I am trying to use time dimension to load a WMS layer with multiple layers (layers: 'World:layer1,World:layer2,World:layer3,World:layer4') in one request. The problem is the time dimension isn't working cause of the multiple layers so I tried to use getCapabilitiesLayerName: World:layer1 and pull the time from that one layer but it's not working. I have searched through the code and doesn't seem like it is implemented anymore. I don't see anywhere where the alternate layer name variable is used beyond the pull from the declaration.

@r1m
Copy link
Contributor

r1m commented May 13, 2020

Can you describe your problem, with a reproductible code snippet ?

If you use L.TileLayer.WMS, the timedimension layer will use exactly the same parameters than the template layer (layers, bbox, styles,...). It will only add a time parameter to the queries.

Available times are computed based on a GetCapabilities request. Did you check the result of this request with layers=World:layer1,World:layer2,... ?

If you want the code that create a new timed version of the layer : see _createLayerForTime

The method you want to look for may be _getTimesFromLayerCapabilities

@bambryan
Copy link
Author

The GetCapabilities shows both layers having a time parameter. If I do them individually it works just fine. I thought I could just use the alternate layer name variable to tell the script to just grab one of the layers for time dimension like I did with the alternate url but again it doesn't look like that variable is used or can be used at all.

var radarWMS = L.tileLayer.wms(gwcUrl, {
layers: 'World:rain,World:snow',
transparent: true,
opacity: 0.8
});

var radarTD = L.timeDimension.layer.wms(radarWMS, {
getCapabilitiesUrl: wmsUrl,
getCapabilitiesLayerName: 'World:rain',
proxy: proxy,
wmsVersion: '1.3.0'
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants