MVTLayer icon+text - use collision only for text #9348
Unanswered
IReallyNeedANick
asked this question in
Q&A
Replies: 1 comment
-
im pretty sure this is how it should work: new MVTLayer({
On some zoom levels i can see partial text. So some kind of collusion is calculated but is completely off all of the time |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey!
I want to implement collision filter for text only when using vector tile that shows icon and text below:
new MVTLayer({
id: 'name,
data: `url,
pointType: 'icon+text',
textSizeUnits: 'common',
textCharacterSet: 'auto',
getText: (data) => {
return data?.properties?.name
},
getTextSize: 20,
getTextPixelOffset: [0, 25],
textSizeMinPixels: 2,
textSizeMaxPixels: 12,
getIconSize: 100,
iconSizeScale: 0.5,
iconSizeMinPixels: 10,
iconSizeMaxPixels: 20,
getIcon: () => ({
url: 'url',
width: 124,
height: 124,
}),
extensions: [new CollisionFilterExtension()]
})
Tried with renderSubLayers but unfortunately when i add CollisionFilterExtension to subLayer it stops working.
any ideas if this is even possible?
Beta Was this translation helpful? Give feedback.
All reactions