地图 scatter 自定义图片
const highLight = require(""); type: "scatter", roam: false, symbol: "image://" + highLight, symbolSize: 22, coordinateSystem: "geo", data: convertData(data), label: { emphasis: { show: false } }, function convertData(data) { let res = []; for (let i = 0; i < data.length; i++) { let geoCoord = geoCoordMap[data[i].name]; if (geoCoord) { res.push({ ...data[i], // 其他参数 name: data[i].name, value: geoCoord.concat(data[i].value), }); } } return res; }
图片需要require导入,当作变量使用。