A marker collision plugin for maptalks and uses rbush library.
var collisionLayer = new maptalks.CollisionLayer('layerName').addTo(map)
collisionLayer.updateCollision()
Option | Type | Default |
---|---|---|
activeId |
String | null |
isCollision |
Boolean | true |
isShowCollisionPoints |
Boolean | true |
hidePointsId |
String | hidePoints |
hidePointsSymbol |
Object | {'markerType': 'ellipse','markerFillOpacity': 0.3,'markerLineOpacity': 0.3,'markerWidth': 3,'markerHeight': 3,} |
Method | Return | Description |
---|---|---|
updateCollision() |
||
setActiveId(<String> id) |
||
isShowCollisionPoints() |
Boolean | |
showCollisionPoints() |
||
hideCollisionPoints() |
||
enableCollision() |
||
disableCollision() |
||
isCollision() |
Boolean |
MIT License.