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

Add support for WMS TileLayer #5

Merged
merged 1 commit into from
Feb 21, 2018
Merged

Add support for WMS TileLayer #5

merged 1 commit into from
Feb 21, 2018

Conversation

mhasbie
Copy link
Contributor

@mhasbie mhasbie commented Feb 20, 2018

@jieter
Copy link
Owner

jieter commented Feb 20, 2018

Hi @mhasbie, thanks opening a PR. Are you sure this is a problem?
I think this line is not necessary as L.TileLayer.WMS extends from L.TileLayer and the implementation of the actual cloning is equal for both L.TileLayer and L.TileLayer.WMS.

Or did you experience problems using leaflet-clonelayer with L.TileLayer.WMS? If so, can you share a jsfiddle or something like that?

@mhasbie
Copy link
Contributor Author

mhasbie commented Feb 21, 2018

@jieter, yes i can confirm this. A WMS tile layer needs to be instantiated using L.tileLayer.wms since WMS service url are constructed differently than of Tile Layer.

The following fiddles demonstrates this. I'm using react-leaflet-magnifying-glass and leaflet-clonelayer to clone the layers to the magnifying glass layer instance.

JSFiddles:
With WMS Tile Layer support - this works. All base layers are cloned to the magnifying glass.

Without WMS Tile Layer support - this doesn't work. the wms base layer are not cloned to the magnifying glass. Other Tile layers still works.

Thanks!

@jieter
Copy link
Owner

jieter commented Feb 21, 2018

You are right off course, it needs to be called with the correct constructor.

@jieter jieter merged commit a150057 into jieter:master Feb 21, 2018
@jieter
Copy link
Owner

jieter commented Feb 21, 2018

Merged, thanks

@mhasbie mhasbie deleted the patch-1 branch February 21, 2018 09:04
@jieter
Copy link
Owner

jieter commented Feb 21, 2018

released leaflet-clonelayer@1.0.5

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

Successfully merging this pull request may close these issues.

2 participants