Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I am using Modify and Snap interaction together, I am listening the
modifyEnd
event of the Modify interaction. How can i know the modifyEvent is snapped or not.
Snap interaction does not work well with 3D geometries. My geometries are 3D.
Z
value is not changing even snapped vertex
Z
is different. So how can i get the vertex of the snapped position
map.getEventPixel(event.mapBrowserEvent.originalEvent)
will be the true position of the pointer.
event.mapBrowserEvent.pixel
will the the snapped position.
If they are different the position has been updated by the Snap interaction.
Also if snapped
event.mapBrowserEvent.coordinate
will be a point exactly on the snapped geometry while
map.getCoordinateFromPixel(event.mapBrowserEvent.pixel)
will be a less accurate coordinate calculated to one pixel accuracy
–
Thanks for contributing an answer to Stack Overflow!
-
Please be sure to
answer the question
. Provide details and share your research!
But
avoid
…
-
Asking for help, clarification, or responding to other answers.
-
Making statements based on opinion; back them up with references or personal experience.
To learn more, see our
tips on writing great answers
.