@mint-ui/map 0.5.0-beta → 0.5.2-beta

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 (66) hide show
  1. package/.eslintrc.js +109 -109
  2. package/LICENSE +21 -21
  3. package/README.md +73 -73
  4. package/dist/components/mint-map/MintMap.d.ts +10 -10
  5. package/dist/components/mint-map/MintMap.js +6 -6
  6. package/dist/components/mint-map/core/MintMapCanvasRenderer.d.ts +4 -4
  7. package/dist/components/mint-map/core/MintMapController.d.ts +64 -64
  8. package/dist/components/mint-map/core/MintMapController.js +9 -9
  9. package/dist/components/mint-map/core/MintMapCore.d.ts +3 -3
  10. package/dist/components/mint-map/core/advanced/MapBuildingProjection.d.ts +15 -15
  11. package/dist/components/mint-map/core/advanced/MapLoadingComponents.d.ts +17 -17
  12. package/dist/components/mint-map/core/advanced/index.d.ts +3 -3
  13. package/dist/components/mint-map/core/advanced/shapes/CircleMarker.d.ts +20 -20
  14. package/dist/components/mint-map/core/advanced/shapes/CircleMarker.js +6 -6
  15. package/dist/components/mint-map/core/advanced/shapes/PolygonMarker.d.ts +23 -23
  16. package/dist/components/mint-map/core/advanced/shapes/PolygonMarker.js +6 -6
  17. package/dist/components/mint-map/core/advanced/shapes/base/SVGCircle.d.ts +8 -8
  18. package/dist/components/mint-map/core/advanced/shapes/base/SVGCircle.js +4 -4
  19. package/dist/components/mint-map/core/advanced/shapes/base/SVGPolygon.d.ts +12 -12
  20. package/dist/components/mint-map/core/advanced/shapes/base/SVGRect.d.ts +10 -10
  21. package/dist/components/mint-map/core/advanced/shapes/base/index.d.ts +3 -3
  22. package/dist/components/mint-map/core/advanced/shapes/index.d.ts +3 -3
  23. package/dist/components/mint-map/core/hooks/MarkerMovingHook.d.ts +6 -6
  24. package/dist/components/mint-map/core/hooks/index.d.ts +1 -1
  25. package/dist/components/mint-map/core/index.d.ts +8 -8
  26. package/dist/components/mint-map/core/provider/MintMapProvider.d.ts +8 -8
  27. package/dist/components/mint-map/core/provider/index.d.ts +1 -1
  28. package/dist/components/mint-map/core/util/animation.d.ts +16 -16
  29. package/dist/components/mint-map/core/util/calculate.d.ts +66 -66
  30. package/dist/components/mint-map/core/util/cluster.d.ts +18 -18
  31. package/dist/components/mint-map/core/util/index.d.ts +4 -4
  32. package/dist/components/mint-map/core/util/waiting.d.ts +1 -1
  33. package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.d.ts +27 -27
  34. package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.js +6 -6
  35. package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.d.ts +11 -11
  36. package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.js +6 -6
  37. package/dist/components/mint-map/core/wrapper/MapControlWrapper.d.ts +18 -18
  38. package/dist/components/mint-map/core/wrapper/MapControlWrapper.js +6 -6
  39. package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.d.ts +32 -32
  40. package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.js +6 -6
  41. package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.d.ts +12 -12
  42. package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.js +6 -6
  43. package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.d.ts +12 -12
  44. package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.js +6 -6
  45. package/dist/components/mint-map/core/wrapper/index.d.ts +6 -6
  46. package/dist/components/mint-map/google/GoogleMintMapController.d.ts +51 -51
  47. package/dist/components/mint-map/google/GoogleMintMapController.js +2 -2
  48. package/dist/components/mint-map/index.d.ts +5 -5
  49. package/dist/components/mint-map/kakao/KakaoMintMapController.d.ts +56 -56
  50. package/dist/components/mint-map/kakao/KakaoMintMapController.js +11 -8
  51. package/dist/components/mint-map/naver/NaverMintMapController.d.ts +53 -53
  52. package/dist/components/mint-map/naver/NaverMintMapController.js +10 -7
  53. package/dist/components/mint-map/types/CommonTypes.d.ts +11 -11
  54. package/dist/components/mint-map/types/MapDrawables.d.ts +110 -110
  55. package/dist/components/mint-map/types/MapDrawables.js +8 -8
  56. package/dist/components/mint-map/types/MapEventTypes.d.ts +44 -41
  57. package/dist/components/mint-map/types/MapEventTypes.js +2 -0
  58. package/dist/components/mint-map/types/MapTypes.d.ts +60 -60
  59. package/dist/components/mint-map/types/MapTypes.js +13 -13
  60. package/dist/components/mint-map/types/MintMapEvents.d.ts +25 -25
  61. package/dist/components/mint-map/types/MintMapProps.d.ts +92 -92
  62. package/dist/components/mint-map/types/index.d.ts +6 -6
  63. package/dist/index.d.ts +7 -7
  64. package/dist/index.es.js +113 -105
  65. package/dist/index.umd.js +113 -105
  66. package/package.json +77 -77
@@ -1,15 +1,15 @@
1
- /// <reference types="react" />
2
- import { Position } from "../../types/MapTypes";
3
- interface MapBuildingProjectionProps {
4
- basePolygonPath: Position[];
5
- numberOfFloor: number;
6
- heightOfFloor?: number;
7
- lineColor?: string;
8
- lineOpacity?: number;
9
- fillColor?: string;
10
- fillOpacity?: number;
11
- title?: string;
12
- titleElement?: JSX.Element;
13
- }
14
- export declare function MapBuildingProjection(props: MapBuildingProjectionProps): JSX.Element;
15
- export {};
1
+ /// <reference types="react" />
2
+ import { Position } from "../../types/MapTypes";
3
+ interface MapBuildingProjectionProps {
4
+ basePolygonPath: Position[];
5
+ numberOfFloor: number;
6
+ heightOfFloor?: number;
7
+ lineColor?: string;
8
+ lineOpacity?: number;
9
+ fillColor?: string;
10
+ fillOpacity?: number;
11
+ title?: string;
12
+ titleElement?: JSX.Element;
13
+ }
14
+ export declare function MapBuildingProjection(props: MapBuildingProjectionProps): JSX.Element;
15
+ export {};
@@ -1,17 +1,17 @@
1
- /// <reference types="react" />
2
- /**
3
- * 유틸 컴포넌트 : 텍스트 로딩
4
- */
5
- export interface PointLoadingProps {
6
- text?: string;
7
- pointCount?: number;
8
- speedMs?: number;
9
- }
10
- export declare function PointLoading({ text, pointCount, speedMs }: PointLoadingProps): JSX.Element;
11
- export declare function MapLoadingWithImage({ size }: MapImageLoadingProps): JSX.Element;
12
- interface MapImageLoadingProps {
13
- size?: number;
14
- duration?: number;
15
- delay?: number;
16
- }
17
- export {};
1
+ /// <reference types="react" />
2
+ /**
3
+ * 유틸 컴포넌트 : 텍스트 로딩
4
+ */
5
+ export interface PointLoadingProps {
6
+ text?: string;
7
+ pointCount?: number;
8
+ speedMs?: number;
9
+ }
10
+ export declare function PointLoading({ text, pointCount, speedMs }: PointLoadingProps): JSX.Element;
11
+ export declare function MapLoadingWithImage({ size }: MapImageLoadingProps): JSX.Element;
12
+ interface MapImageLoadingProps {
13
+ size?: number;
14
+ duration?: number;
15
+ delay?: number;
16
+ }
17
+ export {};
@@ -1,3 +1,3 @@
1
- export * from './shapes';
2
- export * from './MapBuildingProjection';
3
- export * from './MapLoadingComponents';
1
+ export * from './shapes';
2
+ export * from './MapBuildingProjection';
3
+ export * from './MapLoadingComponents';
@@ -1,20 +1,20 @@
1
- import React, { PropsWithChildren } from "react";
2
- import { Position } from "../../../types";
3
- export interface CircleMarkerProps {
4
- center: Position;
5
- radius: number;
6
- radiusUnit?: 'PIXEL' | 'METER';
7
- background?: string;
8
- visible?: boolean;
9
- zIndex?: number;
10
- svgProperties?: React.SVGProps<SVGSVGElement>;
11
- shapeProperties?: React.SVGProps<SVGCircleElement>;
12
- }
13
- /**
14
- * CircleMarker
15
- *
16
- * @param {CircleMarkerProps} CircleMarkerProps
17
- *
18
- * @returns {JSX.Element} JSX
19
- */
20
- export declare function CircleMarker({ children, center, radius, radiusUnit, background, svgProperties, shapeProperties, visible, zIndex, }: PropsWithChildren<CircleMarkerProps>): JSX.Element;
1
+ import React, { PropsWithChildren } from "react";
2
+ import { Position } from "../../../types";
3
+ export interface CircleMarkerProps {
4
+ center: Position;
5
+ radius: number;
6
+ radiusUnit?: 'PIXEL' | 'METER';
7
+ background?: string;
8
+ visible?: boolean;
9
+ zIndex?: number;
10
+ svgProperties?: React.SVGProps<SVGSVGElement>;
11
+ shapeProperties?: React.SVGProps<SVGCircleElement>;
12
+ }
13
+ /**
14
+ * CircleMarker
15
+ *
16
+ * @param {CircleMarkerProps} CircleMarkerProps
17
+ *
18
+ * @returns {JSX.Element} JSX
19
+ */
20
+ export declare function CircleMarker({ children, center, radius, radiusUnit, background, svgProperties, shapeProperties, visible, zIndex, }: PropsWithChildren<CircleMarkerProps>): JSX.Element;
@@ -17,12 +17,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
17
17
 
18
18
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
19
19
 
20
- /**
21
- * CircleMarker
22
- *
23
- * @param {CircleMarkerProps} CircleMarkerProps
24
- *
25
- * @returns {JSX.Element} JSX
20
+ /**
21
+ * CircleMarker
22
+ *
23
+ * @param {CircleMarkerProps} CircleMarkerProps
24
+ *
25
+ * @returns {JSX.Element} JSX
26
26
  */
27
27
 
28
28
  function CircleMarker(_a) {
@@ -1,23 +1,23 @@
1
- import React, { PropsWithChildren } from "react";
2
- import { Position } from "../../../types";
3
- export interface PolygonMarkerProps {
4
- position: Position[];
5
- innerPositions?: Position[][];
6
- background?: string;
7
- visible?: boolean;
8
- zIndex?: number;
9
- simplifyPath?: boolean;
10
- simplifyTolerance?: number;
11
- lastReapeated?: boolean;
12
- mode?: 'POLYGON' | 'POLYLINE';
13
- svgProperties?: React.SVGProps<SVGSVGElement>;
14
- shapeProperties?: React.SVGProps<SVGPathElement>;
15
- }
16
- /**
17
- *PolygonMarker
18
- *
19
- * @param {PolygonMarkerProps} PolygonMarkerProps
20
- *
21
- * @returns {JSX.Element} JSX
22
- */
23
- export declare function PolygonMarker({ children, position, background, innerPositions, simplifyPath, simplifyTolerance, lastReapeated, svgProperties, shapeProperties, visible, zIndex, mode, }: PropsWithChildren<PolygonMarkerProps>): JSX.Element;
1
+ import React, { PropsWithChildren } from "react";
2
+ import { Position } from "../../../types";
3
+ export interface PolygonMarkerProps {
4
+ position: Position[];
5
+ innerPositions?: Position[][];
6
+ background?: string;
7
+ visible?: boolean;
8
+ zIndex?: number;
9
+ simplifyPath?: boolean;
10
+ simplifyTolerance?: number;
11
+ lastReapeated?: boolean;
12
+ mode?: 'POLYGON' | 'POLYLINE';
13
+ svgProperties?: React.SVGProps<SVGSVGElement>;
14
+ shapeProperties?: React.SVGProps<SVGPathElement>;
15
+ }
16
+ /**
17
+ *PolygonMarker
18
+ *
19
+ * @param {PolygonMarkerProps} PolygonMarkerProps
20
+ *
21
+ * @returns {JSX.Element} JSX
22
+ */
23
+ export declare function PolygonMarker({ children, position, background, innerPositions, simplifyPath, simplifyTolerance, lastReapeated, svgProperties, shapeProperties, visible, zIndex, mode, }: PropsWithChildren<PolygonMarkerProps>): JSX.Element;
@@ -17,12 +17,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
17
17
 
18
18
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
19
19
 
20
- /**
21
- *PolygonMarker
22
- *
23
- * @param {PolygonMarkerProps} PolygonMarkerProps
24
- *
25
- * @returns {JSX.Element} JSX
20
+ /**
21
+ *PolygonMarker
22
+ *
23
+ * @param {PolygonMarkerProps} PolygonMarkerProps
24
+ *
25
+ * @returns {JSX.Element} JSX
26
26
  */
27
27
 
28
28
  function PolygonMarker(_a) {
@@ -1,8 +1,8 @@
1
- import React, { PropsWithChildren } from "react";
2
- export interface SVGCircleProps {
3
- radius?: number;
4
- background?: string;
5
- svgProperties?: React.SVGProps<SVGSVGElement>;
6
- shapeProperties?: React.SVGProps<SVGCircleElement>;
7
- }
8
- export declare function SVGCircle({ radius, background, children, svgProperties, shapeProperties, }: PropsWithChildren<SVGCircleProps>): JSX.Element;
1
+ import React, { PropsWithChildren } from "react";
2
+ export interface SVGCircleProps {
3
+ radius?: number;
4
+ background?: string;
5
+ svgProperties?: React.SVGProps<SVGSVGElement>;
6
+ shapeProperties?: React.SVGProps<SVGCircleElement>;
7
+ }
8
+ export declare function SVGCircle({ radius, background, children, svgProperties, shapeProperties, }: PropsWithChildren<SVGCircleProps>): JSX.Element;
@@ -32,12 +32,12 @@ function SVGCircle(_a) {
32
32
  pointerEvents: "none",
33
33
  width: boxSize,
34
34
  height: boxSize,
35
- viewBox: "0 0 100 100"
35
+ viewBox: "0 0 ".concat(boxSize, " ").concat(boxSize)
36
36
  }, svgProperties), React__default["default"].createElement("circle", tslib.__assign({
37
37
  pointerEvents: "visiblepainted",
38
- cx: '50',
39
- cy: '50',
40
- r: '50',
38
+ cx: radius,
39
+ cy: radius,
40
+ r: radius,
41
41
  fill: background
42
42
  }, shapeProperties))), React__default["default"].createElement("div", {
43
43
  style: {
@@ -1,12 +1,12 @@
1
- import React from "react";
2
- import { PropsWithChildren } from "react";
3
- import { Offset } from "../../../../types";
4
- export interface SVGPolygonProps {
5
- path: Offset[];
6
- innerPath?: Offset[][];
7
- background?: string;
8
- mode?: 'POLYGON' | 'POLYLINE';
9
- svgProperties?: React.SVGProps<SVGSVGElement>;
10
- shapeProperties?: React.SVGProps<SVGPathElement>;
11
- }
12
- export declare function SVGPolygon({ path, innerPath, background, svgProperties, shapeProperties, mode, children, }: PropsWithChildren<SVGPolygonProps>): JSX.Element;
1
+ import React from "react";
2
+ import { PropsWithChildren } from "react";
3
+ import { Offset } from "../../../../types";
4
+ export interface SVGPolygonProps {
5
+ path: Offset[];
6
+ innerPath?: Offset[][];
7
+ background?: string;
8
+ mode?: 'POLYGON' | 'POLYLINE';
9
+ svgProperties?: React.SVGProps<SVGSVGElement>;
10
+ shapeProperties?: React.SVGProps<SVGPathElement>;
11
+ }
12
+ export declare function SVGPolygon({ path, innerPath, background, svgProperties, shapeProperties, mode, children, }: PropsWithChildren<SVGPolygonProps>): JSX.Element;
@@ -1,10 +1,10 @@
1
- import React from "react";
2
- import { PropsWithChildren } from "react";
3
- export interface SVGRectProps {
4
- width?: number;
5
- height?: number;
6
- background?: string;
7
- svgProperties?: React.SVGProps<SVGSVGElement>;
8
- shapeProperties?: React.SVGProps<SVGRectElement>;
9
- }
10
- export declare function SVGRect({ width, height, background, svgProperties, shapeProperties, children }: PropsWithChildren<SVGRectProps>): JSX.Element;
1
+ import React from "react";
2
+ import { PropsWithChildren } from "react";
3
+ export interface SVGRectProps {
4
+ width?: number;
5
+ height?: number;
6
+ background?: string;
7
+ svgProperties?: React.SVGProps<SVGSVGElement>;
8
+ shapeProperties?: React.SVGProps<SVGRectElement>;
9
+ }
10
+ export declare function SVGRect({ width, height, background, svgProperties, shapeProperties, children }: PropsWithChildren<SVGRectProps>): JSX.Element;
@@ -1,3 +1,3 @@
1
- export * from './SVGCircle';
2
- export * from './SVGPolygon';
3
- export * from './SVGRect';
1
+ export * from './SVGCircle';
2
+ export * from './SVGPolygon';
3
+ export * from './SVGRect';
@@ -1,3 +1,3 @@
1
- export * from './base';
2
- export * from './CircleMarker';
3
- export * from './PolygonMarker';
1
+ export * from './base';
2
+ export * from './CircleMarker';
3
+ export * from './PolygonMarker';
@@ -1,6 +1,6 @@
1
- import { Marker } from "../../types/MapDrawables";
2
- import { MapMarkerMoving } from "../wrapper/MapMarkerWrapper";
3
- export interface MapMarkerMovingHookProps extends MapMarkerMoving {
4
- marker?: Marker;
5
- }
6
- export declare function useMarkerMoving({ marker, positions, positionClosed, loop, fps, startPositionIndex, velocity, onMovingStart, onMovingEnd }: MapMarkerMovingHookProps): (() => void)[];
1
+ import { Marker } from "../../types/MapDrawables";
2
+ import { MapMarkerMoving } from "../wrapper/MapMarkerWrapper";
3
+ export interface MapMarkerMovingHookProps extends MapMarkerMoving {
4
+ marker?: Marker;
5
+ }
6
+ export declare function useMarkerMoving({ marker, positions, positionClosed, loop, fps, startPositionIndex, velocity, onMovingStart, onMovingEnd }: MapMarkerMovingHookProps): (() => void)[];
@@ -1 +1 @@
1
- export * from "./MarkerMovingHook";
1
+ export * from "./MarkerMovingHook";
@@ -1,8 +1,8 @@
1
- export * from "./MintMapCore";
2
- export * from "./MintMapController";
3
- export * from './MintMapCanvasRenderer';
4
- export * from "./advanced";
5
- export * from "./hooks";
6
- export * from "./provider";
7
- export * from './util';
8
- export * from './wrapper';
1
+ export * from "./MintMapCore";
2
+ export * from "./MintMapController";
3
+ export * from './MintMapCanvasRenderer';
4
+ export * from "./advanced";
5
+ export * from "./hooks";
6
+ export * from "./provider";
7
+ export * from './util';
8
+ export * from './wrapper';
@@ -1,8 +1,8 @@
1
- import { PropsWithChildren } from "react";
2
- import { MintMapController } from "../MintMapController";
3
- interface MintMapProviderProps {
4
- controller: MintMapController;
5
- }
6
- export declare function MintMapProvider({ controller, children }: PropsWithChildren<MintMapProviderProps>): JSX.Element;
7
- export declare function useMintMapController(): MintMapController;
8
- export {};
1
+ import { PropsWithChildren } from "react";
2
+ import { MintMapController } from "../MintMapController";
3
+ interface MintMapProviderProps {
4
+ controller: MintMapController;
5
+ }
6
+ export declare function MintMapProvider({ controller, children }: PropsWithChildren<MintMapProviderProps>): JSX.Element;
7
+ export declare function useMintMapController(): MintMapController;
8
+ export {};
@@ -1 +1 @@
1
- export * from "./MintMapProvider";
1
+ export * from "./MintMapProvider";
@@ -1,16 +1,16 @@
1
- export declare type DrawFunction = (frameGapTime: number, elapsedTime: number) => boolean | undefined;
2
- export declare class AnimationPlayer {
3
- prevtime: number;
4
- elapsedTime: number;
5
- fps: number | null;
6
- baseDrawGapTime: number | null;
7
- private deltaTime;
8
- private playing;
9
- draw: DrawFunction;
10
- constructor(drawFunction: DrawFunction, fps?: number);
11
- init(): void;
12
- start(): void;
13
- stop(): void;
14
- resume(): void;
15
- makeFrame(timestamp: number): void;
16
- }
1
+ export declare type DrawFunction = (frameGapTime: number, elapsedTime: number) => boolean | undefined;
2
+ export declare class AnimationPlayer {
3
+ prevtime: number;
4
+ elapsedTime: number;
5
+ fps: number | null;
6
+ baseDrawGapTime: number | null;
7
+ private deltaTime;
8
+ private playing;
9
+ draw: DrawFunction;
10
+ constructor(drawFunction: DrawFunction, fps?: number);
11
+ init(): void;
12
+ start(): void;
13
+ stop(): void;
14
+ resume(): void;
15
+ makeFrame(timestamp: number): void;
16
+ }
@@ -1,66 +1,66 @@
1
- declare class PositionMirror {
2
- lat: number;
3
- lng: number;
4
- constructor(lat: number, lng: number);
5
- }
6
- export declare class PolygonCalculator {
7
- static getRegionInfo(positions: PositionMirror[]): {
8
- maxLat: number | undefined;
9
- minLat: number | undefined;
10
- maxLng: number | undefined;
11
- minLng: number | undefined;
12
- centerLat: number | undefined;
13
- centerLng: number | undefined;
14
- };
15
- static getRegionStart(positions: PositionMirror[]): PositionMirror;
16
- static getRegionEnd(positions: PositionMirror[]): PositionMirror;
17
- static getCenter(positions: PositionMirror[]): PositionMirror;
18
- static intersects(positions1: PositionMirror[], positions2: PositionMirror[]): boolean;
19
- static getIncludedPositions(polygon: PositionMirror[], position: PositionMirror | PositionMirror[]): PositionMirror[];
20
- private static convertPolygonToLinePoints;
21
- private static convertPositionToPoints;
22
- private static getCrossPoint;
23
- private static toFixedPosition;
24
- private static getCrossPointAll;
25
- private static findCrossPoint;
26
- static readonly TOLERANCE_NAVER_STYLE = 0.0001;
27
- static readonly TOLERANCE_GOOGLE_STYLE = 0.00001;
28
- static simplifyPoints(polygon: PositionMirror[], tolerance?: number, lastRepeated?: boolean): PositionMirror[];
29
- private static simplify;
30
- private static perpendicularDistance;
31
- static calculatePolygonSize(polygon: PositionMirror[], innerPolygons?: PositionMirror[][]): number;
32
- private static calculatePolygonSizeMain;
33
- }
34
- export interface NextPositionContext {
35
- pos1: PositionMirror;
36
- pos2: PositionMirror;
37
- velocityKmh: number;
38
- elapsedTimeMs: number;
39
- totalDistance: number;
40
- currDistance: number;
41
- distanceRemain: number;
42
- prevPos2: PositionMirror;
43
- prevVelocityKmh: number;
44
- vPerMs: number;
45
- nextPos: PositionMirror;
46
- }
47
- export declare class GeoCalulator {
48
- private static readonly EARTH_EQUATORIAL_RADIUS;
49
- private static readonly EARTH_EQUATORIAL_RADIUS_KM;
50
- private static readonly EARTH_ECCENTRICITY;
51
- private static readonly METER_VALUE_PER_LATITUDE;
52
- private static readonly LATITUDE_POSITION_VALUE_PER_METER;
53
- static computeDistanceKiloMeter(pos1: PositionMirror, pos2: PositionMirror): number;
54
- private static deg2rad;
55
- static convertMeterToLatitudeValue(meter: number): number;
56
- static convertLatitudeToMeterValue(lat: number): number;
57
- static convertLongitudeToMeterValue(lat: number, lng: number): number;
58
- private static readonly CACHE_OF_LNG_PER_METER;
59
- private static getCacheUnitOfLongitudeValueWithLatitudeInMeter;
60
- private static getCacheOfLongitudeValueWithLatitudeInMeter;
61
- private static setCacheOfLongitudeValueWithLatitudeInMeter;
62
- static calculateLongitudeValueWithLatitudeInMeter(lat: number): number;
63
- private static readonly MS_FROM_HOUR;
64
- static computeNextPositionAndDistances(context: NextPositionContext): NextPositionContext;
65
- }
66
- export {};
1
+ declare class PositionMirror {
2
+ lat: number;
3
+ lng: number;
4
+ constructor(lat: number, lng: number);
5
+ }
6
+ export declare class PolygonCalculator {
7
+ static getRegionInfo(positions: PositionMirror[]): {
8
+ maxLat: number | undefined;
9
+ minLat: number | undefined;
10
+ maxLng: number | undefined;
11
+ minLng: number | undefined;
12
+ centerLat: number | undefined;
13
+ centerLng: number | undefined;
14
+ };
15
+ static getRegionStart(positions: PositionMirror[]): PositionMirror;
16
+ static getRegionEnd(positions: PositionMirror[]): PositionMirror;
17
+ static getCenter(positions: PositionMirror[]): PositionMirror;
18
+ static intersects(positions1: PositionMirror[], positions2: PositionMirror[]): boolean;
19
+ static getIncludedPositions(polygon: PositionMirror[], position: PositionMirror | PositionMirror[]): PositionMirror[];
20
+ private static convertPolygonToLinePoints;
21
+ private static convertPositionToPoints;
22
+ private static getCrossPoint;
23
+ private static toFixedPosition;
24
+ private static getCrossPointAll;
25
+ private static findCrossPoint;
26
+ static readonly TOLERANCE_NAVER_STYLE = 0.0001;
27
+ static readonly TOLERANCE_GOOGLE_STYLE = 0.00001;
28
+ static simplifyPoints(polygon: PositionMirror[], tolerance?: number, lastRepeated?: boolean): PositionMirror[];
29
+ private static simplify;
30
+ private static perpendicularDistance;
31
+ static calculatePolygonSize(polygon: PositionMirror[], innerPolygons?: PositionMirror[][]): number;
32
+ private static calculatePolygonSizeMain;
33
+ }
34
+ export interface NextPositionContext {
35
+ pos1: PositionMirror;
36
+ pos2: PositionMirror;
37
+ velocityKmh: number;
38
+ elapsedTimeMs: number;
39
+ totalDistance: number;
40
+ currDistance: number;
41
+ distanceRemain: number;
42
+ prevPos2: PositionMirror;
43
+ prevVelocityKmh: number;
44
+ vPerMs: number;
45
+ nextPos: PositionMirror;
46
+ }
47
+ export declare class GeoCalulator {
48
+ private static readonly EARTH_EQUATORIAL_RADIUS;
49
+ private static readonly EARTH_EQUATORIAL_RADIUS_KM;
50
+ private static readonly EARTH_ECCENTRICITY;
51
+ private static readonly METER_VALUE_PER_LATITUDE;
52
+ private static readonly LATITUDE_POSITION_VALUE_PER_METER;
53
+ static computeDistanceKiloMeter(pos1: PositionMirror, pos2: PositionMirror): number;
54
+ private static deg2rad;
55
+ static convertMeterToLatitudeValue(meter: number): number;
56
+ static convertLatitudeToMeterValue(lat: number): number;
57
+ static convertLongitudeToMeterValue(lat: number, lng: number): number;
58
+ private static readonly CACHE_OF_LNG_PER_METER;
59
+ private static getCacheUnitOfLongitudeValueWithLatitudeInMeter;
60
+ private static getCacheOfLongitudeValueWithLatitudeInMeter;
61
+ private static setCacheOfLongitudeValueWithLatitudeInMeter;
62
+ static calculateLongitudeValueWithLatitudeInMeter(lat: number): number;
63
+ private static readonly MS_FROM_HOUR;
64
+ static computeNextPositionAndDistances(context: NextPositionContext): NextPositionContext;
65
+ }
66
+ export {};
@@ -1,18 +1,18 @@
1
- import { Bounds, Position } from "../../types/MapTypes";
2
- export interface ClusterInfo {
3
- bounds: Bounds;
4
- checked: boolean;
5
- center: boolean;
6
- centerPosition: Position;
7
- incList: any;
8
- itemList: Position[];
9
- size: number;
10
- }
11
- export interface ClusterStatus {
12
- total: number;
13
- average: number;
14
- min: number;
15
- max: number;
16
- }
17
- export declare type ClusterSizeCalculator = (info: ClusterInfo, status: ClusterStatus) => number;
18
- export declare const getClusterInfo: (basePixelSize: number, mapBounds: Bounds, mapWidth: number, mapHeight: number, itemList: Position[], sizeFunction?: ClusterSizeCalculator) => ClusterInfo[];
1
+ import { Bounds, Position } from "../../types/MapTypes";
2
+ export interface ClusterInfo {
3
+ bounds: Bounds;
4
+ checked: boolean;
5
+ center: boolean;
6
+ centerPosition: Position;
7
+ incList: any;
8
+ itemList: Position[];
9
+ size: number;
10
+ }
11
+ export interface ClusterStatus {
12
+ total: number;
13
+ average: number;
14
+ min: number;
15
+ max: number;
16
+ }
17
+ export declare type ClusterSizeCalculator = (info: ClusterInfo, status: ClusterStatus) => number;
18
+ export declare const getClusterInfo: (basePixelSize: number, mapBounds: Bounds, mapWidth: number, mapHeight: number, itemList: Position[], sizeFunction?: ClusterSizeCalculator) => ClusterInfo[];
@@ -1,4 +1,4 @@
1
- export * from './animation';
2
- export * from './calculate';
3
- export * from './waiting';
4
- export * from './cluster';
1
+ export * from './animation';
2
+ export * from './calculate';
3
+ export * from './waiting';
4
+ export * from './cluster';
@@ -1 +1 @@
1
- export declare function waiting(evaluation: () => boolean, timeoutSeconds?: number): Promise<boolean>;
1
+ export declare function waiting(evaluation: () => boolean, timeoutSeconds?: number): Promise<boolean>;
@@ -1,27 +1,27 @@
1
- /// <reference types="react" />
2
- import { MarkerOptions } from "../../types/MapDrawables";
3
- import { Offset } from "../../types/MapTypes";
4
- import { MintMapCanvasRenderer } from "../MintMapCanvasRenderer";
5
- export declare type CanvasMarkerRenderer<T> = (ctx: MintMapCanvasRenderer, offset: Offset, payload?: T) => void;
6
- export interface CanvasMarkerMouseEvent {
7
- x: number;
8
- y: number;
9
- }
10
- export declare type CanvasMarkerMouseEventCallback = (e: CanvasMarkerMouseEvent) => boolean | undefined | void;
11
- export interface MapCanvasMarkerWrapperProps<T> extends MarkerOptions {
12
- renderer: CanvasMarkerRenderer<T>;
13
- payload?: T;
14
- boxWidth: number;
15
- boxHeight: number;
16
- onClick?: CanvasMarkerMouseEventCallback;
17
- onMouseOver?: CanvasMarkerMouseEventCallback;
18
- onMouseOut?: CanvasMarkerMouseEventCallback;
19
- }
20
- /**
21
- * Mint Map 컴포넌트
22
- *
23
- * @param {MapControlWrapperProps} MapControlWrapperProps
24
- *
25
- * @returns {JSX.Element} JSX
26
- */
27
- export declare function MapCanvasMarkerWrapper<T>(_props: MapCanvasMarkerWrapperProps<T>): JSX.Element;
1
+ /// <reference types="react" />
2
+ import { MarkerOptions } from "../../types/MapDrawables";
3
+ import { Offset } from "../../types/MapTypes";
4
+ import { MintMapCanvasRenderer } from "../MintMapCanvasRenderer";
5
+ export declare type CanvasMarkerRenderer<T> = (ctx: MintMapCanvasRenderer, offset: Offset, payload?: T) => void;
6
+ export interface CanvasMarkerMouseEvent {
7
+ x: number;
8
+ y: number;
9
+ }
10
+ export declare type CanvasMarkerMouseEventCallback = (e: CanvasMarkerMouseEvent) => boolean | undefined | void;
11
+ export interface MapCanvasMarkerWrapperProps<T> extends MarkerOptions {
12
+ renderer: CanvasMarkerRenderer<T>;
13
+ payload?: T;
14
+ boxWidth: number;
15
+ boxHeight: number;
16
+ onClick?: CanvasMarkerMouseEventCallback;
17
+ onMouseOver?: CanvasMarkerMouseEventCallback;
18
+ onMouseOut?: CanvasMarkerMouseEventCallback;
19
+ }
20
+ /**
21
+ * Mint Map 컴포넌트
22
+ *
23
+ * @param {MapControlWrapperProps} MapControlWrapperProps
24
+ *
25
+ * @returns {JSX.Element} JSX
26
+ */
27
+ export declare function MapCanvasMarkerWrapper<T>(_props: MapCanvasMarkerWrapperProps<T>): JSX.Element;