Add a canvas source | Mapbox GL JS | MapboxAdd a canvas source to the map.https://docs.mapbox.com/mapbox-gl-js/example/canvas-source/ mapbox官网有提供案例,我觉得还是不错的