I want to develop Lasso Selection on Here Maps.
I had previously made developments for drawing polygons on the map. Simply put, by listening to pointermove and pointerdown events; As the pointer moved, I updated the H.map.Polyline and put an H.map.Marker on the clicked location on the user click event. In the last stage, I placed an H.map.Polygon. You can follow the link for the demo. Polygon Drawing
What I want to do now is the selection method known as Lasso Selection. I don't know where to start because the lines are not straight in this drawing method. You can also look at this link for the Lasso Selection example. Lasso Example
How can I create a free format(non geometric) drawing like Lasso Selection on Here Maps? Which component can I use in H.map?
The demo you linked to uses an SVG
<path>with many small steps.Here is a lasso line I drew:
You can see that the lasso is built up of many straight lines.
This is the SVG element that renders the lasso:
That means you can use the same rendering technique you're already using, you just need to place points more frequently. As a starting point, you could register an event listener for the
'pointermove'event, then place a new polyline point every time the every time the pointer has a distance greater than, let's say, 40px from the previous polyline point.