@mint-ui/map 0.6.2-beta-test1 → 0.6.2-beta-test4

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 +66 -66
  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 +22 -22
  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 +28 -28
  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/SVGPolygon.d.ts +12 -12
  19. package/dist/components/mint-map/core/advanced/shapes/base/SVGRect.d.ts +10 -10
  20. package/dist/components/mint-map/core/advanced/shapes/base/index.d.ts +3 -3
  21. package/dist/components/mint-map/core/advanced/shapes/index.d.ts +3 -3
  22. package/dist/components/mint-map/core/hooks/MarkerMovingHook.d.ts +6 -6
  23. package/dist/components/mint-map/core/hooks/index.d.ts +1 -1
  24. package/dist/components/mint-map/core/index.d.ts +8 -8
  25. package/dist/components/mint-map/core/provider/MintMapProvider.d.ts +8 -8
  26. package/dist/components/mint-map/core/provider/index.d.ts +1 -1
  27. package/dist/components/mint-map/core/util/animation.d.ts +16 -16
  28. package/dist/components/mint-map/core/util/cluster.d.ts +18 -18
  29. package/dist/components/mint-map/core/util/geo.d.ts +38 -38
  30. package/dist/components/mint-map/core/util/index.d.ts +7 -7
  31. package/dist/components/mint-map/core/util/log.d.ts +1 -1
  32. package/dist/components/mint-map/core/util/polygon.d.ts +42 -42
  33. package/dist/components/mint-map/core/util/status.d.ts +9 -9
  34. package/dist/components/mint-map/core/util/waiting.d.ts +1 -1
  35. package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.d.ts +27 -27
  36. package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.js +6 -6
  37. package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.d.ts +11 -11
  38. package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.js +6 -6
  39. package/dist/components/mint-map/core/wrapper/MapControlWrapper.d.ts +18 -18
  40. package/dist/components/mint-map/core/wrapper/MapControlWrapper.js +6 -6
  41. package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.d.ts +44 -43
  42. package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.js +55 -44
  43. package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.d.ts +12 -12
  44. package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.js +6 -6
  45. package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.d.ts +12 -12
  46. package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.js +6 -6
  47. package/dist/components/mint-map/core/wrapper/index.d.ts +6 -6
  48. package/dist/components/mint-map/google/GoogleMintMapController.d.ts +51 -51
  49. package/dist/components/mint-map/index.d.ts +5 -5
  50. package/dist/components/mint-map/kakao/KakaoMintMapController.d.ts +55 -55
  51. package/dist/components/mint-map/kakao/KakaoMintMapController.js +7 -7
  52. package/dist/components/mint-map/naver/NaverMintMapController.d.ts +53 -53
  53. package/dist/components/mint-map/naver/NaverMintMapController.js +5 -5
  54. package/dist/components/mint-map/types/CommonTypes.d.ts +11 -11
  55. package/dist/components/mint-map/types/MapDrawables.d.ts +118 -118
  56. package/dist/components/mint-map/types/MapDrawables.js +8 -8
  57. package/dist/components/mint-map/types/MapEventTypes.d.ts +44 -44
  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 +101 -101
  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 +145 -134
  65. package/dist/index.umd.js +145 -134
  66. package/package.json +77 -77
package/.eslintrc.js CHANGED
@@ -1,110 +1,110 @@
1
- module.exports = {
2
- env: {
3
- browser: true,
4
- node: true
5
- },
6
- extends: [ 'airbnb', 'airbnb/hooks', 'eslint:recommended', 'plugin:react/recommended', 'plugin:import/recommended', 'plugin:storybook/recommended' ],
7
- ignorePatterns: [ '.storybook', '*.d.ts', 'node_modules', 'build', 'dist', '**/env/*.js' ],
8
- overrides: [
9
- {
10
- files: [ '*.ts', '*.tsx' ],
11
- rules: { 'no-undef': 'off' }
12
- }
13
- ],
14
- parser: '@typescript-eslint/parser',
15
- parserOptions: { warnOnUnsupportedTypeScriptVersion: false },
16
- plugins: [ '@typescript-eslint', 'sort-keys-fix', 'prettier' ],
17
- rules: {
18
- '@typescript-eslint/ban-ts-comment': [
19
- 'error',
20
- { 'ts-ignore': 'allow-with-description' }
21
- ],
22
- '@typescript-eslint/no-explicit-any': 'warn',
23
- '@typescript-eslint/no-unused-vars': 'error',
24
- 'array-bracket-spacing': [
25
- 'error',
26
- 'always',
27
- {
28
- arraysInArrays: false,
29
- objectsInArrays: false
30
- }
31
- ],
32
- 'brace-style': [ 'error', 'allman' ],
33
- 'class-methods-use-this': 'off',
34
- 'comma-dangle': [ 'error', 'never' ],
35
- 'eol-last': [ 'error', 'never' ],
36
- 'import/extensions': 'off',
37
- 'import/named': 'off',
38
- 'import/no-anonymous-default-export': 'off',
39
- 'import/no-cycle': 'off',
40
- 'import/no-extraneous-dependencies': 'off',
41
- 'import/no-named-as-default': 'off',
42
- 'import/no-unresolved': 'off',
43
- 'import/order': [
44
- 'error',
45
- {
46
- alphabetize: {
47
- caseInsensitive: true,
48
- order: 'asc'
49
- },
50
- groups: [ 'external', 'builtin', 'internal', 'sibling', 'parent', 'index' ],
51
- 'newlines-between': 'always'
52
- }
53
- ],
54
- indent: [ 'error', 'tab', { SwitchCase: 1 }],
55
- 'jsx-a11y/control-has-associated-label': 'off',
56
- 'jsx-quotes': [ 'error', 'prefer-single' ],
57
- 'linebreak-style': 'off',
58
- 'max-len': 'off',
59
- 'no-console': 'off',
60
- 'no-plusplus': 'off',
61
- 'no-restricted-exports': 'off',
62
- 'no-tabs': [ 'error', { allowIndentationTabs: true }],
63
- 'no-unused-vars': 'off',
64
- 'object-curly-newline': [ 'error', {
65
- ExportDeclaration: 'never',
66
- ImportDeclaration: 'never',
67
- ObjectExpression: {
68
- minProperties: 3,
69
- multiline: true
70
- },
71
- ObjectPattern: { multiline: true }
72
- }],
73
- 'react-hooks/exhaustive-deps': 'off',
74
- 'react/button-has-type': 'off',
75
- 'react/destructuring-assignment': 'off',
76
- 'react/function-component-definition': 'off',
77
- 'react/jsx-curly-brace-presence': [
78
- 'error',
79
- {
80
- children: 'never',
81
- props: 'never'
82
- }
83
- ],
84
- 'react/jsx-filename-extension': 'off',
85
- 'react/jsx-indent': [ 'error', 'tab' ],
86
- 'react/jsx-indent-props': [ 2, 'tab' ],
87
- 'react/jsx-props-no-spreading': 'off',
88
- 'react/jsx-sort-props': [
89
- 'error',
90
- {
91
- callbacksLast: true,
92
- ignoreCase: true,
93
- multiline: 'last',
94
- noSortAlphabetically: false,
95
- reservedFirst: false,
96
- shorthandFirst: false,
97
- shorthandLast: true
98
- }
99
- ],
100
- 'react/prop-types': 'off',
101
- 'react/react-in-jsx-scope': 'off',
102
- 'react/require-default-props': 'off',
103
- 'require-jsdoc': 'off',
104
- 'sort-keys-fix/sort-keys-fix': 'error'
105
- },
106
- settings: {
107
- 'import/parsers': { '@typescript-eslint/parser': [ '.ts', '.tsx', '.js' ] },
108
- react: { version: 'detect' }
109
- }
1
+ module.exports = {
2
+ env: {
3
+ browser: true,
4
+ node: true
5
+ },
6
+ extends: [ 'airbnb', 'airbnb/hooks', 'eslint:recommended', 'plugin:react/recommended', 'plugin:import/recommended', 'plugin:storybook/recommended' ],
7
+ ignorePatterns: [ '.storybook', '*.d.ts', 'node_modules', 'build', 'dist', '**/env/*.js' ],
8
+ overrides: [
9
+ {
10
+ files: [ '*.ts', '*.tsx' ],
11
+ rules: { 'no-undef': 'off' }
12
+ }
13
+ ],
14
+ parser: '@typescript-eslint/parser',
15
+ parserOptions: { warnOnUnsupportedTypeScriptVersion: false },
16
+ plugins: [ '@typescript-eslint', 'sort-keys-fix', 'prettier' ],
17
+ rules: {
18
+ '@typescript-eslint/ban-ts-comment': [
19
+ 'error',
20
+ { 'ts-ignore': 'allow-with-description' }
21
+ ],
22
+ '@typescript-eslint/no-explicit-any': 'warn',
23
+ '@typescript-eslint/no-unused-vars': 'error',
24
+ 'array-bracket-spacing': [
25
+ 'error',
26
+ 'always',
27
+ {
28
+ arraysInArrays: false,
29
+ objectsInArrays: false
30
+ }
31
+ ],
32
+ 'brace-style': [ 'error', 'allman' ],
33
+ 'class-methods-use-this': 'off',
34
+ 'comma-dangle': [ 'error', 'never' ],
35
+ 'eol-last': [ 'error', 'never' ],
36
+ 'import/extensions': 'off',
37
+ 'import/named': 'off',
38
+ 'import/no-anonymous-default-export': 'off',
39
+ 'import/no-cycle': 'off',
40
+ 'import/no-extraneous-dependencies': 'off',
41
+ 'import/no-named-as-default': 'off',
42
+ 'import/no-unresolved': 'off',
43
+ 'import/order': [
44
+ 'error',
45
+ {
46
+ alphabetize: {
47
+ caseInsensitive: true,
48
+ order: 'asc'
49
+ },
50
+ groups: [ 'external', 'builtin', 'internal', 'sibling', 'parent', 'index' ],
51
+ 'newlines-between': 'always'
52
+ }
53
+ ],
54
+ indent: [ 'error', 'tab', { SwitchCase: 1 }],
55
+ 'jsx-a11y/control-has-associated-label': 'off',
56
+ 'jsx-quotes': [ 'error', 'prefer-single' ],
57
+ 'linebreak-style': 'off',
58
+ 'max-len': 'off',
59
+ 'no-console': 'off',
60
+ 'no-plusplus': 'off',
61
+ 'no-restricted-exports': 'off',
62
+ 'no-tabs': [ 'error', { allowIndentationTabs: true }],
63
+ 'no-unused-vars': 'off',
64
+ 'object-curly-newline': [ 'error', {
65
+ ExportDeclaration: 'never',
66
+ ImportDeclaration: 'never',
67
+ ObjectExpression: {
68
+ minProperties: 3,
69
+ multiline: true
70
+ },
71
+ ObjectPattern: { multiline: true }
72
+ }],
73
+ 'react-hooks/exhaustive-deps': 'off',
74
+ 'react/button-has-type': 'off',
75
+ 'react/destructuring-assignment': 'off',
76
+ 'react/function-component-definition': 'off',
77
+ 'react/jsx-curly-brace-presence': [
78
+ 'error',
79
+ {
80
+ children: 'never',
81
+ props: 'never'
82
+ }
83
+ ],
84
+ 'react/jsx-filename-extension': 'off',
85
+ 'react/jsx-indent': [ 'error', 'tab' ],
86
+ 'react/jsx-indent-props': [ 2, 'tab' ],
87
+ 'react/jsx-props-no-spreading': 'off',
88
+ 'react/jsx-sort-props': [
89
+ 'error',
90
+ {
91
+ callbacksLast: true,
92
+ ignoreCase: true,
93
+ multiline: 'last',
94
+ noSortAlphabetically: false,
95
+ reservedFirst: false,
96
+ shorthandFirst: false,
97
+ shorthandLast: true
98
+ }
99
+ ],
100
+ 'react/prop-types': 'off',
101
+ 'react/react-in-jsx-scope': 'off',
102
+ 'react/require-default-props': 'off',
103
+ 'require-jsdoc': 'off',
104
+ 'sort-keys-fix/sort-keys-fix': 'error'
105
+ },
106
+ settings: {
107
+ 'import/parsers': { '@typescript-eslint/parser': [ '.ts', '.tsx', '.js' ] },
108
+ react: { version: 'detect' }
109
+ }
110
110
  };
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 itcode.dev
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022 itcode.dev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,73 +1,73 @@
1
- # @mint-ui/map
2
-
3
- - React map library
4
- - Control various map with one interface
5
- - Google, Naver, Kakao map supported now
6
- - Typescript supported
7
- - Canvas marker supported (experimental)
8
-
9
- ## Installation
10
-
11
- ``` bash
12
- yarn add @mint-ui/map
13
-
14
- npm install @mint-ui/map
15
- ```
16
-
17
- ## Examples
18
-
19
- ``` javascript
20
- ...
21
- ...
22
-
23
- import { MapMarkerWrapper, MintMap, Position } from '@mint-ui/map'
24
-
25
- const root = ReactDOM.createRoot(
26
- document.getElementById('root')
27
- )
28
-
29
- function MyMapComponent(){
30
-
31
- return <MintMap
32
- mapType={'google'}
33
- mapKey={'YOUR_GOOGLE_MAP_KEY'}
34
- mapId='YOUR_GOOGLE_MAP_ID' //Use advanced markers in Google maps
35
- base={{center:new Position(-25.344, 131.031), zoomLevel:12}}
36
- >
37
- {/* Your marker */}
38
- <MapMarkerWrapper position={new Position(-25.344, 131.031)}>
39
-
40
- {/* Your marker elements */}
41
- <div style={{width:'10px', height:'10px', background:'red', borderRadius:'10px'}}></div>
42
-
43
- </MapMarkerWrapper>
44
-
45
- {/* Overlay canvas */}
46
- <MapCanvasWrapper>
47
-
48
- {/* Canvas marker */}
49
- <MapCanvasMarkerWrapper position={new Position(-25.344, 131.031)}
50
- renderer={(renderer:MintMapCanvasRenderer, offset:Offset, _payload?:TestPayload)=>{
51
- const {context} = renderer
52
- context.fillStyle = `hsl(${(Math.random() * 360).toFixed(0)} 100% 60%)`
53
- context.fillRect(Math.floor(offset.x), Math.floor(offset.y), 8, 8)
54
- }}
55
- boxWidth={8} boxHeight={8}
56
- payload={testItem}
57
- onClick={(e)=>{
58
- alert('marker 1 clicked!!!'+e.x+','+e.y)
59
- }}
60
- ></MapCanvasMarkerWrapper>
61
-
62
- </MapCanvasWrapper>
63
-
64
- </MintMap>
65
-
66
- }
67
-
68
- root.render((<MyMapComponent/>))
69
-
70
- ```
71
-
72
- ## Document / Reference Site
73
- - To be continue...
1
+ # @mint-ui/map
2
+
3
+ - React map library
4
+ - Control various map with one interface
5
+ - Google, Naver, Kakao map supported now
6
+ - Typescript supported
7
+ - Canvas marker supported (experimental)
8
+
9
+ ## Installation
10
+
11
+ ``` bash
12
+ yarn add @mint-ui/map
13
+
14
+ npm install @mint-ui/map
15
+ ```
16
+
17
+ ## Examples
18
+
19
+ ``` javascript
20
+ ...
21
+ ...
22
+
23
+ import { MapMarkerWrapper, MintMap, Position } from '@mint-ui/map'
24
+
25
+ const root = ReactDOM.createRoot(
26
+ document.getElementById('root')
27
+ )
28
+
29
+ function MyMapComponent(){
30
+
31
+ return <MintMap
32
+ mapType={'google'}
33
+ mapKey={'YOUR_GOOGLE_MAP_KEY'}
34
+ mapId='YOUR_GOOGLE_MAP_ID' //Use advanced markers in Google maps
35
+ base={{center:new Position(-25.344, 131.031), zoomLevel:12}}
36
+ >
37
+ {/* Your marker */}
38
+ <MapMarkerWrapper position={new Position(-25.344, 131.031)}>
39
+
40
+ {/* Your marker elements */}
41
+ <div style={{width:'10px', height:'10px', background:'red', borderRadius:'10px'}}></div>
42
+
43
+ </MapMarkerWrapper>
44
+
45
+ {/* Overlay canvas */}
46
+ <MapCanvasWrapper>
47
+
48
+ {/* Canvas marker */}
49
+ <MapCanvasMarkerWrapper position={new Position(-25.344, 131.031)}
50
+ renderer={(renderer:MintMapCanvasRenderer, offset:Offset, _payload?:TestPayload)=>{
51
+ const {context} = renderer
52
+ context.fillStyle = `hsl(${(Math.random() * 360).toFixed(0)} 100% 60%)`
53
+ context.fillRect(Math.floor(offset.x), Math.floor(offset.y), 8, 8)
54
+ }}
55
+ boxWidth={8} boxHeight={8}
56
+ payload={testItem}
57
+ onClick={(e)=>{
58
+ alert('marker 1 clicked!!!'+e.x+','+e.y)
59
+ }}
60
+ ></MapCanvasMarkerWrapper>
61
+
62
+ </MapCanvasWrapper>
63
+
64
+ </MintMap>
65
+
66
+ }
67
+
68
+ root.render((<MyMapComponent/>))
69
+
70
+ ```
71
+
72
+ ## Document / Reference Site
73
+ - To be continue...
@@ -1,10 +1,10 @@
1
- import { PropsWithChildren } from "react";
2
- import { MintMapProps } from "./types/MintMapProps";
3
- /**
4
- * Mint Map 컴포넌트
5
- *
6
- * @param {MintMapProps} MintMapProps
7
- *
8
- * @returns {JSX.Element} JSX
9
- */
10
- export declare function MintMap({ mapLoadingComponent, dissolveEffectWhenLoaded, mapType, children, base, ...props }: PropsWithChildren<MintMapProps>): JSX.Element;
1
+ import { PropsWithChildren } from "react";
2
+ import { MintMapProps } from "./types/MintMapProps";
3
+ /**
4
+ * Mint Map 컴포넌트
5
+ *
6
+ * @param {MintMapProps} MintMapProps
7
+ *
8
+ * @returns {JSX.Element} JSX
9
+ */
10
+ export declare function MintMap({ mapLoadingComponent, dissolveEffectWhenLoaded, mapType, children, base, ...props }: PropsWithChildren<MintMapProps>): JSX.Element;
@@ -23,12 +23,12 @@ var DEFAULT_CENTER = {
23
23
  lat: 37.5036845,
24
24
  lng: 127.0448698
25
25
  };
26
- /**
27
- * Mint Map 컴포넌트
28
- *
29
- * @param {MintMapProps} MintMapProps
30
- *
31
- * @returns {JSX.Element} JSX
26
+ /**
27
+ * Mint Map 컴포넌트
28
+ *
29
+ * @param {MintMapProps} MintMapProps
30
+ *
31
+ * @returns {JSX.Element} JSX
32
32
  */
33
33
 
34
34
  function MintMap(_a) {
@@ -1,4 +1,4 @@
1
- export declare class MintMapCanvasRenderer {
2
- context: CanvasRenderingContext2D;
3
- constructor(context: CanvasRenderingContext2D);
4
- }
1
+ export declare class MintMapCanvasRenderer {
2
+ context: CanvasRenderingContext2D;
3
+ constructor(context: CanvasRenderingContext2D);
4
+ }
@@ -1,66 +1,66 @@
1
- import { MapType, MapVendorType } from '../types/CommonTypes';
2
- import { Drawable, Marker, MarkerOptions, Polygon, PolygonOptions, Polyline, PolylineOptions } from '../types/MapDrawables';
3
- import { EventCallback, EventParamType, MapEvent, MapEventName, MapUIEvent } from '../types/MapEventTypes';
4
- import { Bounds, Offset, Position } from '../types/MapTypes';
5
- import { MintMapProps } from '../types/MintMapProps';
6
- export declare abstract class MintMapController {
7
- abstract type: MapType;
8
- abstract map: MapVendorType | null;
9
- abstract scriptUrl: string;
10
- abstract scriptModules: string[];
11
- abstract initializingMap(divElement: HTMLDivElement): Promise<MapVendorType>;
12
- abstract destroyMap(): void;
13
- abstract loadMapApi(): Promise<boolean>;
14
- abstract getCurrBounds(): Bounds;
15
- abstract panningTo(targetCenter: Position): void;
16
- abstract getZoomLevel(): number;
17
- abstract setZoomLevel(zoom: number): void;
18
- abstract getCenter(): Position;
19
- abstract setCenter(position: Position): void;
20
- abstract createMarker(marker: Marker): void;
21
- abstract updateMarker(marker: Marker, options: MarkerOptions): void;
22
- abstract clearDrawable(drawable: Drawable): boolean;
23
- abstract markerToTheTop(marker: Marker): void;
24
- abstract isMapDragged(): boolean;
25
- abstract setMapDragged(value: boolean): void;
26
- abstract setMarkerZIndex(marker: Marker, zIndex: number): void;
27
- abstract createPolyline(polyline: Polyline): void;
28
- abstract updatePolyline(polyline: Polyline, options: PolylineOptions): void;
29
- abstract createPolygon(polygon: Polygon): void;
30
- abstract updatePolygon(polygon: Polygon, options: PolygonOptions): void;
31
- protected abstract mapEvent: MapEvent;
32
- protected abstract mapUIEvent: MapUIEvent;
33
- abstract addEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
34
- abstract removeEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
35
- abstract removeAllEventListener(eventName?: MapEventName): void;
36
- mapProps: MintMapProps;
37
- mapApiLoaded: boolean;
38
- mapInitialized: boolean;
39
- mapDivElement: HTMLDivElement;
40
- constructor(props: MintMapProps);
41
- getMap(): MapVendorType | null;
42
- getMapType(): MapType;
43
- positionToOffset(position: Position): Offset;
44
- offsetToPosition(offset: Offset): Position;
45
- loadScript(url: string, id: string, checkLoaded: () => boolean): Promise<boolean>;
46
- getRandomFunctionName(prefix: string): string;
47
- /**
48
- * URL 빌더 메서드
49
- *
50
- * @param {string} baseUrl: 기본 URL
51
- * @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
52
- * @returns {string} URL
53
- */
54
- buildUrl(baseUrl: string, param: {
55
- [key: string]: string | string[] | boolean;
56
- }): string;
57
- private processedTime;
58
- /**
59
- * 쓰로틀링 처리
60
- * @returns
61
- */
62
- checkBoundsChangeThrottleTime(): boolean;
63
- getBaseToMapZoom(zoomBase: number): number;
64
- getMapToBaseZoom(mapZoom: number): number;
65
- printStatus(): void;
66
- }
1
+ import { MapType, MapVendorType } from '../types/CommonTypes';
2
+ import { Drawable, Marker, MarkerOptions, Polygon, PolygonOptions, Polyline, PolylineOptions } from '../types/MapDrawables';
3
+ import { EventCallback, EventParamType, MapEvent, MapEventName, MapUIEvent } from '../types/MapEventTypes';
4
+ import { Bounds, Offset, Position } from '../types/MapTypes';
5
+ import { MintMapProps } from '../types/MintMapProps';
6
+ export declare abstract class MintMapController {
7
+ abstract type: MapType;
8
+ abstract map: MapVendorType | null;
9
+ abstract scriptUrl: string;
10
+ abstract scriptModules: string[];
11
+ abstract initializingMap(divElement: HTMLDivElement): Promise<MapVendorType>;
12
+ abstract destroyMap(): void;
13
+ abstract loadMapApi(): Promise<boolean>;
14
+ abstract getCurrBounds(): Bounds;
15
+ abstract panningTo(targetCenter: Position): void;
16
+ abstract getZoomLevel(): number;
17
+ abstract setZoomLevel(zoom: number): void;
18
+ abstract getCenter(): Position;
19
+ abstract setCenter(position: Position): void;
20
+ abstract createMarker(marker: Marker): void;
21
+ abstract updateMarker(marker: Marker, options: MarkerOptions): void;
22
+ abstract clearDrawable(drawable: Drawable): boolean;
23
+ abstract markerToTheTop(marker: Marker): void;
24
+ abstract isMapDragged(): boolean;
25
+ abstract setMapDragged(value: boolean): void;
26
+ abstract setMarkerZIndex(marker: Marker, zIndex: number): void;
27
+ abstract createPolyline(polyline: Polyline): void;
28
+ abstract updatePolyline(polyline: Polyline, options: PolylineOptions): void;
29
+ abstract createPolygon(polygon: Polygon): void;
30
+ abstract updatePolygon(polygon: Polygon, options: PolygonOptions): void;
31
+ protected abstract mapEvent: MapEvent;
32
+ protected abstract mapUIEvent: MapUIEvent;
33
+ abstract addEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
34
+ abstract removeEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
35
+ abstract removeAllEventListener(eventName?: MapEventName): void;
36
+ mapProps: MintMapProps;
37
+ mapApiLoaded: boolean;
38
+ mapInitialized: boolean;
39
+ mapDivElement: HTMLDivElement;
40
+ constructor(props: MintMapProps);
41
+ getMap(): MapVendorType | null;
42
+ getMapType(): MapType;
43
+ positionToOffset(position: Position): Offset;
44
+ offsetToPosition(offset: Offset): Position;
45
+ loadScript(url: string, id: string, checkLoaded: () => boolean): Promise<boolean>;
46
+ getRandomFunctionName(prefix: string): string;
47
+ /**
48
+ * URL 빌더 메서드
49
+ *
50
+ * @param {string} baseUrl: 기본 URL
51
+ * @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
52
+ * @returns {string} URL
53
+ */
54
+ buildUrl(baseUrl: string, param: {
55
+ [key: string]: string | string[] | boolean;
56
+ }): string;
57
+ private processedTime;
58
+ /**
59
+ * 쓰로틀링 처리
60
+ * @returns
61
+ */
62
+ checkBoundsChangeThrottleTime(): boolean;
63
+ getBaseToMapZoom(zoomBase: number): number;
64
+ getMapToBaseZoom(mapZoom: number): number;
65
+ printStatus(): void;
66
+ }
@@ -111,12 +111,12 @@ function () {
111
111
  MintMapController.prototype.getRandomFunctionName = function (prefix) {
112
112
  return "".concat(prefix, "_").concat(uuid.v4().replace(/-/g, '_'));
113
113
  };
114
- /**
115
- * URL 빌더 메서드
116
- *
117
- * @param {string} baseUrl: 기본 URL
118
- * @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
119
- * @returns {string} URL
114
+ /**
115
+ * URL 빌더 메서드
116
+ *
117
+ * @param {string} baseUrl: 기본 URL
118
+ * @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
119
+ * @returns {string} URL
120
120
  */
121
121
 
122
122
 
@@ -129,9 +129,9 @@ function () {
129
129
  }).join('&');
130
130
  return "".concat(baseUrl, "?").concat(params);
131
131
  };
132
- /**
133
- * 쓰로틀링 처리
134
- * @returns
132
+ /**
133
+ * 쓰로틀링 처리
134
+ * @returns
135
135
  */
136
136
 
137
137
 
@@ -1,3 +1,3 @@
1
- import { PropsWithChildren } from "react";
2
- import { MintMapProps } from "../types/MintMapProps";
3
- export declare function MintMapCore({ onLoad, visible, zoomLevel, center, centerMoveWithPanning, children }: PropsWithChildren<MintMapProps>): JSX.Element;
1
+ import { PropsWithChildren } from "react";
2
+ import { MintMapProps } from "../types/MintMapProps";
3
+ export declare function MintMapCore({ onLoad, visible, zoomLevel, center, centerMoveWithPanning, children }: PropsWithChildren<MintMapProps>): JSX.Element;