vue+Cesium(3): 地图参数(params.js)

214 阅读3分钟

3d地图参数配置

/*
* 说明:   地图参数
*/


import * as Cesium from "cesium/Cesium.js";
export const $Params = {
    //绘制类型
    drawType: {
        'Marker': 1,
        'PolyLine': 2,
        'Polygon': 3,
    },
    //水域区域
    riverPoints: [
        121.170687, 27.846771,
        121.170079, 27.847184,
        121.169493, 27.847253,
        121.168774, 27.846997,
        121.168188, 27.846398,
        121.168034, 27.845887,
        121.168078, 27.845671,
        121.168012, 27.845307,
        121.167978, 27.844943,
        121.167967, 27.844717,
        121.168269, 27.844337,
        121.168844, 27.843993,
        121.169618, 27.843511,
        121.170016, 27.843266,
        121.171994, 27.840711,
        121.173828, 27.840711,
        121.174325, 27.840456,
        121.174270, 27.840201,
        121.174922, 27.839494,
        121.175783, 27.839590,
        121.175861, 27.839119,
        121.176159, 27.838049,
        121.179516, 27.836979,
        121.181802, 27.838284,
        121.183846, 27.839806,
        121.182807, 27.841641,
        121.180707, 27.842191,
        121.179945, 27.843783,
        121.178805, 27.844384,
        121.177401, 27.845043,
        121.176981, 27.845436,
        121.177401, 27.846065,
        121.178706, 27.846488,
        121.179502, 27.846645,
        121.179701, 27.847490,
        121.179259, 27.848286,
        121.178772, 27.848394,
        121.177434, 27.848089,
        121.173077, 27.846310,
        121.172026, 27.847165,
        121.170876, 27.846802
    ],
    //集合颜色
    cluster_color: [
        {tag: 'rentalHouses', color: '#FF7E20'},
        {tag: 'selfHouses', color: '#25BBA8'},
        {tag: 'quanQiuYan', color: '#4191FF'},
        {tag: 'elevator', color: '#B16AFC'},
        {tag: 'liuJiGuLi', color: '#F66061'},
    ],
    //默认点样式
    PointStyle: {
        color: Cesium.Color.LIMEGREEN,
        pixelSize: 1,  //点的大小
        outlineColor: Cesium.Color.fromCssColorString("rgba(255, 229, 0, 1)"),  //外边框颜色
        outlineWidth: 3,   //外边框宽度
    },
    //默认标记样式
    MarkerStyle: {
        image: require('../../assets/images/marker.png'),
        // disableDepthTestDistance: Number.POSITIVE_INFINITY,  //处理标记遮挡
        width: 30,
        height: 40,
        // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
        clampToGround: true,
        classificationType: Cesium.ClassificationType.CESIUM_3D_TILE,
        verticalOrigin : Cesium.VerticalOrigin.BOTTOM
    },
    //默认线样式
    PolyLineStyle: {
        width: 2.0,
        // material: Cesium.Color.fromCssColorString("rgba(81, 255, 0, 1)"),
        material: new Cesium.PolylineDashMaterialProperty({
            color: Cesium.Color.fromCssColorString("rgba(81, 255, 0, 1)"),
            dashLength: 0
        }),
        clampToGround: true,
    },
    //默认面样式
    PolygonStyle: {
        material: Cesium.Color.AQUA.withAlpha(0.4),   //withAlpha  处理透明度
        outline: true, // 几何轮廓存在
        outlineColor: Cesium.Color.fromCssColorString("rgba(255, 229, 0, 1)"),  //Cesium.Color.YELLOW,
        outlineWidth: 3,   //外边框宽度
        clampToGround: true,
        height: 1
    },
    // websocket接口 _codes参数
    window_codes: [
        "organs",
        // "cluster", // 点聚合数据
        "ship",
        // "relations",
        // "full",
        "setting",
        // // "mapSubjects_yc", // 渔船
        // "mapSubjects_yq", // 渔区
        // // "mapSubjects_jyx", // 禁渔线
        // "mapSubjects_zh",
        // "mapSubjects_zr",
        // // "mapSubjects_u9",
        // "mapSubjects_yg", // 渔港
        // "mapSubjects_dzzl",
        // "ycjcg_bj",
        // "zd_bj",
        // "dzzl_bj",
        // "ldyc_bj",
        // "tf_bj",
        // "sw_bj",
        // "fxy_bj",
        // "tdczhg_bj",
        // "fyjpc_bj",
        // "fyjzm_bj"
    ],

    //地图基础参数
    testUrl:"http://122.228.31.132/map/zjhtBD/{z}/{y}/{x}.png",
    apps:{
        pc: {
            lon: 122.0,
            lat: 28.0,
            zoom: 8,
            shipScale:2,//渔船图标大小
            showScaleLine:true,//是否显示比例尺
            showGraticule:true,//是否显示鹰眼图
            showHoverTip:true,//是否显示悬浮框
            enableJKLB:true,//是否启用 组织机构和作业类型对渔船显示过滤
            xyzUrl:"http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}",//默认底图
        }
    },
    //渔船默认颜色
    shipInit_color: {
        default_colorbdxt: "0080FF",
        default_colorshps: "FFA600",
        default_colorinnerclassb: "FFFF00",
        default_colorhs: "800080",
        default_colorwxdh: "4646FC",
        default_colorvast: "7707E6",
        default_colorouterclassa: "008000",
        default_colorouterclassb: "94D11B",
        default_colorinnerwz: "0080FF",
        default_colorouterwz: "008000",
        default_colorfavlist: "FF0000",
        default_coloroffline: "808080"
    },
    termtype : {
        1:"海事卫星",
        2:"北斗星通",
        3:"普适",
        4:"AIS",
        5:"GSM手机终端",
        6:"GSM手机号",
        7:"智慧终端",
        8:"电信CDMA",
        9:"远程AIS",
        11:"海事电话",
        12:"渔信通",
        13:"InmarsatFbb",
        14:"固定式船位仪",
        15:"北斗埃威",
        16:"北斗同博",
        17:"海上通",
        18:"人船联动",
        19:"飞通北斗",
        61:"渔业短波",
        62:"渔业超短波",
        63:"VTS",
        65:"RFID"
    },
    postypes : {
        410:'AIS CLASS A',
        411:'AIS CLASS B',
    },
    //船舶类型
    ship_type: {
        '1': '捕捞渔船',
        '2': '辅助渔船',
        '3': '公务船'
    },
    //作业类型
    work_type: {
        '1': '拖网',
        '2': '围网',
        '3': '刺网',
        '4': '张网',
        '5': '钓具',
        '6': '笼壶',
        '7': '杂鱼具',
        '8': '陷阱',
        '9': '耙刺',
        '10': '渔运船',
        '11': '冷藏船',
        '12': '渔油船',
        '13': '油污船',
        '16': '科学教研',
        '17': '工程船',
        '19': '渔政船',
        '20': '海监艇',
        '21': '其他'
    },
    //作业方式
    work_mode: {
        '1': '拖虾',
        '2': '单拖',
        '3': '双拖',
        '4': '对网',
        '5': '普通围网',
        '6': '深水围网',
        '7': '定刺网',
        '8': '流刺网',
        '9': '帆式张网',
        '10': '流动张网',
        '11': '定制张网',
        '12': '毛虾抛锭',
        '14': '延绳钓',
        '15': '蟹笼',
        '16': '笼壶',
        '17': '敷网',
        '20': '其它',
        '24': '耙刺',
        '25': '灯光围网',
        '26': '渔运船'
    },
    //船体材料
    ship_mate: {
        '1': '钢制',
        '2': '木质',
        '0': '其它'
    },
    //船舶状态
    ship_status: {
        "0": "在航(主机推动)",
        "1": "锚泊",
        "2": "失控",
        "3": "操纵受限",
        "4": "吃水受限",
        "5": "靠泊",
        "6": "搁浅",
        "7": "从事捕鱼",
        "8": "靠船帆提供动力",
        "9": "9",
        "10": "",
        "11": "",
        "12": "",
        "13": "",
        "14": "",
        "15": ""
    },
}