-
-
Notifications
You must be signed in to change notification settings - Fork 81
Description
Is your feature request related to a problem? Please describe.
Currently, mode name is hard coded for each terra-draw mode.
The below is an example of point mode
terra-draw/packages/terra-draw/src/modes/point/point.mode.ts
Lines 58 to 59 in e4c57f2
export class TerraDrawPointMode extends TerraDrawBaseDrawMode<PointModeStyling> { | |
mode = "point" as const; |
If users want to add two point
modes for different functionalities, currently we cannot add second one because mode name is already added.
Describe your proposed idea for the solution to this problem
maybe mode
name can be set through constructor like below.
const point = new TerraDrawPointMode({
})
const point2 = new TerraDrawPointMode({
mode: `point2`
})
Describe alternatives you've considered
Currently no way to use two modes using same mode name.
Additional context
For example, I am implementing valhalla isochrone api by using terradraw point mode.
If I can add two point modes, one can be used for time isochrone, another one can be used for distance isochrone.