aparshin / leaflet-boundary-canvas

Leaflet plugin to draw raster layers with arbitrary boundary
MIT License
170 stars 41 forks source link

Using with other basemaps #6

Closed alexcroox closed 9 years ago

alexcroox commented 9 years ago

I use StamenTileLayer and to use this I init:

baseLayer = new L.StamenTileLayer("toner", {
    bounds: ukBounds
});
map.addLayer(baseLayer);

Which uses the Stamen js, I don't have a normal tile URL. Is it still possible to apply boundary canvas to this layer?

aparshin commented 9 years ago

In general case it is not possible, but I can try to make some kind of proxy for simple cases, such as StamenTileLayer. I'll do it in a few days...

aparshin commented 9 years ago

I've added new helper function createFromLayer (see readme) and new example.

Looks like it works fine with Stamen layes!

alexcroox commented 9 years ago

You are an amazing human being. Thank you!