@summeruse/ol 0.4.2 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @summeruse/ol
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 774051c: feat(utils): 添加弧度与角度转换函数
8
+ - 112feb2: feat(ol-map): 添加地图旋转支持
9
+
10
+ ## 0.5.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 0e7124d: feat(图层工具): 添加热力图图层创建功能
15
+
3
16
  ## 0.4.2
4
17
 
5
18
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -2,18 +2,19 @@ import * as vue20 from "vue";
2
2
  import { CSSProperties, InjectionKey, MaybeRef, MaybeRefOrGetter, Ref, VNode, VNodeChild } from "vue";
3
3
  import * as ol0 from "ol";
4
4
  import { Feature, Map, Map as OLMap, MapEvent } from "ol";
5
- import { Extent } from "ol/extent";
6
5
  import { Circle, Geometry, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon } from "ol/geom";
7
- import VectorLayer from "ol/layer/Vector";
8
- import VectorSource from "ol/source/Vector";
9
6
  import { Circle as Circle$1, Fill, Icon, Stroke, Style, Text } from "ol/style";
10
7
  import { Graticule, Layer, Tile } from "ol/layer";
8
+ import HeatmapLayer from "ol/layer/Heatmap";
9
+ import VectorLayer from "ol/layer/Vector";
11
10
  import WebGLVectorLayer from "ol/layer/WebGLVector";
12
11
  import * as ol_source0 from "ol/source";
13
12
  import { BingMaps, OSM, Source, XYZ } from "ol/source";
14
13
  import ImageTileSource from "ol/source/ImageTile";
14
+ import VectorSource from "ol/source/Vector";
15
15
  import { Projection } from "ol/proj";
16
16
  import * as ol_tilegrid0 from "ol/tilegrid";
17
+ import { Extent } from "ol/extent";
17
18
  import * as ol_coordinate0 from "ol/coordinate";
18
19
  import { Coordinate } from "ol/coordinate";
19
20
  import { ObjectEvent } from "ol/Object";
@@ -28,6 +29,9 @@ import { FlatStyleLike } from "ol/style/flat";
28
29
  import proj4 from "proj4";
29
30
  import TileLayer from "ol/layer/Tile";
30
31
 
32
+ //#region constants/distance.d.ts
33
+ declare const ONE_NM = 1852;
34
+ //#endregion
31
35
  //#region constants/projection.d.ts
32
36
  /** 3857坐标系 球面墨卡托投影坐标系 */
33
37
  declare const EPSG_3857 = "EPSG:3857";
@@ -41,6 +45,7 @@ type ProjectionLike = 'EPSG:3857' | 'EPSG:4326' | 'EPSG:3395';
41
45
  interface OlMapProps {
42
46
  olMap?: Map;
43
47
  center?: Coordinate;
48
+ rotation?: number;
44
49
  zoom?: number;
45
50
  minZoom?: number;
46
51
  maxZoom?: number;
@@ -65,7 +70,9 @@ declare function useOlMap(): Map | undefined;
65
70
  interface OlMapEmits {
66
71
  'update:zoom': [number];
67
72
  'update:center': [Coordinate];
73
+ 'update:rotation': [number];
68
74
  'changeResolution': [ObjectEvent];
75
+ 'changeRotation': [ObjectEvent];
69
76
  'changeCenter': [ObjectEvent];
70
77
  'moveend': [MapEvent];
71
78
  'movestart': [MapEvent];
@@ -84,18 +91,23 @@ declare const __VLS_component: vue20.DefineComponent<OlMapProps, {
84
91
  }, {}, {}, {}, vue20.ComponentOptionsMixin, vue20.ComponentOptionsMixin, {
85
92
  "update:zoom": (args_0: number) => any;
86
93
  "update:center": (args_0: ol_coordinate0.Coordinate) => any;
94
+ "update:rotation": (args_0: number) => any;
87
95
  changeResolution: (args_0: ObjectEvent) => any;
96
+ changeRotation: (args_0: ObjectEvent) => any;
88
97
  changeCenter: (args_0: ObjectEvent) => any;
89
98
  moveend: (args_0: MapEvent) => any;
90
99
  movestart: (args_0: MapEvent) => any;
91
100
  }, string, vue20.PublicProps, Readonly<OlMapProps> & Readonly<{
92
101
  "onUpdate:zoom"?: ((args_0: number) => any) | undefined;
93
102
  "onUpdate:center"?: ((args_0: ol_coordinate0.Coordinate) => any) | undefined;
103
+ "onUpdate:rotation"?: ((args_0: number) => any) | undefined;
94
104
  onChangeResolution?: ((args_0: ObjectEvent) => any) | undefined;
105
+ onChangeRotation?: ((args_0: ObjectEvent) => any) | undefined;
95
106
  onChangeCenter?: ((args_0: ObjectEvent) => any) | undefined;
96
107
  onMoveend?: ((args_0: MapEvent) => any) | undefined;
97
108
  onMovestart?: ((args_0: MapEvent) => any) | undefined;
98
109
  }>, {
110
+ rotation: number;
99
111
  maxZoom: number;
100
112
  minZoom: number;
101
113
  olMap: Map;
@@ -199,6 +211,10 @@ type UseContextmenuFn = (...args: UseContextmenuParams) => UseContextmenuReturn;
199
211
  declare function kmToNauticalMiles(km: number): number;
200
212
  /** 海里转公里 */
201
213
  declare function nauticalMilesToKm(nauticalMiles: number): number;
214
+ /** 弧度转角度 */
215
+ declare function rotationToAngle(rotation: number): number;
216
+ /** 角度转弧度 */
217
+ declare function angleToRotation(angle: number): number;
202
218
  /** 格式化Rotation */
203
219
  declare function formatRotation(rotation: number): number;
204
220
  /** 格式化角度 */
@@ -332,6 +348,14 @@ declare function createCanvasLayer(olMap: OLMap, refresh: (frameState: FrameStat
332
348
  layer: Layer<Source, ol_renderer_Layer0.default<any>>;
333
349
  source: Source;
334
350
  };
351
+ type HeatmapLayerOptions = ConstructorParameters<typeof HeatmapLayer>[0];
352
+ type createHeatmapLayerOptions = HeatmapLayerOptions & {
353
+ sourceOptions?: VectorSourceOptions;
354
+ };
355
+ declare function createHeatmapLayer(options?: createHeatmapLayerOptions): {
356
+ layer: HeatmapLayer<Feature<Geometry>, VectorSource<Feature<Geometry>>>;
357
+ source: VectorSource<Feature<Geometry>>;
358
+ };
335
359
  //#endregion
336
360
  //#region utils/projection/index.d.ts
337
361
  /** EPSG_4326转EPSG_3857 */
@@ -653,7 +677,4 @@ declare function useSwitchBaseLayer(data: {
653
677
  visibleLayerName: vue20.Ref<string, string>;
654
678
  };
655
679
  //#endregion
656
- //#region constants/distance.d.ts
657
- declare const ONE_NM = 1852;
658
- //#endregion
659
- export { BingMapsSourceOptions, CanvasLayerOptions, CircleOptions, ContextmenuItem, ContextmenuItemBase, ContextmenuList, ContextmenuOption, ContextmenuOptionBase, ContextmenuOptions, ContextmenuPosition, CreateBingLayerOptions, CreateOpenStreetMapLayerOptions, CreateTianDiTuLayerOptions, CreateTianDiTuUrlOptions, DrawLineStringOptions, DrawPolygonOptions, EPSG_3395, EPSG_3857, EPSG_3857ExtentToEPSG_4326, EPSG_3857ToEPSG_4326, EPSG_4326, EPSG_4326ExtentToEPSG_3857, EPSG_4326ToEPSG_3857, FeatureOptions, FillOptions, GraticuleOptions, IconOptions, ImageTileSourceOptions, ONE_NM, _default as OlMap, OlMapEmits, OlMapInst, OlMapProps, OpenStreetMapSourceOptions, Option, PMTilesLayerOptions, PointermoveItem, PointermoveList, PointermovePosition, ProjectionLike, StrokeOptions, StyleOptions, T_MAP_TYPE, TextOptions, TileLayerOptions, UseContextmenuFn, UseContextmenuParams, UseContextmenuReturn, UseGraticuleOptions, UseGraticuleReturn, UsePointermoveFn, UsePointermoveOptions, UsePointermoveParams, UsePointermoveReturn, VectorLayerOptions, VectorSourceOptions, WebGLVectorLayerOptions, XYZLayerOptions, XYZ_SourceOptions, _CircleOptions, _GraticuleOptions, _StyleOptions, _TextOptions, _VectorLayerOptions, _VectorSourceOptions, _WebGLVectorLayerOptions, createBingLayer, createCanvasLayer, createCircle, createCircleFeature, createCircleStyle, createFeature, createLineString, createLineStringFeature, createMultiLineString, createMultiLineStringFeature, createMultiPoint, createMultiPointFeature, createMultiPolygon, createMultiPolygonFeature, createOpenStreetMapLayer, createPMTilesLayer, createPoint, createPointFeature, createPolygon, createPolygonFeature, createStyle, createTextStyle, createTianDiTuLayer, createTianDiTuUrl, createTileGrid, createVectorLayer, createVectorSource, createWebGLVectorLayer, createXYZLayer, formatAngle, formatRotation, kmToNauticalMiles, nauticalMilesToKm, olMapInjectionKey, proj4, registerEPSG_3395, useContextmenu, useDrawLineString, useDrawPolygon, useGraticule, useOlMap, usePointermove, useSwitchBaseLayer };
680
+ export { BingMapsSourceOptions, CanvasLayerOptions, CircleOptions, ContextmenuItem, ContextmenuItemBase, ContextmenuList, ContextmenuOption, ContextmenuOptionBase, ContextmenuOptions, ContextmenuPosition, CreateBingLayerOptions, CreateOpenStreetMapLayerOptions, CreateTianDiTuLayerOptions, CreateTianDiTuUrlOptions, DrawLineStringOptions, DrawPolygonOptions, EPSG_3395, EPSG_3857, EPSG_3857ExtentToEPSG_4326, EPSG_3857ToEPSG_4326, EPSG_4326, EPSG_4326ExtentToEPSG_3857, EPSG_4326ToEPSG_3857, FeatureOptions, FillOptions, GraticuleOptions, HeatmapLayerOptions, IconOptions, ImageTileSourceOptions, ONE_NM, _default as OlMap, OlMapEmits, OlMapInst, OlMapProps, OpenStreetMapSourceOptions, Option, PMTilesLayerOptions, PointermoveItem, PointermoveList, PointermovePosition, ProjectionLike, StrokeOptions, StyleOptions, T_MAP_TYPE, TextOptions, TileLayerOptions, UseContextmenuFn, UseContextmenuParams, UseContextmenuReturn, UseGraticuleOptions, UseGraticuleReturn, UsePointermoveFn, UsePointermoveOptions, UsePointermoveParams, UsePointermoveReturn, VectorLayerOptions, VectorSourceOptions, WebGLVectorLayerOptions, XYZLayerOptions, XYZ_SourceOptions, _CircleOptions, _GraticuleOptions, _StyleOptions, _TextOptions, _VectorLayerOptions, _VectorSourceOptions, _WebGLVectorLayerOptions, angleToRotation, createBingLayer, createCanvasLayer, createCircle, createCircleFeature, createCircleStyle, createFeature, createHeatmapLayer, createHeatmapLayerOptions, createLineString, createLineStringFeature, createMultiLineString, createMultiLineStringFeature, createMultiPoint, createMultiPointFeature, createMultiPolygon, createMultiPolygonFeature, createOpenStreetMapLayer, createPMTilesLayer, createPoint, createPointFeature, createPolygon, createPolygonFeature, createStyle, createTextStyle, createTianDiTuLayer, createTianDiTuUrl, createTileGrid, createVectorLayer, createVectorSource, createWebGLVectorLayer, createXYZLayer, formatAngle, formatRotation, kmToNauticalMiles, nauticalMilesToKm, olMapInjectionKey, proj4, registerEPSG_3395, rotationToAngle, useContextmenu, useDrawLineString, useDrawPolygon, useGraticule, useOlMap, usePointermove, useSwitchBaseLayer };