@antv/l7-map 2.20.3 → 2.20.6

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.
Files changed (41) hide show
  1. package/es/camera.d.ts +6 -5
  2. package/es/earthmap.d.ts +16 -13
  3. package/es/earthmap.js +1 -0
  4. package/es/geo/lng_lat_bounds.d.ts +2 -1
  5. package/es/geo/mercator.d.ts +2 -1
  6. package/es/geo/simple.d.ts +2 -1
  7. package/es/geo/transform.d.ts +1 -1
  8. package/es/handler/IHandler.d.ts +3 -3
  9. package/es/handler/blockable_map_event.d.ts +2 -2
  10. package/es/handler/box_zoom.d.ts +3 -3
  11. package/es/handler/click_zoom.d.ts +3 -3
  12. package/es/handler/events/map_mouse_event.d.ts +4 -4
  13. package/es/handler/events/map_touch_event.d.ts +3 -3
  14. package/es/handler/events/map_wheel_event.d.ts +2 -2
  15. package/es/handler/handler_inertia.d.ts +3 -3
  16. package/es/handler/handler_manager.d.ts +3 -3
  17. package/es/handler/handler_util.d.ts +1 -1
  18. package/es/handler/keyboard.d.ts +2 -2
  19. package/es/handler/map_event.d.ts +3 -3
  20. package/es/handler/mouse/mouse_handler.d.ts +1 -1
  21. package/es/handler/mouse/mousepan_handler.d.ts +1 -1
  22. package/es/handler/mouse/mousepitch_hander.d.ts +1 -1
  23. package/es/handler/mouse/mouserotate_hander.d.ts +1 -1
  24. package/es/handler/scroll_zoom.d.ts +4 -4
  25. package/es/handler/shim/dblclick_zoom.d.ts +2 -2
  26. package/es/handler/shim/drag_pan.d.ts +2 -2
  27. package/es/handler/shim/drag_rotate.d.ts +1 -1
  28. package/es/handler/shim/touch_zoom_rotate.d.ts +2 -2
  29. package/es/handler/tap/tap_drag_zoom.d.ts +1 -1
  30. package/es/handler/tap/tap_recognizer.d.ts +1 -1
  31. package/es/handler/tap/tap_zoom.d.ts +3 -3
  32. package/es/handler/touch/touch_pitch.d.ts +1 -1
  33. package/es/handler/touch/touch_rotate.d.ts +1 -1
  34. package/es/handler/touch/touch_zoom.d.ts +1 -1
  35. package/es/handler/touch/two_touch.d.ts +1 -1
  36. package/es/hash.d.ts +1 -1
  37. package/es/interface.d.ts +1 -1
  38. package/es/map.d.ts +16 -13
  39. package/es/map.js +1 -0
  40. package/es/utils/Aabb.d.ts +1 -1
  41. package/package.json +3 -3
package/es/camera.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { EventEmitter } from 'eventemitter3';
2
- import { IPaddingOptions } from './geo/edge_insets';
3
- import LngLat, { LngLatLike } from './geo/lng_lat';
4
- import { LngLatBoundsLike } from './geo/lng_lat_bounds';
5
- import { PointLike } from './geo/point';
2
+ import type { IPaddingOptions } from './geo/edge_insets';
3
+ import type { LngLatLike } from './geo/lng_lat';
4
+ import LngLat from './geo/lng_lat';
5
+ import type { LngLatBoundsLike } from './geo/lng_lat_bounds';
6
+ import type { PointLike } from './geo/point';
6
7
  import Transform from './geo/transform';
7
- import { IMapOptions } from './interface';
8
+ import type { IMapOptions } from './interface';
8
9
  type CallBack = (_: number) => void;
9
10
  export interface ICameraOptions {
10
11
  center?: LngLatLike;
package/es/earthmap.d.ts CHANGED
@@ -1,19 +1,22 @@
1
1
  import Camera from './camera';
2
2
  import './css/l7.css';
3
- import LngLat, { LngLatLike } from './geo/lng_lat';
4
- import LngLatBounds, { LngLatBoundsLike } from './geo/lng_lat_bounds';
5
- import Point, { PointLike } from './geo/point';
6
- import BoxZoomHandler from './handler/box_zoom';
3
+ import type { LngLatLike } from './geo/lng_lat';
4
+ import LngLat from './geo/lng_lat';
5
+ import type { LngLatBoundsLike } from './geo/lng_lat_bounds';
6
+ import LngLatBounds from './geo/lng_lat_bounds';
7
+ import type { PointLike } from './geo/point';
8
+ import Point from './geo/point';
9
+ import type BoxZoomHandler from './handler/box_zoom';
7
10
  import HandlerManager from './handler/handler_manager';
8
- import KeyboardHandler from './handler/keyboard';
9
- import ScrollZoomHandler from './handler/scroll_zoom';
10
- import DoubleClickZoomHandler from './handler/shim/dblclick_zoom';
11
- import DragPanHandler from './handler/shim/drag_pan';
12
- import DragRotateHandler from './handler/shim/drag_rotate';
13
- import TouchZoomRotateHandler from './handler/shim/touch_zoom_rotate';
14
- import { TouchPitchHandler } from './handler/touch';
15
- import { IMapOptions } from './interface';
16
- import { TaskID } from './utils/task_queue';
11
+ import type KeyboardHandler from './handler/keyboard';
12
+ import type ScrollZoomHandler from './handler/scroll_zoom';
13
+ import type DoubleClickZoomHandler from './handler/shim/dblclick_zoom';
14
+ import type DragPanHandler from './handler/shim/drag_pan';
15
+ import type DragRotateHandler from './handler/shim/drag_rotate';
16
+ import type TouchZoomRotateHandler from './handler/shim/touch_zoom_rotate';
17
+ import type { TouchPitchHandler } from './handler/touch';
18
+ import type { IMapOptions } from './interface';
19
+ import type { TaskID } from './utils/task_queue';
17
20
  type CallBack = (_: number) => void;
18
21
  export declare class EarthMap extends Camera {
19
22
  doubleClickZoom: DoubleClickZoomHandler;
package/es/earthmap.js CHANGED
@@ -43,6 +43,7 @@ loadStyles(".l7-map {\n font: 12px/20px 'Helvetica Neue', Arial, Helvetica, san
43
43
  import LngLat from "./geo/lng_lat";
44
44
  import LngLatBounds from "./geo/lng_lat_bounds";
45
45
  // @ts-ignore
46
+
46
47
  import Point from "./geo/point";
47
48
  import HandlerManager from "./handler/handler_manager";
48
49
  import { renderframe } from "./util";
@@ -1,4 +1,5 @@
1
- import LngLat, { LngLatLike } from './lng_lat';
1
+ import type { LngLatLike } from './lng_lat';
2
+ import LngLat from './lng_lat';
2
3
  export type LngLatBoundsLike = LngLatBounds | [LngLatLike, LngLatLike] | [number, number, number, number];
3
4
  export default class LngLatBounds {
4
5
  static convert(input: LngLatBoundsLike): LngLatBounds;
@@ -1,4 +1,5 @@
1
- import LngLat, { LngLatLike } from '../geo/lng_lat';
1
+ import type { LngLatLike } from '../geo/lng_lat';
2
+ import LngLat from '../geo/lng_lat';
2
3
  export declare function mercatorXfromLng(lng: number): number;
3
4
  export declare function mercatorYfromLat(lat: number): number;
4
5
  export declare function mercatorZfromAltitude(altitude: number, lat: number): number;
@@ -1,4 +1,5 @@
1
- import LngLat, { LngLatLike } from '../geo/lng_lat';
1
+ import type { LngLatLike } from '../geo/lng_lat';
2
+ import LngLat from '../geo/lng_lat';
2
3
  export declare function circumferenceAtLatitude(latitude: number): number;
3
4
  export declare function mercatorXfromLng(lng: number): number;
4
5
  export declare function mercatorYfromLat(lat: number): number;
@@ -1,6 +1,6 @@
1
1
  import { mat2, mat4 } from 'gl-matrix';
2
2
  import Point from '../geo/point';
3
- import { IPaddingOptions } from './edge_insets';
3
+ import type { IPaddingOptions } from './edge_insets';
4
4
  import LngLat from './lng_lat';
5
5
  import LngLatBounds from './lng_lat_bounds';
6
6
  import MercatorCoordinate from './mercator';
@@ -1,6 +1,6 @@
1
- import { EarthMap } from '../earthmap';
2
- import Point from '../geo/point';
3
- import { Map } from '../map';
1
+ import type { EarthMap } from '../earthmap';
2
+ import type Point from '../geo/point';
3
+ import type { Map } from '../map';
4
4
  export interface IHandlerResult {
5
5
  panDelta?: Point;
6
6
  zoomDelta?: number;
@@ -1,5 +1,5 @@
1
- import { EarthMap } from '../earthmap';
2
- import { Map } from '../map';
1
+ import type { EarthMap } from '../earthmap';
2
+ import type { Map } from '../map';
3
3
  export default class BlockableMapEventHandler {
4
4
  private map;
5
5
  private delayContextMenu;
@@ -1,6 +1,6 @@
1
- import { EarthMap } from '../earthmap';
2
- import Point from '../geo/point';
3
- import { Map } from '../map';
1
+ import type { EarthMap } from '../earthmap';
2
+ import type Point from '../geo/point';
3
+ import type { Map } from '../map';
4
4
  /**
5
5
  * The `BoxZoomHandler` allows the user to zoom the map to fit within a bounding box.
6
6
  * The bounding box is defined by clicking and holding `shift` while dragging the cursor.
@@ -1,6 +1,6 @@
1
- import { EarthMap } from '../earthmap';
2
- import Point from '../geo/point';
3
- import { Map } from '../map';
1
+ import type { EarthMap } from '../earthmap';
2
+ import type Point from '../geo/point';
3
+ import type { Map } from '../map';
4
4
  export default class ClickZoomHandler {
5
5
  private enabled;
6
6
  private active;
@@ -1,7 +1,7 @@
1
- import { EarthMap } from '../../earthmap';
2
- import LngLat from '../../geo/lng_lat';
3
- import Point from '../../geo/point';
4
- import { Map } from '../../map';
1
+ import type { EarthMap } from '../../earthmap';
2
+ import type LngLat from '../../geo/lng_lat';
3
+ import type Point from '../../geo/point';
4
+ import type { Map } from '../../map';
5
5
  import { Event } from './event';
6
6
  export default class MapMouseEvent extends Event {
7
7
  /**
@@ -1,7 +1,7 @@
1
- import { EarthMap } from '../../earthmap';
2
- import LngLat from '../../geo/lng_lat';
1
+ import type { EarthMap } from '../../earthmap';
2
+ import type LngLat from '../../geo/lng_lat';
3
3
  import Point from '../../geo/point';
4
- import { Map } from '../../map';
4
+ import type { Map } from '../../map';
5
5
  import { Event } from './event';
6
6
  export default class MapTouchEvent extends Event {
7
7
  /**
@@ -1,5 +1,5 @@
1
- import { EarthMap } from '../../earthmap';
2
- import { Map } from '../../map';
1
+ import type { EarthMap } from '../../earthmap';
2
+ import type { Map } from '../../map';
3
3
  import { Event } from './event';
4
4
  export interface IMapBoxZoomEvent {
5
5
  type: 'boxzoomstart' | 'boxzoomend' | 'boxzoomcancel';
@@ -1,6 +1,6 @@
1
- import { EarthMap } from '../earthmap';
2
- import { Map } from '../map';
3
- import { IDragPanOptions } from './shim/drag_pan';
1
+ import type { EarthMap } from '../earthmap';
2
+ import type { Map } from '../map';
3
+ import type { IDragPanOptions } from './shim/drag_pan';
4
4
  export interface IInertiaOptions {
5
5
  linearity: number;
6
6
  easing: (t: number) => number;
@@ -1,6 +1,6 @@
1
- import { EarthMap } from '../earthmap';
2
- import { Map } from '../map';
3
- import { IHandlerResult } from './IHandler';
1
+ import type { EarthMap } from '../earthmap';
2
+ import type { Map } from '../map';
3
+ import type { IHandlerResult } from './IHandler';
4
4
  import RenderFrameEvent from './events/render_event';
5
5
  export type InputEvent = MouseEvent | TouchEvent | KeyboardEvent | WheelEvent;
6
6
  export interface IHandlerOptions {
@@ -1,4 +1,4 @@
1
- import Point from '../geo/point';
1
+ import type Point from '../geo/point';
2
2
  export declare function indexTouches(touches: Touch[], points: Point[]): {
3
3
  [key: string]: any;
4
4
  };
@@ -1,5 +1,5 @@
1
- import { EarthMap } from '../earthmap';
2
- import { Map } from '../map';
1
+ import type { EarthMap } from '../earthmap';
2
+ import type { Map } from '../map';
3
3
  /**
4
4
  * The `KeyboardHandler` allows the user to zoom, rotate, and pan the map using
5
5
  * the following keyboard shortcuts:
@@ -1,6 +1,6 @@
1
- import { EarthMap } from '../earthmap';
2
- import Point from '../geo/point';
3
- import { Map } from '../map';
1
+ import type { EarthMap } from '../earthmap';
2
+ import type Point from '../geo/point';
3
+ import type { Map } from '../map';
4
4
  import { MapMouseEvent, MapTouchEvent, MapWheelEvent } from './events';
5
5
  export default class MapEventHandler {
6
6
  private mousedownPos;
@@ -1,4 +1,4 @@
1
- import Point from '../../geo/point';
1
+ import type Point from '../../geo/point';
2
2
  export default class MouseHandler {
3
3
  protected enabled: boolean;
4
4
  protected active: boolean;
@@ -1,4 +1,4 @@
1
- import Point from '../../geo/point';
1
+ import type Point from '../../geo/point';
2
2
  import MouseHandler from './mouse_handler';
3
3
  export default class MousePanHandler extends MouseHandler {
4
4
  mousedown(e: MouseEvent, point: Point): void;
@@ -1,4 +1,4 @@
1
- import Point from '../../geo/point';
1
+ import type Point from '../../geo/point';
2
2
  import MouseHandler from './mouse_handler';
3
3
  export default class MousePitchHandler extends MouseHandler {
4
4
  correctButton(e: MouseEvent, button: number): boolean;
@@ -1,4 +1,4 @@
1
- import Point from '../../geo/point';
1
+ import type Point from '../../geo/point';
2
2
  import MouseHandler from './mouse_handler';
3
3
  export default class MouseRotateHandler extends MouseHandler {
4
4
  contextmenu(e: MouseEvent): void;
@@ -1,7 +1,7 @@
1
- import { EarthMap } from '../earthmap';
2
- import Point from '../geo/point';
3
- import { Map } from '../map';
4
- import HandlerManager from './handler_manager';
1
+ import type { EarthMap } from '../earthmap';
2
+ import type Point from '../geo/point';
3
+ import type { Map } from '../map';
4
+ import type HandlerManager from './handler_manager';
5
5
  /**
6
6
  * The `ScrollZoomHandler` allows the user to zoom the map by scrolling.
7
7
  */
@@ -1,5 +1,5 @@
1
- import ClickZoomHandler from '../click_zoom';
2
- import TapZoomHandler from '../tap/tap_zoom';
1
+ import type ClickZoomHandler from '../click_zoom';
2
+ import type TapZoomHandler from '../tap/tap_zoom';
3
3
  /**
4
4
  * The `DoubleClickZoomHandler` allows the user to zoom the map at a point by
5
5
  * double clicking or double tapping.
@@ -1,5 +1,5 @@
1
- import { MousePanHandler } from '../mouse/';
2
- import { TouchPanHandler } from '../touch/';
1
+ import type { MousePanHandler } from '../mouse/';
2
+ import type { TouchPanHandler } from '../touch/';
3
3
  export interface IDragPanOptions {
4
4
  linearity?: number;
5
5
  easing?: (t: number) => number;
@@ -1,4 +1,4 @@
1
- import { MousePitchHandler, MouseRotateHandler } from '../mouse';
1
+ import type { MousePitchHandler, MouseRotateHandler } from '../mouse';
2
2
  /**
3
3
  * The `DragRotateHandler` allows the user to rotate the map by clicking and
4
4
  * dragging the cursor while holding the right mouse button or `ctrl` key.
@@ -1,5 +1,5 @@
1
- import TapDragZoomHandler from '../tap/tap_drag_zoom';
2
- import { TouchRotateHandler, TouchZoomHandler } from '../touch';
1
+ import type TapDragZoomHandler from '../tap/tap_drag_zoom';
2
+ import type { TouchRotateHandler, TouchZoomHandler } from '../touch';
3
3
  /**
4
4
  * The `TouchZoomRotateHandler` allows the user to zoom and rotate the map by
5
5
  * pinching on a touchscreen.
@@ -1,4 +1,4 @@
1
- import Point from '../../geo/point';
1
+ import type Point from '../../geo/point';
2
2
  import TapRecognizer from './tap_recognizer';
3
3
  export default class TapDragZoomHandler {
4
4
  enabled: boolean;
@@ -1,4 +1,4 @@
1
- import Point from '../../geo/point';
1
+ import type Point from '../../geo/point';
2
2
  import SingleTapRecognizer from './single_tap_recognizer';
3
3
  export default class TapRecognizer {
4
4
  singleTap: SingleTapRecognizer;
@@ -1,6 +1,6 @@
1
- import { EarthMap } from '../../earthmap';
2
- import Point from '../../geo/point';
3
- import { Map } from '../../map';
1
+ import type { EarthMap } from '../../earthmap';
2
+ import type Point from '../../geo/point';
3
+ import type { Map } from '../../map';
4
4
  import TapRecognizer from './tap_recognizer';
5
5
  export default class TapZoomHandler {
6
6
  enabled: boolean;
@@ -1,4 +1,4 @@
1
- import Point from '../../geo/point';
1
+ import type Point from '../../geo/point';
2
2
  import TwoTouchHandler from './two_touch';
3
3
  export default class TouchPitchHandler extends TwoTouchHandler {
4
4
  valid: boolean | void;
@@ -1,4 +1,4 @@
1
- import Point from '../../geo/point';
1
+ import type Point from '../../geo/point';
2
2
  import TwoTouchHandler from './two_touch';
3
3
  export default class TouchRotateHandler extends TwoTouchHandler {
4
4
  private minDiameter;
@@ -1,4 +1,4 @@
1
- import Point from '../../geo/point';
1
+ import type Point from '../../geo/point';
2
2
  import TwoTouchHandler from './two_touch';
3
3
  export default class TouchZoomHandler extends TwoTouchHandler {
4
4
  private distance;
@@ -1,4 +1,4 @@
1
- import Point from '../../geo/point';
1
+ import type Point from '../../geo/point';
2
2
  export default class TwoTouchHandler {
3
3
  protected enabled: boolean;
4
4
  protected active: boolean;
package/es/hash.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Map } from './map';
1
+ import type { Map } from './map';
2
2
  declare class Hash {
3
3
  private map;
4
4
  private updateHash;
package/es/interface.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { LngLatBoundsLike } from './geo/lng_lat_bounds';
1
+ import type { LngLatBoundsLike } from './geo/lng_lat_bounds';
2
2
  export interface IMapOptions {
3
3
  hash: boolean;
4
4
  style?: any;
package/es/map.d.ts CHANGED
@@ -1,19 +1,22 @@
1
1
  import Camera from './camera';
2
2
  import './css/l7.css';
3
- import LngLat, { LngLatLike } from './geo/lng_lat';
4
- import LngLatBounds, { LngLatBoundsLike } from './geo/lng_lat_bounds';
5
- import Point, { PointLike } from './geo/point';
6
- import BoxZoomHandler from './handler/box_zoom';
3
+ import type { LngLatLike } from './geo/lng_lat';
4
+ import LngLat from './geo/lng_lat';
5
+ import type { LngLatBoundsLike } from './geo/lng_lat_bounds';
6
+ import LngLatBounds from './geo/lng_lat_bounds';
7
+ import type { PointLike } from './geo/point';
8
+ import Point from './geo/point';
9
+ import type BoxZoomHandler from './handler/box_zoom';
7
10
  import HandlerManager from './handler/handler_manager';
8
- import KeyboardHandler from './handler/keyboard';
9
- import ScrollZoomHandler from './handler/scroll_zoom';
10
- import DoubleClickZoomHandler from './handler/shim/dblclick_zoom';
11
- import DragPanHandler from './handler/shim/drag_pan';
12
- import DragRotateHandler from './handler/shim/drag_rotate';
13
- import TouchZoomRotateHandler from './handler/shim/touch_zoom_rotate';
14
- import { TouchPitchHandler } from './handler/touch';
15
- import { IMapOptions } from './interface';
16
- import { TaskID } from './utils/task_queue';
11
+ import type KeyboardHandler from './handler/keyboard';
12
+ import type ScrollZoomHandler from './handler/scroll_zoom';
13
+ import type DoubleClickZoomHandler from './handler/shim/dblclick_zoom';
14
+ import type DragPanHandler from './handler/shim/drag_pan';
15
+ import type DragRotateHandler from './handler/shim/drag_rotate';
16
+ import type TouchZoomRotateHandler from './handler/shim/touch_zoom_rotate';
17
+ import type { TouchPitchHandler } from './handler/touch';
18
+ import type { IMapOptions } from './interface';
19
+ import type { TaskID } from './utils/task_queue';
17
20
  type CallBack = (_: number) => void;
18
21
  export declare class Map extends Camera {
19
22
  doubleClickZoom: DoubleClickZoomHandler;
package/es/map.js CHANGED
@@ -44,6 +44,7 @@ loadStyles(".l7-map {\n font: 12px/20px 'Helvetica Neue', Arial, Helvetica, san
44
44
  import LngLat from "./geo/lng_lat";
45
45
  import LngLatBounds from "./geo/lng_lat_bounds";
46
46
  // @ts-ignore
47
+
47
48
  import Point from "./geo/point";
48
49
  import HandlerManager from "./handler/handler_manager";
49
50
  import Hash from "./hash";
@@ -1,5 +1,5 @@
1
1
  import { vec3 } from 'gl-matrix';
2
- import Frustum from './primitives';
2
+ import type Frustum from './primitives';
3
3
  export default class Aabb {
4
4
  min: vec3;
5
5
  max: vec3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-map",
3
- "version": "2.20.3",
3
+ "version": "2.20.6",
4
4
  "description": "l7 map",
5
5
  "keywords": [],
6
6
  "author": "thinkinggis <lzx199065@gmail.com>",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "homepage": "https://github.com/antvis/L7#readme",
42
42
  "dependencies": {
43
- "@antv/l7-utils": "2.20.3",
43
+ "@antv/l7-utils": "2.20.6",
44
44
  "@babel/runtime": "^7.7.7",
45
45
  "@mapbox/point-geometry": "^0.1.0",
46
46
  "@mapbox/unitbezier": "^0.0.0",
@@ -48,5 +48,5 @@
48
48
  "gl-matrix": "^3.1.0",
49
49
  "lodash-es": "^4.17.21"
50
50
  },
51
- "gitHead": "c9f82837e7f8a6f661bce8dee94e794d3cec89c7"
51
+ "gitHead": "b5af1f23f8f5524cbbb2ea858399fefba63b0163"
52
52
  }