diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 0475a5c..3114339 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,3 +1,10 @@ +/* + * @Author: cbwu 504-wuchengbo@htsdfp.com + * @Date: 2024-04-13 10:03:23 + * @LastEditors: cbwu + * @LastEditTime: 2024-04-13 11:07:45 + * @Description: + */ module.exports = { env: { browser: true, @@ -63,5 +70,6 @@ module.exports = { semi: false, }, ], + 'linebreak-style': [0, 'error', 'windows'], //取消对LF和CRLF的检查 }, } diff --git a/src/types/entityoptions.ts b/src/types/entityoptions.ts index c27fc86..bde5d46 100644 --- a/src/types/entityoptions.ts +++ b/src/types/entityoptions.ts @@ -2,7 +2,7 @@ * @Author: cbwu 504-wuchengbo@htsdfp.com * @Date: 2024-04-13 10:36:06 * @LastEditors: cbwu - * @LastEditTime: 2024-04-13 10:56:26 + * @LastEditTime: 2024-04-13 11:14:53 * @Description: */ import { Color, Cartesian2 } from 'cesium' @@ -10,17 +10,17 @@ export interface EntityOptions { id?: string name?: string show?: boolean - pixelSize?: number - outlineColor?: Color - color?: Color - fillColor?: Color - fill?: boolean - width?: number + pixelSize?: number //点大小 + outlineColor?: Color //轮廓线颜色 + color?: Color //点颜色 + fillColor?: Color //填充颜色 + fill?: boolean //是否填充 + width?: number //线宽 outlineWidth?: number - text?: string - font?: string - pixelOffset?: Cartesian2 - image?: string - imageWidth?: number - imageHeight?: number + text?: string //标注内容 + font?: string //字体 + pixelOffset?: Cartesian2 //偏移量 + image?: string //图片url + imageWidth?: number //图片宽 + imageHeight?: number //图片高 } diff --git a/src/utils/map/geometry/billboard.ts b/src/utils/map/geometry/billboard.ts index aa09d8e..56d88db 100644 --- a/src/utils/map/geometry/billboard.ts +++ b/src/utils/map/geometry/billboard.ts @@ -5,7 +5,7 @@ * @LastEditTime: 2024-04-13 10:45:00 * @Description: 广告牌对象 */ -import { Entity, Cartesian3, Cartesian2, Color, HeightReference } from 'cesium' +import { Entity, Cartesian3, Cartesian2, HeightReference } from 'cesium' import { getMapAssetsFile } from '@/utils/getAssets' export class BillBoard extends Entity { static ID: number = 0 diff --git a/src/utils/map/geometry/pointEntity.ts b/src/utils/map/geometry/pointEntity.ts index 626b151..1bd5c47 100644 --- a/src/utils/map/geometry/pointEntity.ts +++ b/src/utils/map/geometry/pointEntity.ts @@ -2,20 +2,10 @@ * @Author: cbwu 504-wuchengbo@htsdfp.com * @Date: 2024-03-28 16:35:33 * @LastEditors: cbwu - * @LastEditTime: 2024-04-13 10:46:19 + * @LastEditTime: 2024-04-13 11:15:48 * @Description: 封装的点几何类 */ -import { - Entity, - Cartesian3, - Color, - PointGraphics, - PositionProperty, - LabelGraphics, - Cartesian2, - CallbackProperty, - Property, -} from 'cesium' +import { Entity, Cartesian3, Color, PointGraphics, LabelGraphics } from 'cesium' import { EntityOptions } from '@/types/entityoptions' // 点 class PointEntity extends Entity {