MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / createLineSeries

Method createLineSeries

src/openlayers/mapping/WebMap.js:4679–4716  ·  view source on GitHub ↗

* @private * @function WebMap.prototype.createLineSeries * @description 创建线系列 * @param {Object} layerInfo 图层参数 * @param {Array} lineData 线数据 * @returns {Object} 线系列

(layerInfo, lineData)

Source from the content-addressed store, hash-verified

4677 * @returns {Object} 线系列
4678 */
4679 createLineSeries(layerInfo, lineData) {
4680 let lineSetting = layerInfo.lineSetting;
4681 let animationSetting = layerInfo.animationSetting;
4682 let linesSeries = [
4683 // 轨迹线样式
4684 {
4685 name: 'line-series',
4686 type: 'lines',
4687 zlevel: 1,
4688 silent: true,
4689 effect: {
4690 show: animationSetting.show,
4691 constantSpeed: animationSetting.constantSpeed,
4692 trailLength: 0,
4693 symbol: animationSetting.symbol,
4694 symbolSize: animationSetting.symbolSize
4695 },
4696 lineStyle: {
4697 normal: {
4698 color: lineSetting.color,
4699 type: lineSetting.type,
4700 width: lineSetting.width,
4701 opacity: lineSetting.opacity,
4702 curveness: lineSetting.curveness
4703 }
4704 },
4705 data: lineData
4706 }
4707 ];
4708
4709 if (lineData.length > MAX_MIGRATION_ANIMATION_COUNT) {
4710 // linesSeries[0].large = true;
4711 // linesSeries[0].largeThreshold = 100;
4712 linesSeries[0].blendMode = 'lighter';
4713 }
4714
4715 return linesSeries;
4716 }
4717
4718 /**
4719 * @private

Callers 1

createOptionsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected