I'm facing some errors when passing the drawOptions object. The code works although the console show some errors about incompatible types. I got those errors even when using the drawOptions provided in the README.
error TS2322: Type '{ position: string; draw: { marker: { icon: L.Icon<L.IconOptions>; }; polyline: boolean; circle: { shap
eOptions: { color: string; }; }; rectangle: { shapeOptions: { color: string; }; }; }; edit: { featureGroup: L.FeatureGroup<...>; }; }' is not assignable to type 'DrawConstruc
torOptions'.
Types of property 'position' are incompatible.
Type 'string' is not assignable to type 'ControlPosition'.
9 [leafletDrawOptions]="drawOptions"
If i remove that line I get another error.
error TS2322: Type '{ draw: { marker: { icon: L.Icon<L.IconOptions>; }; polyline: boolean; circle: { shapeOptions: { color:
string; }; }; rectangle: { shapeOptions: { color: string; }; }; }; edit: { featureGroup: L.FeatureGroup<any>; }; }' is not assignable to type 'DrawConstructorOptions'.
The types of 'draw.polyline' are incompatible between these types.
Type 'boolean' is not assignable to type 'false | PolylineOptions'.
9 [leafletDrawOptions]="drawOptions"
I'm facing some errors when passing the
drawOptions
object. The code works although the console show some errors about incompatible types. I got those errors even when using thedrawOptions
provided in the README.If i remove that line I get another error.
Am I missing something here?
Thank you!