tg-map-vue3 3.4.0 → 3.4.2

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 ADDED
@@ -0,0 +1,37 @@
1
+ # 更新日志
2
+
3
+ ## 3.4.x
4
+
5
+ - feat: 添加矩形[TgRectangle]
6
+ - feat: 点/圆/矩形/多边形/多段线 在`editable`/`draggable`模式时支持双向绑定
7
+ - ***BREAKING CHANGE***: [TgPolygon].polygon, [TgPolyline].polyline 属性, 统一改成`overlay`
8
+
9
+ ## 3.3.x
10
+
11
+ - fix: 修复同时修改center和zoom可能中心点偏移的问题
12
+ - feat: [Icon]支持缩放
13
+ - ***BREAKING CHANGE***: [TgMap]的高度默认改成`100%`
14
+
15
+ ## 3.2.x
16
+
17
+ - fix: 修复google和baidu的zoom取值不一致的问题
18
+ - feat: 支持[SymbolIcon]
19
+ - feat: 支持[PlacesService], [Autocomplete], [SearchBox]
20
+
21
+ ## 3.1.x
22
+
23
+ - feat: 支持隐藏地图Logo
24
+
25
+ ## 3.0.x
26
+
27
+ - ***BREAKING CHANGE***: 迁移到Vue3
28
+
29
+ [TgMap]: src/components/TgMap.vue
30
+ [TgRectangle]: src/components/overlays/TgRectangle.vue
31
+ [TgPolygon]: src/components/overlays/TgPolygon.vue
32
+ [TgPolyline]: src/components/overlays/TgPolyline.vue
33
+ [Icon]: src/map/map/overlay/icon.ts#L18 "图标"
34
+ [SymbolIcon]: src/map/map/overlay/icon.ts#L55 "Svg图标"
35
+ [PlacesService]: src/map/map/extra/places-service.ts "位置服务"
36
+ [Autocomplete]: src/map/map/extra/autocomplete.ts "自动完成"
37
+ [SearchBox]: src/map/map/extra/search-box.ts "搜索框"
@@ -1,10 +1,27 @@
1
1
  /// <reference types="heremaps" />
2
- import { CoordType, LatLng } from '../lat-lng';
2
+ import { CoordType, LatLng, LatLngBounds } from '../lat-lng';
3
+ import type { Padding, Point } from '../types';
4
+ import type { CustomControl } from './controls/control';
5
+ import type { MapTypeControl, MapTypeControlOptions } from './controls/map-type.control';
6
+ import type { ScaleControlOptions } from './controls/scale.control';
7
+ import type { ZoomControl, ZoomControlOptions } from './controls/zoom.control';
3
8
  import type { Autocomplete, AutocompleteOptions } from './extra/autocomplete';
9
+ import type { MarkerClusterer, MarkerClustererOptions } from './extra/marker-clusterer';
4
10
  import type { PlaceServiceOptions, PlacesService } from './extra/places-service';
5
11
  import type { SearchBox, SearchBoxOptions } from './extra/search-box';
6
12
  import { AbstractMap } from './map';
7
- import type { MapOptions } from './map-options';
13
+ import type { GestureHandlingOptions, MapOptions, MapStyle } from './map-options';
14
+ import type { BuildInMapTypeId, Layer, MapType } from './map-type';
15
+ import type { CircleOptions, CircleOverlay } from './overlay/circle';
16
+ import type { ElementOverlay } from './overlay/element-overlay';
17
+ import type { InfoBoxOptions, InfoBoxOverlay } from './overlay/info-box';
18
+ import type { InfoWindowOptions, InfoWindowOverlay } from './overlay/info-window';
19
+ import type { LabelOptions, LabelOverlay } from './overlay/label';
20
+ import type { MarkerOptions, MarkerOverlay } from './overlay/marker';
21
+ import type { Overlay } from './overlay/overlay';
22
+ import type { PolygonOptions, PolygonOverlay } from './overlay/polygon';
23
+ import type { PolylineOptions, PolylineOverlay } from './overlay/polyline';
24
+ import type { RectangleOptions, RectangleOverlay } from './overlay/rectangle';
8
25
  export declare class HereMap extends AbstractMap {
9
26
  mapOptions: MapOptions;
10
27
  setDefaultCursor(cursor: string): void;
@@ -15,42 +32,42 @@ export declare class HereMap extends AbstractMap {
15
32
  get coordType(): CoordType;
16
33
  getCenter(): LatLng;
17
34
  setCenter(latlng: LatLng): void;
35
+ setGestureHandling(gestureHandling: GestureHandlingOptions): void;
36
+ fromContainerPointToLatLng(point: Point): LatLng;
37
+ fromLatLngToContainerPoint(latLng: LatLng): Point;
18
38
  setDraggable(draggable: boolean): void;
19
39
  setDisableDoubleClickZoom(type: boolean): void;
20
- fromContainerPointToLatLng(point: import('../types').Point): LatLng;
21
- fromLatLngToContainerPoint(latLng: LatLng): import('../types').Point;
22
- addElementOverlay(overlay: import('./overlay/element-overlay').ElementOverlay): void;
23
- removeElementOverlay(overlay: import('./overlay/element-overlay').ElementOverlay): void;
24
- createInfoBox(options: import('./overlay/info-box').InfoBoxOptions): import('./overlay/info-box').InfoBoxOverlay;
25
- createLabel(options: import('./overlay/label').LabelOptions): import('./overlay/label').LabelOverlay;
26
- fitBounds(bounds: import('../lat-lng').LatLngBounds, padding?: import('../types').Padding): void;
27
- getBounds(): import('../lat-lng').LatLngBounds;
28
- panTo(position: LatLng): void;
29
- panBy(x: number, y: number): void;
30
- setBuildInMapTypeId(id: import('./map-type').BuildInMapTypeId): void;
31
- setMapType(mapType: import('./map-type').MapType): void;
32
- getMapType(): import('./map-type').MapType;
33
- addLayer(layer: import('./map-type').Layer): void;
34
- removeLayer(layer: import('./map-type').Layer): void;
35
- setGestureHandling(gestureHandling: import('./map-options').GestureHandlingOptions): void;
36
40
  setMinZoom(zoom: number): void;
37
41
  setMaxZoom(zoom: number): void;
38
- setMapStyle(mapStyle: import('./map-options').MapStyle): void;
39
- addOverlay(overlay: import('./overlay/overlay').Overlay<unknown>): void;
40
- removeOverlay(overlay: import('./overlay/overlay').Overlay<unknown>): void;
41
- createMarker(options: import('./overlay/marker').MarkerOptions): import('./overlay/marker').MarkerOverlay;
42
- createMarkerClusterer(options: import('./extra/marker-clusterer').MarkerClustererOptions): import('./extra/marker-clusterer').MarkerClusterer;
43
- createInfoWindow(options: import('./overlay/info-window').InfoWindowOptions): import('./overlay/info-window').InfoWindowOverlay;
44
- createPolyline(options: import('./overlay/polyline').PolylineOptions): import('./overlay/polyline').PolylineOverlay;
45
- createPolygon(options: import('./overlay/polygon').PolygonOptions): import('./overlay/polygon').PolygonOverlay;
46
- createRectangle(options: import('./overlay/rectangle').RectangleOptions): import('./overlay/rectangle').RectangleOverlay;
47
- createCircle(options: import('./overlay/circle').CircleOptions): import('./overlay/circle').CircleOverlay;
48
- addCustomControl(control: import('./controls/control').CustomControl): void;
49
- removeCustomControl(control: import('./controls/control').CustomControl): void;
50
- createMapTypeControl(options: import('./controls/map-type.control').MapTypeControlOptions): import('./controls/map-type.control').MapTypeControl;
51
- createZoomControl(options: import('./controls/zoom.control').ZoomControlOptions): import('./controls/zoom.control').ZoomControl;
52
- createScaleControl(options: import('./controls/scale.control').ScaleControlOptions): import('./controls/zoom.control').ZoomControl;
42
+ setMapStyle(mapStyle: MapStyle): void;
43
+ setBuildInMapTypeId(id: BuildInMapTypeId): void;
44
+ setMapType(mapType: MapType): void;
45
+ getMapType(): MapType;
46
+ addLayer(layer: Layer): void;
47
+ removeLayer(layer: Layer): void;
48
+ panTo(position: LatLng): void;
49
+ panBy(x: number, y: number): void;
50
+ fitBounds(bounds: LatLngBounds, padding?: Padding | undefined): void;
51
+ getBounds(): LatLngBounds;
52
+ addElementOverlay(overlay: ElementOverlay): void;
53
+ removeElementOverlay(overlay: ElementOverlay): void;
54
+ addOverlay(overlay: Overlay<unknown>): void;
55
+ removeOverlay(overlay: Overlay<unknown>): void;
56
+ createMarker(options: MarkerOptions): MarkerOverlay;
57
+ createMarkerClusterer(options: MarkerClustererOptions): MarkerClusterer;
53
58
  createAutocomplete(options: AutocompleteOptions): Autocomplete;
54
59
  createSearchBox(options: SearchBoxOptions): SearchBox;
55
60
  createPlaceService(options: PlaceServiceOptions): PlacesService;
61
+ createInfoWindow(options: InfoWindowOptions): InfoWindowOverlay;
62
+ createInfoBox(options: InfoBoxOptions): InfoBoxOverlay;
63
+ createPolyline(options: PolylineOptions): PolylineOverlay;
64
+ createPolygon(options: PolygonOptions): PolygonOverlay;
65
+ createRectangle(options: RectangleOptions): RectangleOverlay;
66
+ createCircle(options: CircleOptions): CircleOverlay;
67
+ createLabel(options: LabelOptions): LabelOverlay;
68
+ addCustomControl(control: CustomControl): void;
69
+ removeCustomControl(control: CustomControl): void;
70
+ createMapTypeControl(options: MapTypeControlOptions): MapTypeControl;
71
+ createZoomControl(options: ZoomControlOptions): ZoomControl;
72
+ createScaleControl(options: ScaleControlOptions): ZoomControl;
56
73
  }
@@ -12,9 +12,7 @@ export declare function createBaiduInfoBox(content: HTMLElement, position?: BMap
12
12
  content: HTMLElement;
13
13
  position: BMap.Point;
14
14
  offset: Point;
15
- /** @override */
16
15
  initialize(map: BMap.Map): HTMLElement;
17
- /** @override */
18
16
  draw(): void;
19
17
  open(map: BMap.Map, anchor?: BMarker | undefined): void;
20
18
  attachMarker(marker: BMarker): void;
@@ -53,9 +51,7 @@ declare function createBaiduInfoBoxClass(): {
53
51
  content: HTMLElement;
54
52
  position: BMap.Point;
55
53
  offset: Point;
56
- /** @override */
57
54
  initialize(map: BMap.Map): HTMLElement;
58
- /** @override */
59
55
  draw(): void;
60
56
  open(map: BMap.Map, anchor?: BMarker): void;
61
57
  attachMarker(marker: BMarker): void;
@@ -9,11 +9,8 @@ export declare function createGoogleLabel(element: HTMLElement, position: Nullab
9
9
  zIndex?: number | undefined;
10
10
  setZIndex(zIndex: number): void;
11
11
  setElement(element: HTMLElement): void;
12
- /** @override */
13
12
  onAdd(): void;
14
- /** @override */
15
13
  draw(): void;
16
- /** @override */
17
14
  onRemove(): void;
18
15
  setPosition(position: Nullable<google.maps.LatLng>): void;
19
16
  getPosition(): Nullable<google.maps.LatLng>;
@@ -43,11 +40,8 @@ declare function createGoogleLabelClass(): {
43
40
  zIndex?: number;
44
41
  setZIndex(zIndex: number): void;
45
42
  setElement(element: HTMLElement): void;
46
- /** @override */
47
43
  onAdd(): void;
48
- /** @override */
49
44
  draw(): void;
50
- /** @override */
51
45
  onRemove(): void;
52
46
  setPosition(position: Nullable<google.maps.LatLng>): void;
53
47
  getPosition(): Nullable<google.maps.LatLng>;