By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.
可以通过给layer设置mask来实现
const polygon = new maptalks.Polygon(coordinates); //基于canvas的图层都支持 layer.setMask(polygon);
参考示例:
http://maptalks.org/examples/cn/tilelayer-projection/tile-mask/#tilelayer-projection_tile-mask