-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
For example, instead of starting creation at the beginning, start with some number of points already placed.
annotationLayer.mode('line', { type: 'LineString', coordinates: [100, 100] })
This would put the annotation layer in creation mode with 1 point already dropped, ready to place the second.
I think this is generally applicable to line, rectangle, and polygon. It should probably throw and error if you try it with a point.
If a maintainer is willing to accept that or a similar API, I could attempt to implement. This would not be a breaking change.
The work around you be to switch to create mode, then immediately modify the currentAnnotation.
Lines 543 to 552 in 42d1d39
| if (m_this.currentAnnotation) { | |
| switch (m_this.currentAnnotation.state()) { | |
| case geo_annotation.state.create: | |
| m_this.removeAnnotation(m_this.currentAnnotation); | |
| break; | |
| case geo_annotation.state.edit: | |
| m_this.currentAnnotation.state(geo_annotation.state.done); | |
| m_this.modified(); | |
| m_this.draw(); | |
| break; |
Looks like there are options to try before we make an official attempt.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels