美文网首页
arcgis 4 构建插值线性动画 (二)

arcgis 4 构建插值线性动画 (二)

作者: haibalai | 来源:发表于2022-09-08 13:15 被阅读0次

调用

let lineSymbol2 = {

type: "simple-line",

color: "#ffffff",

width: "2",

style: "solid"

},

let lineSymbol = {

type: "simple-line",

color: "#1cccdf",

width: "3",

style: "solid"

},

let paths = [

[

[12709310.232279215, 2544308.84766577],

[12691271.093603922, 2593840.0419945405],

[12662836.51908185, 2633893.0448159534]

]

]

let myMapId = {

layerName: "gralyer1",

mapId: this.view,

dynamicLine: lineSymbol,

staticLine: lineSymbol2,

isInsert: true,

isBaseLine: true,

isClear: false

};

this.myLine = new PathAnimation(myMapId);

this.myLine.setData(paths);

this.myLine.setSpeed(5);

this.myLine.open();

线性动画主类

```javascript

import realTimeTrance from './realTimeTrance';

/**

线动画

@paramoptions[]

**/

export class PathAnimation {

constructor(options) {

this.options = {

layerName: 'gralyer',

view: null,

time: 100,

isInsert: null, //是否进行插值算法

isBaseLine: null, //是否需要加基线

dynamicLine: {

//动线样式

type: 'simple-line',

color: [0, 0, 0, 1],

width: '1',

style: 'solid'

},

staticLine: {

//基线样式

type: 'simple-line',

color: '#F44336',

width: '2',

style: 'solid'

},

isClear: null

};

this.initialize(options);

}

initialize(options) {

this.setOptions(this, options);

this._view = this.options.view;

this.time = this.options.time;

this.linePoints = null;

this.isOpen = false;

this.speed = 2;

this.createTrance();

this.index = 0;

}

//初始化将传入参数赋值

setOptions(obj, options) {

for (const i in options) {

obj.options[i] = options[i];

}

return obj.options;

}

setLineSymbol(symbol) {

this.realTimeTrance.setLineSymbol(symbol);

}

//初始化线

createTrance() {

const self = this;

const option = {

view: self._view,

lineSymbol: self.options.dynamicLine,

layerName: self.options.layerName

};

self.realTimeTrance = new realTimeTrance(option);

}

//设置点数据

setData(lineData) {

this.lineData = lineData;

if (this.options.isInsert) {

this.linePoints = this.getNewData(lineData);

} else {

this.linePoints = lineData[0];

}

return this.linePoints;

}

 更多参考 https://xiaozhuanlan.com/topic/0173492568

相关文章

  • CoreAnimation专题一 CADisplayLink –

    目录 iOS绘图系统FPS绘制动画CADisplayLink构建CADisplayLink线性插值基于CADisp...

  • 【数学】线性插值

    线性插值有一阶、二阶、三阶,对应为单线性插值、双线性插值和三线性插值。三者皆为线性插值,不同之处在于单线性插值为2...

  • 估值器(TypeEvaluator)的使用说明

    前言 现在如果要实现复杂,绚丽的动画效果,离不开两个接口的实现--插值器和估值器 插值器决定动画的变化模式(线性运...

  • 缺失值处理-拉格朗日插值

    常用的插值法有:一维插值法:拉格朗日插值、牛顿插值、分段低次插值、埃尔米特插值、样条插值。二维插值法:双线性插值、...

  • Lanczos算法放大和缩小图片(Java)

    由于最近的Java作业要求将图片放大缩小,主要就是选用一种插值算法,如最邻近插值、双线性二次插值、双线性三次插值,...

  • Lagrange插值算法

    本章涉及知识点1、插值问题的定义2、插值基函数3、Lagrange插值多项式4、Lagrange线性插值5、Lag...

  • 28. 图像缩放

    插值方法 四种插值,最近邻域插值 双线性插值 像素关系重采样 立方插值其中最近邻域插值、双线性插值原理如下: 1)...

  • 插值法处理缺失值

    常用插值法 线性插值对一直的值求出线性方程,通过接触的线性方程得到缺失值。 多项式插值多项式插值是利用已知的数据拟...

  • Android Interpolator(插值器)

    1、概述插值器定义如何计算动画中的特定值作为时间的函数。例如,指定动画在整个动画中线性发生,这意味着动画在整个时间...

  • 【原创,转载请标注】ODV数据处理+ArcGIS小工具

    『站点采集数据——ODV空间插值格网值——ArcGIS空间插值面图层』 实现水下属性数据分层插值,并获取通用数据产...

网友评论

      本文标题:arcgis 4 构建插值线性动画 (二)

      本文链接:https://www.haomeiwen.com/subject/taoanrtx.html