@mint-ui/map 0.1.3-beta → 0.1.4-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.
- package/README.md +42 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
# @mint-ui/map
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
- React map library
|
|
4
|
+
- Control various map with one interface
|
|
5
|
+
- Google, Naver map supported now
|
|
6
|
+
- Typescript supported
|
|
5
7
|
|
|
6
8
|
## Installation
|
|
7
9
|
|
|
@@ -11,5 +13,41 @@ yarn add @mint-ui/map
|
|
|
11
13
|
npm install @mint-ui/map
|
|
12
14
|
```
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
## Examples
|
|
17
|
+
|
|
18
|
+
``` javascript
|
|
19
|
+
...
|
|
20
|
+
...
|
|
21
|
+
|
|
22
|
+
import { MapMarkerWrapper, MintMap, Position } from '@mint-ui/map'
|
|
23
|
+
|
|
24
|
+
const root = ReactDOM.createRoot(
|
|
25
|
+
document.getElementById('root')
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
function MyMapComponent(){
|
|
29
|
+
|
|
30
|
+
return <MintMap
|
|
31
|
+
mapType={'google'}
|
|
32
|
+
mapKey={'YOUR_GOOGLE_MAP_KEY'}
|
|
33
|
+
mapId='YOUR_GOOGLE_MAP_ID' //Use advanced markers in Google maps
|
|
34
|
+
base={{center:new Position(-25.344, 131.031), zoomLevel:12}}
|
|
35
|
+
>
|
|
36
|
+
{/* Your marker */}
|
|
37
|
+
<MapMarkerWrapper position={new Position(-25.344, 131.031)}>
|
|
38
|
+
|
|
39
|
+
{/* Your marker elements */}
|
|
40
|
+
<div style={{width:'10px', height:'10px', background:'red', borderRadius:'10px'}}></div>
|
|
41
|
+
|
|
42
|
+
</MapMarkerWrapper>
|
|
43
|
+
|
|
44
|
+
</MintMap>
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
root.render((<MyMapComponent/>))
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Document / Reference Site
|
|
15
53
|
- To be continue...
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mint-ui/map",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4-beta",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"browser": "./dist/index.umd.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"repository": "https://github.com/dev-rsquare/mint-ui-map",
|
|
9
9
|
"author": "RSQUARE",
|
|
10
|
-
"keywords": ["react", "map", "google", "naver", "library"],
|
|
10
|
+
"keywords": ["react", "map", "google", "naver", "library", "typescript"],
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"private": false,
|
|
13
13
|
"devDependencies": {
|