React mapbox gl draw 如何更改控件中的值
React mapbox gl draw how to change the value in controls
嘿,我正在尝试更改要添加到控件的道具,但我似乎无法访问该类型。
<DrawControl onDrawCreate={onDrawCreate} onDrawUpdate={onDrawUpdate} displayControlsDefault ={false} controls = {} />
controls?: Partial<{
point: boolean;
line_string: boolean;
polygon: boolean;
trash: boolean;
combine_features: boolean;
uncombine_features: boolean;
}>;
default_mode?: string;
displayControlsDefault?: boolean;
keybindings?: boolean;
modes?: object;
如何在 DrawControl 中设置 combine_features 和 uncombine_features 的值...请帮助
我找到了解决方案 -
我不得不做
之前没有添加双 {{}}
嘿,我正在尝试更改要添加到控件的道具,但我似乎无法访问该类型。
<DrawControl onDrawCreate={onDrawCreate} onDrawUpdate={onDrawUpdate} displayControlsDefault ={false} controls = {} />
controls?: Partial<{
point: boolean;
line_string: boolean;
polygon: boolean;
trash: boolean;
combine_features: boolean;
uncombine_features: boolean;
}>;
default_mode?: string;
displayControlsDefault?: boolean;
keybindings?: boolean;
modes?: object;
如何在 DrawControl 中设置 combine_features 和 uncombine_features 的值...请帮助
我找到了解决方案 -
我不得不做
之前没有添加双 {{}}