Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @panzhiyue/leaflet-imagemask with all npm packages installed. Try it out:

var leafletImagemask = require("@panzhiyue/leaflet-imagemask")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@panzhiyue/leaflet-imagemask v2.0.0

一个图片遮罩层控件,继承自L.ImageOverlay。我们很多时候希望只显示某块区域内的内容,隐藏或者模糊区域外内容。现在网上能找到的代码都是纯色遮罩,不是特别好看。此控件实现了使用指定图片填充遮罩部分内容。

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free