-
Notifications
You must be signed in to change notification settings - Fork 51
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
Added TileLayer.WMS feature #409
base: master
Are you sure you want to change the base?
Conversation
Wow, thanks! This has just recently been under discussion with some users on our tech support. We'll try to review this and merge it sooner than later. It looks like you've provided an example WMS URL in your PR, so hopefully that will let us see this in action. I feel like "options" is so generalized that it's hard to see how we'd work this into the "user-friendly" authoring interface, but even if this is something just for more expert users, it's a win... |
The only issue with this is that the mini-map navigation element looks really terrible in some circumstances where the WMS provides a strange rendering at the zoom level used by the mini-map. I'd like to try and add an additional option in the storymap options object that would pull in a basic map from OSM or something like that. Glad that this is useful! Thanks Joe! |
I am trying to clean up old contributions that we never got around to merging. There have been some significant structural changes since this was originally submitted. I don't really know anything about WMS layer functionality, but based on the discussion, this seems like a useful contribution? This PR has since fallen into conflict, so I'm wondering if this is still applicable functionality and if it would be too much trouble to ask for a rebase and general review of the functionality so we can move this forward? |
I'm developing an application that uses StoryMapJS, but needed to also have access to the Leaflet WMS Layer functionality to generate custom StoryMapJS basemaps, so I extended the library to include a wms map type.
The changes I made aren't complex, and are as follows:
To use this feature:
During preparation of the JSON data object describing map configuration and slides, one would simply indicate map_type as a top-level field, as usual, but prepend the service URL with wms: . For example, this is a successful wms map_type value:
"map_type":"wms:https://nfi.nfis.org/mapserver/cgi-bin/nfis-kNN.cgi?"
To provide the wms options object to the service call, one would also indicate wms_options as a top level field. The value of this shall be formatted as per leaflet documentation. For example, the following is a successful wms_options object:
"wms_options" : { "layers":"kNN_DominantGenus_250m", "format":"image/png", "transparent":true}
I hope this is something that could be of use to the library, I am planning to include more leaflet features that would allow layer and base-map switching, and would love to contribute back to StoryMap anything successful I come up with!
Thanks for doing all the work needed to develop this library; it is a great resource and alternative to commercial story map software.