DorisOu commented on issue #8504: series map和百度地图之间坐标如何进行转换? URL: https://github.com/apache/incubator-echarts/issues/8504#issuecomment-435741943 @nekonabe-tokumori 自定义坐标是这样的格式; //自定义区域坐标 var paths = [ [ [113.447976, 22.363792], [113.328872, 22.422652], [113.370276, 22.308298], [113.474307, 22.260588] ], [ [113.55542316292018, 22.451920414231754], [113.55552840279444, 22.452818734758235], [113.55371761986818, 22.453423869526087], [113.55356109301499, 22.454512840320145] ] ] renderItem这样用没有问题,但是我要怎么循环渲染出pths的多边形? function renderItem(params, api) { var coords = paths[0]; var points = []; for (var i = 0; i < coords.length; i++) { points.push(api.coord(coords[i])); } return { type: 'polygon', shape: { points: echarts.graphic.clipPointsByRect(points, { x: params.coordSys.x, y: params.coordSys.y, width: params.coordSys.width, height: params.coordSys.height }) }, style: api.style({ fill: 'lightblue', stroke: '#000' }) } }
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
