Open nauYieM opened 2 months ago
map.addControl( new MapboxLanguage({ defaultLanguage:'zh-Hans', }) ); addControl(new MapboxDraw({}))是有效的,但是MapboxLanguage就无效,没明白原因,考虑到style有影响,找到没用mapvue的例子 style一样是有生效的。
有个临时解决方法
const control = new MapboxLanguageControl({ defaultLanguage: 'zh-Hans', }); map.addControl(control); const style = map.getStyle(); map.setStyle(""); map.setStyle(style);
map.addControl( new MapboxLanguage({ defaultLanguage:'zh-Hans', }) ); addControl(new MapboxDraw({}))是有效的,但是MapboxLanguage就无效,没明白原因,考虑到style有影响,找到没用mapvue的例子 style一样是有生效的。