前端开发记录

一.Node相关

  • 镜像:registry = "https://registry.npmmirror.com"

二.Eslint格式检查

  • 关闭语法格式检查
    在这里插入图片描述

三.vue2框架相关

1.base_api

可以直接在data中指定
在这里插入图片描述

或者在vue.config.js中指定
在这里插入图片描述

2.打包报错 Thread Loader

在vue.config.js中加入:
在这里插入图片描述

3.el-upload组件的成功回调:

自定义上传成功的回调时,request.then()不能读取本组件的this:

在这里插入图片描述
var一个变量赋值this即可:

在这里插入图片描述

四.Cesium相关

1.entity的property属性:

必须用 Cesium.PropertyBag(),不能用原生的 new Object()
export function parseFieldInfo(data) {
    var properties = new Cesium.PropertyBag();
    const dataList = data.replace('[', ' ').replace(']', ' ').split(',');

    for (let i = 0; i < dataList.length; i++) {
        const typeName = dataList[i].split(':')[0].replace(' ', '');
        const typeValue = dataList[i].split(':')[1];
        properties.addProperty(typeName, typeValue)

    }
    return properties;
}

export function addPointToView(viewer, e, n, info, entityName) {
    var point = viewer.entities.add({
        position: Cesium.Cartesian3.fromDegrees(e, n),
        name: entityName,
        point: {
            color: Cesium.Color.FIREBRICK,
            pixelSize: 6,
            outlineColor: Cesium.Color.DARKSLATEGREY,
            outlineWidth: 3,
            heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
            disableDepthTestDistance: Number.POSITIVE_INFINITY,
        },
    })
    point.properties = parseFieldInfo(info);
    return point.id;
}

 viewer.screenSpaceEventHandler.setInputAction(click => {
            let pickObj = viewer.scene.pick(click.position)
            if (Cesium.defined(pickObj)) {

                const pNames = pickObj.id.properties.propertyNames;
                
                for (let i = 0; i < pNames.length; i++) {
                    console.log(pNames[i] + ":" + pickObj.id.properties[pNames[i]].getValue())
                }
            } else {
                // console.log(click.position)
            }
        }, Cesium.ScreenSpaceEventType.LEFT_CLICK)

2.4490图源:

在provider中,添加变换属性:

tilingScheme: new Cesium.GeographicTilingScheme(),

否则会偏移-------------------------------------------------------------------------------------
未加参数:
在这里插入图片描述
添加参数后:
在这里插入图片描述

五.CASS内插等高线

先拟合继曲线,用样条拟合,再内插,滤波0.8,将内插的等高线关闭拟合,再重线转轻线

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值