在地图框gl中添加png路径作为图层

时间:2018-07-30 10:59:54

标签: angular mapbox

我有一个png文件路径作为在mapbox gl中添加图层的来源。我尝试了在mapbox gl中的示例,但它没有按预期工作。

https://www.mapbox.com/mapbox-gl-js/example/add-image/

我引用了上面的链接,但是它在代码中显示错误:

"Argument of type '{ "id": string; "type": "symbol"; "source": { "type": "geojson"; "data": { "type": "FeatureCollec...' is not assignable to parameter of type 'Layer'.
 Types of property 'source' are incompatible.
 Type '{ "type": "geojson"; "data": { "type": "FeatureCollection"; "features": { "type": "Feature"; "geo...' is not assignable to type 'string | VectorSource | RasterSource | GeoJSONSource | ImageSource | VideoSource | GeoJSONSourceRaw'.
 Type '{ "type": "geojson"; "data": { "type": "FeatureCollection"; "features": { "type": "Feature"; "geo...' is not assignable to type 'GeoJSONSource'.
 Property 'setData' is missing in type '{ "type": "geojson"; "data": { "type": "FeatureCollection"; "features": { "type": "Feature"; "geo...'."

有人可以帮助我进一步进行吗?

0 个答案:

没有答案