@mint-ui/map 1.0.0 → 1.1.0

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 (72) hide show
  1. package/.eslintrc.js +109 -109
  2. package/LICENSE +21 -21
  3. package/README.md +81 -81
  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 +70 -70
  8. package/dist/components/mint-map/core/MintMapController.js +10 -62
  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/canvas/CanvasMarker.d.ts +18 -18
  13. package/dist/components/mint-map/core/advanced/canvas/draw/canvas-util.d.ts +5 -5
  14. package/dist/components/mint-map/core/advanced/canvas/index.d.ts +1 -1
  15. package/dist/components/mint-map/core/advanced/index.d.ts +4 -4
  16. package/dist/components/mint-map/core/advanced/shapes/CircleMarker.d.ts +22 -22
  17. package/dist/components/mint-map/core/advanced/shapes/CircleMarker.js +6 -6
  18. package/dist/components/mint-map/core/advanced/shapes/PolygonMarker.d.ts +28 -28
  19. package/dist/components/mint-map/core/advanced/shapes/PolygonMarker.js +6 -6
  20. package/dist/components/mint-map/core/advanced/shapes/base/SVGCircle.d.ts +8 -8
  21. package/dist/components/mint-map/core/advanced/shapes/base/SVGPolygon.d.ts +12 -12
  22. package/dist/components/mint-map/core/advanced/shapes/base/SVGRect.d.ts +10 -10
  23. package/dist/components/mint-map/core/advanced/shapes/base/index.d.ts +3 -3
  24. package/dist/components/mint-map/core/advanced/shapes/index.d.ts +3 -3
  25. package/dist/components/mint-map/core/hooks/MarkerMovingHook.d.ts +6 -6
  26. package/dist/components/mint-map/core/hooks/index.d.ts +1 -1
  27. package/dist/components/mint-map/core/index.d.ts +8 -8
  28. package/dist/components/mint-map/core/provider/MintMapProvider.d.ts +8 -8
  29. package/dist/components/mint-map/core/provider/index.d.ts +1 -1
  30. package/dist/components/mint-map/core/util/animation.d.ts +16 -16
  31. package/dist/components/mint-map/core/util/cluster.d.ts +18 -18
  32. package/dist/components/mint-map/core/util/geo.d.ts +38 -38
  33. package/dist/components/mint-map/core/util/index.d.ts +8 -8
  34. package/dist/components/mint-map/core/util/log.d.ts +1 -1
  35. package/dist/components/mint-map/core/util/map.d.ts +2 -2
  36. package/dist/components/mint-map/core/util/polygon.d.ts +42 -42
  37. package/dist/components/mint-map/core/util/status.d.ts +9 -9
  38. package/dist/components/mint-map/core/util/waiting.d.ts +1 -1
  39. package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.d.ts +27 -27
  40. package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.js +6 -6
  41. package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.d.ts +11 -11
  42. package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.js +6 -6
  43. package/dist/components/mint-map/core/wrapper/MapControlWrapper.d.ts +20 -20
  44. package/dist/components/mint-map/core/wrapper/MapControlWrapper.js +6 -6
  45. package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.d.ts +51 -51
  46. package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.js +6 -6
  47. package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.d.ts +12 -12
  48. package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.js +6 -6
  49. package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.d.ts +12 -12
  50. package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.js +6 -6
  51. package/dist/components/mint-map/core/wrapper/index.d.ts +6 -6
  52. package/dist/components/mint-map/google/GoogleMintMapController.d.ts +54 -53
  53. package/dist/components/mint-map/google/GoogleMintMapController.js +25 -1
  54. package/dist/components/mint-map/index.d.ts +5 -5
  55. package/dist/components/mint-map/kakao/KakaoMintMapController.js +40 -7
  56. package/dist/components/mint-map/naver/NaverMintMapController.d.ts +56 -55
  57. package/dist/components/mint-map/naver/NaverMintMapController.js +45 -7
  58. package/dist/components/mint-map/types/MapDrawables.d.ts +118 -118
  59. package/dist/components/mint-map/types/MapDrawables.js +8 -8
  60. package/dist/components/mint-map/types/MapEventTypes.d.ts +44 -44
  61. package/dist/components/mint-map/types/MapTypes.d.ts +66 -60
  62. package/dist/components/mint-map/types/MapTypes.js +22 -13
  63. package/dist/components/mint-map/types/MintMapEvents.d.ts +25 -25
  64. package/dist/components/mint-map/types/MintMapProps.d.ts +111 -111
  65. package/dist/components/mint-map/types/index.d.ts +6 -6
  66. package/dist/index.d.ts +7 -7
  67. package/dist/index.es.js +3684 -3665
  68. package/dist/index.js +1 -0
  69. package/dist/index.umd.js +3683 -3663
  70. package/package.json +77 -77
  71. package/dist/components/mint-map/kakao/KakaoMintMapController.d.ts +0 -57
  72. package/dist/components/mint-map/types/CommonTypes.d.ts +0 -11
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,81 +1,81 @@
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
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
- {/* Canvas marker */}
46
- <CanvasMarker
47
-
48
- /* Canvas renderer */
49
- renderer={({ context, offset, payload }) => {
50
- context.beginPath();
51
-
52
- // rect
53
- context.rect(offset[0].x, offset[0].y, 20, 20);
54
- context.fillStyle = 'orange';
55
- context.fill();
56
-
57
- // rect outline
58
- context.strokeStyle = 'red';
59
- context.strokeRect(offset[0].x, offset[0].y, 20, 20);
60
-
61
- // font
62
- context.fillStyle = 'white';
63
- context.font = '10px caption';
64
- context.fillText(String(payload?.no), offset[0].x + 2, offset[0].y + 14);
65
- context.closePath();
66
- }}
67
- zIndex={2}
68
- data={markers}
69
- />
70
-
71
- </MintMap>
72
-
73
- }
74
-
75
- root.render((<MyMapComponent/>))
76
-
77
- ```
78
-
79
- ## Document / Reference Site
80
-
81
- [https://dev-rsquare.github.io/mint-ui-map-guide](https://dev-rsquare.github.io/mint-ui-map-guide)
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
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
+ {/* Canvas marker */}
46
+ <CanvasMarker
47
+
48
+ /* Canvas renderer */
49
+ renderer={({ context, offset, payload }) => {
50
+ context.beginPath();
51
+
52
+ // rect
53
+ context.rect(offset[0].x, offset[0].y, 20, 20);
54
+ context.fillStyle = 'orange';
55
+ context.fill();
56
+
57
+ // rect outline
58
+ context.strokeStyle = 'red';
59
+ context.strokeRect(offset[0].x, offset[0].y, 20, 20);
60
+
61
+ // font
62
+ context.fillStyle = 'white';
63
+ context.font = '10px caption';
64
+ context.fillText(String(payload?.no), offset[0].x + 2, offset[0].y + 14);
65
+ context.closePath();
66
+ }}
67
+ zIndex={2}
68
+ data={markers}
69
+ />
70
+
71
+ </MintMap>
72
+
73
+ }
74
+
75
+ root.render((<MyMapComponent/>))
76
+
77
+ ```
78
+
79
+ ## Document / Reference Site
80
+
81
+ [https://dev-rsquare.github.io/mint-ui-map-guide](https://dev-rsquare.github.io/mint-ui-map-guide)
@@ -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;
@@ -34,12 +34,12 @@ function makeBaseProps(base) {
34
34
  !base.zoomLevel && (base.zoomLevel = DEFAULT_ZOOM_LEVEL);
35
35
  return base;
36
36
  }
37
- /**
38
- * Mint Map 컴포넌트
39
- *
40
- * @param {MintMapProps} MintMapProps
41
- *
42
- * @returns {JSX.Element} JSX
37
+ /**
38
+ * Mint Map 컴포넌트
39
+ *
40
+ * @param {MintMapProps} MintMapProps
41
+ *
42
+ * @returns {JSX.Element} JSX
43
43
  */
44
44
 
45
45
 
@@ -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,70 +1,70 @@
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
- import { Property } from "csstype";
7
- export declare abstract class MintMapController {
8
- abstract type: MapType;
9
- abstract map: MapVendorType | null;
10
- abstract scriptUrl: string;
11
- abstract scriptModules: string[];
12
- abstract initializingMap(divElement: HTMLDivElement): Promise<MapVendorType>;
13
- abstract destroyMap(): void;
14
- abstract loadMapApi(): Promise<boolean>;
15
- abstract getCurrBounds(): Bounds;
16
- abstract panningTo(targetCenter: Position): void;
17
- abstract getZoomLevel(): number;
18
- abstract setZoomLevel(zoom: number): void;
19
- abstract getCenter(): Position;
20
- abstract setCenter(position: Position): void;
21
- abstract setMapCursor(cursor: Property.Cursor): void;
22
- abstract createMarker(marker: Marker): void;
23
- abstract updateMarker(marker: Marker, options: MarkerOptions): void;
24
- abstract clearDrawable(drawable: Drawable): boolean;
25
- abstract markerToTheTop(marker: Marker): void;
26
- abstract isMapDragged(): boolean;
27
- abstract setMapDragged(value: boolean): void;
28
- abstract setMarkerZIndex(marker: Marker, zIndex: number): void;
29
- abstract createPolyline(polyline: Polyline): void;
30
- abstract updatePolyline(polyline: Polyline, options: PolylineOptions): void;
31
- abstract createPolygon(polygon: Polygon): void;
32
- abstract updatePolygon(polygon: Polygon, options: PolygonOptions): void;
33
- protected abstract mapEvent: MapEvent;
34
- protected abstract mapUIEvent: MapUIEvent;
35
- abstract addEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
36
- abstract removeEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
37
- abstract removeAllEventListener(eventName?: MapEventName): void;
38
- mapProps: MintMapProps;
39
- mapApiLoaded: boolean;
40
- mapInitialized: boolean;
41
- mapDivElement: HTMLDivElement;
42
- constructor(props: MintMapProps);
43
- getMap(): MapVendorType | null;
44
- getMapType(): MapType;
45
- positionToOffset(position: Position): Offset;
46
- offsetToPosition(offset: Offset): Position;
47
- loadScript(url: string, id: string, checkLoaded: () => boolean): Promise<boolean>;
48
- getRandomFunctionName(prefix: string): string;
49
- /**
50
- * URL 빌더 메서드
51
- *
52
- * @param {string} baseUrl: 기본 URL
53
- * @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
54
- * @returns {string} URL
55
- */
56
- buildUrl(baseUrl: string, param: {
57
- [key: string]: string | string[] | boolean;
58
- }): string;
59
- private processedTime;
60
- /**
61
- * 쓰로틀링 처리
62
- * @returns
63
- */
64
- checkBoundsChangeThrottleTime(): boolean;
65
- getBaseToMapZoom(zoomBase: number): number;
66
- getMapToBaseZoom(mapZoom: number): number;
67
- focusPositionsToFitViewport(positions: Position[]): void;
68
- morph(position: Position, zoom: number, option?: Record<string, unknown>): void;
69
- printStatus(): void;
70
- }
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, Spacing } from '../types/MapTypes';
5
+ import { MintMapProps } from '../types/MintMapProps';
6
+ import { Property } from "csstype";
7
+ export declare abstract class MintMapController {
8
+ abstract type: MapType;
9
+ abstract map: MapVendorType | null;
10
+ abstract scriptUrl: string;
11
+ abstract scriptModules: string[];
12
+ abstract initializingMap(divElement: HTMLDivElement): Promise<MapVendorType>;
13
+ abstract destroyMap(): void;
14
+ abstract loadMapApi(): Promise<boolean>;
15
+ abstract getCurrBounds(): Bounds;
16
+ abstract panningTo(targetCenter: Position): void;
17
+ abstract getZoomLevel(): number;
18
+ abstract setZoomLevel(zoom: number): void;
19
+ abstract getCenter(): Position;
20
+ abstract setCenter(position: Position): void;
21
+ abstract setMapCursor(cursor: Property.Cursor): void;
22
+ abstract focusPositionsToFitViewport(positions: Position[], spacing?: number | Spacing): void;
23
+ abstract createMarker(marker: Marker): void;
24
+ abstract updateMarker(marker: Marker, options: MarkerOptions): void;
25
+ abstract clearDrawable(drawable: Drawable): boolean;
26
+ abstract markerToTheTop(marker: Marker): void;
27
+ abstract isMapDragged(): boolean;
28
+ abstract setMapDragged(value: boolean): void;
29
+ abstract setMarkerZIndex(marker: Marker, zIndex: number): void;
30
+ abstract createPolyline(polyline: Polyline): void;
31
+ abstract updatePolyline(polyline: Polyline, options: PolylineOptions): void;
32
+ abstract createPolygon(polygon: Polygon): void;
33
+ abstract updatePolygon(polygon: Polygon, options: PolygonOptions): void;
34
+ protected abstract mapEvent: MapEvent;
35
+ protected abstract mapUIEvent: MapUIEvent;
36
+ abstract addEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
37
+ abstract removeEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
38
+ abstract removeAllEventListener(eventName?: MapEventName): void;
39
+ mapProps: MintMapProps;
40
+ mapApiLoaded: boolean;
41
+ mapInitialized: boolean;
42
+ mapDivElement: HTMLDivElement;
43
+ constructor(props: MintMapProps);
44
+ getMap(): any;
45
+ getMapType(): MapType;
46
+ positionToOffset(position: Position): Offset;
47
+ offsetToPosition(offset: Offset): Position;
48
+ loadScript(url: string, id: string, checkLoaded: () => boolean): Promise<boolean>;
49
+ getRandomFunctionName(prefix: string): string;
50
+ /**
51
+ * URL 빌더 메서드
52
+ *
53
+ * @param {string} baseUrl: 기본 URL
54
+ * @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
55
+ * @returns {string} URL
56
+ */
57
+ buildUrl(baseUrl: string, param: {
58
+ [key: string]: string | string[] | boolean;
59
+ }): string;
60
+ private processedTime;
61
+ /**
62
+ * 쓰로틀링 처리
63
+ * @returns
64
+ */
65
+ checkBoundsChangeThrottleTime(): boolean;
66
+ getBaseToMapZoom(zoomBase: number): number;
67
+ getMapToBaseZoom(mapZoom: number): number;
68
+ morph(position: Position, zoom: number, option?: Record<string, unknown>): void;
69
+ printStatus(): void;
70
+ }