We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
MultiPolygon.copy() 得到的结果是正确的,_geometries对象是完整的, 但是addTo layer后,只能显示出多边形而显示不出圆或椭圆
重现代码可参考这个
var layer = new maptalks.VectorLayer('vector').addTo(map); var circle = new maptalks.Circle(map.getCenter(), 1000); var polygon = new maptalks.Polygon( [[[-0.131049, 51.503568], [-0.107049, 51.503568], [-0.107049, 51.501568], [-0.131049, 51.501568]]]); var multiPolygon = new maptalks.MultiPolygon([polygon, circle]); var multiPolygonCopy = multiPolygon.copy().addTo(layer); console.log(multiPolygonCopy) // setTimeout(function() { circle.addTo(layer) }, 2000)
The text was updated successfully, but these errors were encountered:
这个不算是bug,circle添加到multipolygon里时,确实会被转化为多边形
Sorry, something went wrong.
不是我取不到circle了,问题是看不到这个圆,圆没有被渲染出来 转不转成多边形也不应该不渲染到地图上
// 地图上能正常渲染MultiPolygon,有polygon, circle两个图形 new maptalks.MultiPolygon([polygon, circle]).addTo(layer);
// 地图上只渲染了polygon, 不渲染circle new maptalks.MultiPolygon([polygon, circle]).copy().addTo(layer);
收到! 以后最好能提供一个可运行的jsfiddle(或类似)重现bug,这样不会产生误解,而且也能方便我定位和修改bug
fa9b7d4
No branches or pull requests
MultiPolygon.copy()
得到的结果是正确的,_geometries对象是完整的,
但是addTo layer后,只能显示出多边形而显示不出圆或椭圆
重现代码可参考这个
The text was updated successfully, but these errors were encountered: