You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to interact with map features which are elevated (e.g. with line-z-offset, symbol-z-offset, fill-z-offset). For example, I can highlight an elevated line when hovered or click on it to trigger an event.
Unless i'm missing something, the following functions don't account for the z-offset:
on click, on mouseover etc: These events only get fired if I click on the ground co-ordinates rather than the offset feature which wouldn't be intuitive for users
QueryRenderedFeatures: No way to query features under the mouse which might be offset from the ground though might be better solved with...
unproject / project: I may want to calculate the ground co-ordinates X metres below the pixel coordinates (e.g. to create geometry offset from the ground or QueryRenderedFeatures at that ground position)
Design Alternatives
on click/ on mouse over etc: I would expect the features which are visible at the mouse position to be returned, even if they are offset. Or perhaps this could be an optional parameter.
QueryRenderedFeatures: Similar to above
unproject / project: Add a parameter to give a value offset from the co-ordinates in a number of metres.
Suggestion
I think adding the ability to incorporate a z-offset to the unproject/project functions might be the most beneficial short term, as it could be used in combination with QueryRenderedFeatures to achieve the desired result. However, one limitation is this is only beneficial if I know the z-offset of the features I want to query in advance.
The text was updated successfully, but these errors were encountered:
Motivation
I want to interact with map features which are elevated (e.g. with line-z-offset, symbol-z-offset, fill-z-offset). For example, I can highlight an elevated line when hovered or click on it to trigger an event.
Unless i'm missing something, the following functions don't account for the z-offset:
Design Alternatives
Suggestion
I think adding the ability to incorporate a z-offset to the unproject/project functions might be the most beneficial short term, as it could be used in combination with QueryRenderedFeatures to achieve the desired result. However, one limitation is this is only beneficial if I know the z-offset of the features I want to query in advance.
The text was updated successfully, but these errors were encountered: