maptalks / maptalks.js

A light and plugable JavaScript library for integrated 2D/3D maps.
https://maptalks.org
BSD 3-Clause "New" or "Revised" License
4.31k stars 504 forks source link

polygon 的 text symbol是否支持自动避让? #828

Closed AllanHao closed 5 years ago

AllanHao commented 5 years ago

maptalks 0.42.1

hi,Polygon的text symbol内容是否支持自动避让?例如当文字长度超过Polygon大小时不予显示,现在默认情况下显示比较乱。 image

谢谢。

fuzhenn commented 5 years ago

https://github.com/ageeye-cn/maptalks.collisionLayer maptalks.js核心库没有避让功能,可以看一下上面的图层插件

另外polygon的中心文字可以用polylabel库来计算,能保证文字在多边形内部

AllanHao commented 5 years ago

好的,了解了,谢谢~