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
使用DrawingManager画多边形的时候,如果一直在一个地方点击鼠标,最后得到覆盖物的坐标数组会有很多个连续相同的坐标。然后使用GeoUtils.getPolygonArea方法计算面积得到的结果是NaN
[{"lng":116.05931967048495,"lat":39.94503428079636}, {"lng":116.10761257470138,"lat":39.94149394355425}, {"lng":116.10761257470138,"lat":39.94149394355425}, {"lng":116.1064627436486,"lat":39.92688810062903}, {"lng":116.08749053127787,"lat":39.91050811648429}, {"lng":116.08749053127787,"lat":39.91050811648429}, {"lng":116.06851831890714,"lat":39.9144928004373}, {"lng":116.06851831890714,"lat":39.9144928004373}, {"lng":116.05931967048495,"lat":39.94503428079636}]
//mapopen.cdn.bcebos.com/github/BMapGLLib/GeoUtils/src/GeoUtils.min.js
The text was updated successfully, but these errors were encountered:
鼠标绘制与面积计算可以使用新的鼠标绘制库BMap-Draw,https://www.npmjs.com/package/bmap-draw
Sorry, something went wrong.
No branches or pull requests
问题描述:
使用DrawingManager画多边形的时候,如果一直在一个地方点击鼠标,最后得到覆盖物的坐标数组会有很多个连续相同的坐标。然后使用GeoUtils.getPolygonArea方法计算面积得到的结果是NaN
坐标示例:
[{"lng":116.05931967048495,"lat":39.94503428079636}, {"lng":116.10761257470138,"lat":39.94149394355425}, {"lng":116.10761257470138,"lat":39.94149394355425}, {"lng":116.1064627436486,"lat":39.92688810062903}, {"lng":116.08749053127787,"lat":39.91050811648429}, {"lng":116.08749053127787,"lat":39.91050811648429}, {"lng":116.06851831890714,"lat":39.9144928004373}, {"lng":116.06851831890714,"lat":39.9144928004373}, {"lng":116.05931967048495,"lat":39.94503428079636}]
使用的js
//mapopen.cdn.bcebos.com/github/BMapGLLib/GeoUtils/src/GeoUtils.min.js
The text was updated successfully, but these errors were encountered: