UNPKG

gisviewer-vue3-arcgis

Version:

在应用中引入私服的包, 项目根目录下 新建文件 .npmrc 在 .npmrc 中对包源进行配置:

985 lines (984 loc) 22.1 kB
const e = { id: "districtController", source: [], objectIdField: "ObjectID", geometryType: "polyline", outFields: ["*"], fields: [ { name: "ObjectID", type: "oid" }, { name: "id", type: "string" }, { name: "name", type: "string" }, { name: "subDistrictCount", type: "integer" }, { name: "signalCount", type: "integer" }, { name: "selected", type: "string" } ], renderer: { type: "unique-value", field: "selected", defaultSymbol: { type: "simple-line", style: "long-dash", color: [111, 100, 255], width: 2 }, uniqueValueInfos: [ { value: "false", symbol: { type: "simple-line", style: "long-dash", color: [180, 180, 180], width: 1 } } ] } }, t = { id: "districtController", source: [], objectIdField: "ObjectID", outFields: ["*"], geometryType: "polyline", fields: [ { name: "ObjectID", type: "oid" }, { name: "id", type: "string" }, { name: "name", type: "string" }, { name: "subDistrictCount", type: "integer" }, { name: "signalCount", type: "integer" }, { name: "type", type: "string" }, { name: "selected", type: "string" } ], // popupTemplate: { // title: '{name}', // content: [ // { // type: 'fields', // fieldInfos: [ // { // fieldName: 'id', // label: '区控编号' // }, // { // fieldName: 'subDistrictCount', // label: '子区数量' // }, // { // fieldName: 'signalCount', // label: '信号机数量' // } // ] // } // ] // }, renderer: { type: "unique-value", field: "selected", defaultSymbol: { type: "simple-line", style: "solid", color: [111, 100, 255, 0.4], width: 2 }, uniqueValueInfos: [ { value: "false", symbol: { type: "simple-line", style: "solid", color: [180, 180, 180, 0.4], width: 1 } } ] } }, i = { id: "subDistrictPointController", source: [], objectIdField: "ObjectID", outFields: ["*"], geometryType: "point", fields: [ { name: "ObjectID", type: "oid" }, { name: "id", type: "string" }, { name: "name", type: "string" }, { name: "districtId", type: "string" }, { name: "districtName", type: "string" }, { name: "subDistrictId", type: "string" }, { name: "subDistrictName", type: "string" }, { name: "signalCount", type: "integer" }, { name: "selected", type: "string" }, { name: "type", type: "string" }, { name: "color", type: "string" } ], popupTemplate: { title: "{subDistrictName} 子区", content: [ { type: "fields", fieldInfos: [ { fieldName: "subDistrictId", label: "子区编号" }, { fieldName: "districtName", label: "所属区控" }, { fieldName: "signalCount", label: "信号机数量" } ] } ] } }, r = { id: "subDistrictLineController", source: [], objectIdField: "ObjectID", outFields: ["*"], geometryType: "polyline", fields: [ { name: "ObjectID", type: "oid" }, { name: "id", type: "string" }, { name: "districtId", type: "string" }, { name: "districtName", type: "string" }, { name: "subDistrictId", type: "string" }, { name: "subDistrictName", type: "string" }, { name: "signalCount", type: "integer" }, { name: "fromNode", type: "string" }, { name: "toNode", type: "string" }, { name: "color", type: "string" } ], popupTemplate: { title: "{subDistrictName} 子区", content: [ { type: "fields", fieldInfos: [ { fieldName: "subDistrictId", label: "子区编号" }, { fieldName: "districtName", label: "所属区控" }, { fieldName: "signalCount", label: "信号机数量" } ] } ] } }, s = { id: "signalLayer", source: [], objectIdField: "ObjectID", outFields: ["*"], geometryType: "point", maxScale: 5e3, fields: [ { name: "ObjectID", type: "oid" }, { name: "id", type: "string" }, { name: "name", type: "string" }, { name: "signalId", type: "string" }, { name: "nodeId", type: "string" }, { name: "isKey", type: "string" }, { name: "districtId", type: "string" }, { name: "districtName", type: "string" }, { name: "subDistrictId", type: "string" }, { name: "subDistrictName", type: "string" }, { name: "type", type: "string" }, { name: "selected", type: "string" } ], popupTemplate: { title: "{name}信号机", content: [ { type: "fields", fieldInfos: [ { fieldName: "districtName", label: "区控名称" }, { fieldName: "subDistrictName", label: "子区名称" }, { fieldName: "signalId", label: "信号机编号" }, { fieldName: "nodeId", label: "路口编号" } ] } ] }, renderer: { type: "unique-value", field: "isKey", field2: "selected", defaultSymbol: { type: "simple-marker", style: "circle", color: "gray", size: 4, outline: { color: "white", width: 0 } }, uniqueValueInfos: [ { value: "true,true", symbol: { type: "picture-marker", url: "/GisViewerAssets/Images/icon_star.png", width: "20px", height: "20px" } }, { value: "false,true", symbol: { type: "simple-marker", style: "circle", color: [5, 116, 255, 0.8], size: 8, outline: { color: "white", width: 0 } } }, { value: "true,false", symbol: { type: "simple-marker", style: "circle", color: [180, 180, 180, 0.8], size: 8, outline: { color: "white", width: 0 } } }, { value: "false,false", symbol: { type: "simple-marker", style: "circle", color: [180, 180, 180, 0.8], size: 8, outline: { color: "white", width: 0 } } } ] // visualVariables: [ // { // type: 'size', // valueExpression: '$view.scale', // stops: [ // { // size: 8, // value: 9000.954822000003 // }, // { // size: 6, // value: 18055.954822000003 // }, // { // size: 3, // value: 144447.638572 // }, // { // size: 2, // value: 1155581.108577 // } // ] // } // ] } }, l = { id: "signalLayer", source: [], objectIdField: "ObjectID", outFields: ["*"], geometryType: "point", minScale: 5e3, fields: [ { name: "ObjectID", type: "oid" }, { name: "id", type: "string" }, { name: "name", type: "string" }, { name: "signalId", type: "string" }, { name: "nodeId", type: "string" }, { name: "isKey", type: "string" }, { name: "districtId", type: "string" }, { name: "districtName", type: "string" }, { name: "subDistrictId", type: "string" }, { name: "subDistrictName", type: "string" }, { name: "type", type: "string" }, { name: "selected", type: "string" } ], popupTemplate: { title: "{name}信号机", content: [ { type: "fields", fieldInfos: [ { fieldName: "districtName", label: "区控名称" }, { fieldName: "subDistrictName", label: "子区名称" }, { fieldName: "signalId", label: "信号机编号" }, { fieldName: "nodeId", label: "路口编号" } ] } ] }, renderer: { type: "unique-value", field: "isKey", field2: "selected", defaultSymbol: { type: "simple-marker", style: "circle", color: "gray", size: 4, outline: { color: "white", width: 1 } }, uniqueValueInfos: [ { value: "true,true", symbol: { type: "cim", data: { type: "CIMSymbolReference", primitiveOverrides: [ { // 将textGraphic的TextString替换为graphic.attributes.name type: "CIMPrimitiveOverride", primitiveName: "textGraphic", propertyName: "TextString", valueExpressionInfo: { type: "CIMExpressionInfo", title: "Custom", expression: 'Replace($feature.name, "与", "/") + " " + $feature.signalId', returnType: "Default" } } ], symbol: { type: "CIMPointSymbol", symbolLayers: [ // 路口名称 { type: "CIMVectorMarker", size: 32, colorLocked: !0, anchorPointUnits: "Relative", frame: { xmin: -16, ymin: -16, xmax: 16, ymax: 16 }, markerGraphics: [ { type: "CIMMarkerGraphic", primitiveName: "textGraphic", geometry: { x: 0, y: 0 }, symbol: { type: "CIMTextSymbol", height: 12, horizontalAlignment: "Center", offsetX: 0, offsetY: 30, haloSize: 1, haloSymbol: { type: "CIMPolygonSymbol", symbolLayers: [ { type: "CIMSolidFill", enable: !0, color: [255, 255, 255, 255] } ] }, symbol: { type: "CIMPolygonSymbol", symbolLayers: [ { type: "CIMSolidFill", enable: !0, color: [0, 0, 0, 255] } ] }, verticalAlignment: "Center" }, textString: "" } ], scaleSymbolsProportionally: !0, respectFrame: !0 }, // 路口图标 { type: "CIMPictureMarker", enable: !0, anchorPoint: { x: 0, y: 0 }, anchorPointUnits: "Relative", size: 20, rotateClockwise: !0, textureFilter: "Picture", url: "/GisViewerAssets/Images/cross/gis_gjxklk_orange.png" } ] } } } }, { value: "false,true", symbol: { type: "cim", data: { type: "CIMSymbolReference", primitiveOverrides: [ { // 将textGraphic的TextString替换为graphic.attributes.name type: "CIMPrimitiveOverride", primitiveName: "textGraphic", propertyName: "TextString", valueExpressionInfo: { type: "CIMExpressionInfo", title: "Custom", expression: 'Replace($feature.name, "与", "/") + " " + $feature.signalId', returnType: "Default" } } ], symbol: { type: "CIMPointSymbol", symbolLayers: [ // 路口名称 { type: "CIMVectorMarker", size: 32, colorLocked: !0, anchorPointUnits: "Relative", frame: { xmin: -16, ymin: -16, xmax: 16, ymax: 16 }, markerGraphics: [ { type: "CIMMarkerGraphic", primitiveName: "textGraphic", geometry: { x: 0, y: 0 }, symbol: { type: "CIMTextSymbol", height: 12, horizontalAlignment: "Center", offsetX: 0, offsetY: 15, haloSize: 1, haloSymbol: { type: "CIMPolygonSymbol", symbolLayers: [ { type: "CIMSolidFill", enable: !0, color: [255, 255, 255, 255] } ] }, symbol: { type: "CIMPolygonSymbol", symbolLayers: [ { type: "CIMSolidFill", enable: !0, color: [0, 0, 0, 255] } ] }, verticalAlignment: "Center" }, textString: "" } ], scaleSymbolsProportionally: !0, respectFrame: !0 }, // 路口图标 { type: "CIMPictureMarker", enable: !0, anchorPoint: { x: 0, y: 0 }, anchorPointUnits: "Relative", size: 20, rotateClockwise: !0, textureFilter: "Picture", url: "/GisViewerAssets/Images/cross/gis_xhj_blue.png" } ] } } } }, { value: "true,false", symbol: { type: "picture-marker", url: "/GisViewerAssets/Images/cross/gis_gjxk_gray.png", width: 20, height: 20 } }, { value: "false,false", symbol: { type: "picture-marker", url: "/GisViewerAssets/Images/cross/gis_xhj_gray.png", width: 20, height: 20 } } ], visualVariables: [ { type: "size", valueExpression: "$view.scale", stops: [ { size: 28, value: 2250 }, { size: 24, value: 4500 } ] } ] } }, n = { id: "signalLayer", source: [], objectIdField: "ObjectID", outFields: ["*"], geometryType: "point", maxScale: 5e3, fields: [ { name: "ObjectID", type: "oid" }, { name: "id", type: "string" }, { name: "name", type: "string" }, { name: "signalId", type: "string" }, { name: "nodeId", type: "string" }, { name: "isKey", type: "string" }, { name: "districtId", type: "string" }, { name: "districtName", type: "string" }, { name: "subDistrictId", type: "string" }, { name: "subDistrictName", type: "string" }, { name: "type", type: "string" }, { name: "type", type: "string" }, { name: "selected", type: "string" } ], featureReduction: { type: "cluster", clusterRadius: "120px", clusterMaxSize: "50px", clusterMinSize: "30px", // 自定义聚合符号 symbol: { type: "cim", data: { type: "CIMSymbolReference", primitiveOverrides: [ { // 将textGraphic的TextString替换为graphic.attributes.name type: "CIMPrimitiveOverride", primitiveName: "textGraphic", propertyName: "TextString", valueExpressionInfo: { type: "CIMExpressionInfo", title: "Custom", expression: "$feature.cluster_count", returnType: "Default" } } ], symbol: { type: "CIMPointSymbol", symbolLayers: [ // 聚合数量 { type: "CIMVectorMarker", size: 32, colorLocked: !0, anchorPointUnits: "Relative", frame: { xmin: -16, ymin: -16, xmax: 16, ymax: 16 }, markerGraphics: [ // 数量文字 { type: "CIMMarkerGraphic", primitiveName: "textGraphic", geometry: { x: 0, y: 0 }, symbol: { type: "CIMTextSymbol", height: 16, horizontalAlignment: "Center", offsetX: 0, offsetY: 30, symbol: { type: "CIMPolygonSymbol", symbolLayers: [ { type: "CIMSolidFill", enable: !0, color: [255, 255, 255, 255] } ] }, verticalAlignment: "Center" }, textString: "" }, // 数量文本框 { type: "CIMMarkerGraphic", geometry: { rings: [ [ [-15, 40], [15, 40], [15, 20], [-15, 20], [-15, 40] ] ] }, symbol: { type: "CIMPolygonSymbol", symbolLayers: [ { type: "CIMSolidFill", enable: !0, color: [2, 72, 200, 255] }, { type: "CIMSolidStroke", enable: !0, width: 5, color: [2, 72, 200, 128] } ] } } ], scaleSymbolsProportionally: !0, respectFrame: !0 }, // 聚合图标 { type: "CIMPictureMarker", enable: !0, anchorPoint: { x: 0, y: 0 }, anchorPointUnits: "Relative", size: 40, rotateClockwise: !0, textureFilter: "Picture", url: "/GisViewerAssets/Images/cross/gis_xhj_blue.png" } ] } } } }, popupTemplate: { title: "{name}信号机", content: [ { type: "fields", fieldInfos: [ { fieldName: "districtName", label: "区控名称" }, { fieldName: "subDistrictName", label: "子区名称" }, { fieldName: "signalId", label: "信号机编号" }, { fieldName: "nodeId", label: "路口编号" } ] } ] }, renderer: { type: "simple", symbol: { type: "simple-marker", style: "circle", color: [5, 116, 255], size: 8, outline: { color: "white", width: 1 } } } }; export { e as districtDashLineLayerOptions, t as districtSolidLineLayerOptions, n as signalClusterLayerOptions, s as signalMarkerLayerOptions, l as signalPictureLayerOptions, r as subDistrictLineLayerOptions, i as subDistrictPointLayerOptions };