![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
canvas
shengandshu
这个作者很懒,什么都没留下…
展开
-
openlayers wms 和 canvas toDataURL的跨域问题
项目有个需求要把openlayers的地图转成base64用来导出,本来以为可以和echarts一样,用canvas的toDataURL就简单解决了,结果给我报了这个错误:Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.原来是跨域了,而echarts生成的canva...原创 2018-06-05 09:43:41 · 1394 阅读 · 0 评论 -
canvas如何判断鼠标是否选中图形或线段
一、是否在闭合路径内1. 几何判断(适合规则图形)矩形:function isInsideRect (x0, y0, width, height, x, y) { return x >= x0 && x <= (x0 + width) && y >= y0 && y <= (y0 + height);}...原创 2018-11-23 12:10:24 · 5775 阅读 · 0 评论