xieb
2023-09-13 3667807a7b7418efc090ee3fa6a6b734bc3080bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
 
export interface MapGeographicPosition {
 longitude: number;
 latitude: number;
 height?: number;
}
export enum LayerType {
 Normal,
 Default,
 Share
}
export interface pinAMapPosition {
 KL: number
 className: string
 kT: number
 lng: number
 lat: number
}
export enum ResourceStatus {
 NotShow,
 Show
}
export type GeojsonCoordinate = [number, number, number?]
 
export interface GeojsonLine {
 type: 'Feature'
 properties: {
   color: string
   directConnected?: boolean
 }
 geometry: {
   type: 'LineString'
   coordinates: GeojsonCoordinate[]
 }
}
 
export interface GeojsonPolygon {
 type: 'Feature'
 properties: {
   color: string
 }
 geometry: {
   type: 'Polygon'
   coordinates: GeojsonCoordinate[][]
 }
}
 
export interface GeojsonPoint {
 type: 'Feature'
 properties: {
   color: string
   clampToGround?: boolean
 }
 geometry: {
   type: 'Point'
   coordinates: GeojsonCoordinate
 }
}
export type GeojsonFeature = GeojsonLine | GeojsonPolygon | GeojsonPoint
 
interface ResourceObjectBasic {
 user_name: string
 user_id?: string
 type:0| 1 | 2
 content: unknown
}
export interface PinResource extends ResourceObjectBasic {
 type: 0
 content: GeojsonFeature
}
 
export type ResourceObject = PinResource
export enum LayerElevationLoadStatus {
 Unload,
 Load
}
 
export interface LayerResource {
 id: string
 name: string
 order: number
 status: ResourceStatus
 resource: ResourceObject | null
 display: number
 create_time: number
 elevation_load_status?: LayerElevationLoadStatus //
}
export interface Layer {
 id: string
 name: string
 order: number
 create_time: number
 type: LayerType
 is_distributed: boolean
 is_lock: boolean
 elements: null | LayerResource[],
 is_check?: boolean
 is_select?: boolean
 
}