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

External style reference? #226

Open
jakelund opened this issue Mar 29, 2016 · 4 comments
Open

External style reference? #226

jakelund opened this issue Mar 29, 2016 · 4 comments

Comments

@jakelund
Copy link

Is it possible to add an external style reference (.sld file) in options for init: "L.TileLayer.WMS"?

@johanlahti
Copy link
Contributor

I haven't tried it myself, but isn't it possible to use this option: http://leafletjs.com/reference.html#tilelayer-wms-styles?
If possible, then you can just add it as an option to the L.TileLayer.WMS in the smap-responsive config file. If not, we have to implement this by adding the parameter to the URL ourselves before the request happens.

@johanlahti
Copy link
Contributor

It should be possible to use the option sld: "http://link-to-my-sld/style.sld" or sld_body: "<xml… />"

Please share your tips/issues if you find out something more about it.

@jakelund
Copy link
Author

Seems anything i define with "styles" or "sld" doesn't get included in the wms request. Seems some tweaking to the request is necessary.

johanlahti added a commit that referenced this issue Mar 29, 2016
Include `sld` and `sld_body` in the request if given as options
@johanlahti
Copy link
Contributor

I didn't notice I was trying this out using our custom layer implemention L.NonTiledLayer.WMS were it works (at least the request works correctly). I have just now committed a change to include sld and sld_body if provided in the options of L.TileLayer.WMS also. Please update your code and try again.

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