MapBox 的多边形和垃圾桶控制按钮如下所示为空(功能完美运行)。
this.draw = new MapboxDraw({
userProperties: true,
displayControlsDefault: false,
controls: {
combine_features: false,
uncombine_features: false,
polygon: true,
trash: true
}
});
this.map.addControl(this.draw, 'top-left');
请将其添加到您的 angular.json 中的样式数组中,它会起作用。
“样式”:[ “./node_modules/mapbox-gl/dist/mapbox-gl.css”,