所有的文件都在vue里静态引入的,报错s of null (reading 'addLayer')",以下为代码
var map = this.mapData.map
//标绘服务地址
///////////
var host = window.isLocal ? window.server : '
https://iserver.supermap.io'
var url = host + '/iserver/services/map-china400/rest/maps/China_4326'
var serverUrl = host + '/iserver/services/plot-jingyong/rest/plot/'
var plotUrl =
'
https://iserver.supermap.io/iserver/services/plot-jingyong/rest/plot/'
var plottingLayer = L.supermap.plotting.plottingLayer('plot', serverUrl)
console.log(plottingLayer, 'plottingLayer')
plottingLayer.addTo(map)