@mint-ui/map 0.1.2-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.
Files changed (2) hide show
  1. package/README.md +42 -4
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -1,7 +1,9 @@
1
- <h1>@mint-ui/map</h1>
1
+ # @mint-ui/map
2
2
 
3
- **@mint-ui**
4
- React map library
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
- ### Document / Reference Site
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,12 +1,13 @@
1
1
  {
2
2
  "name": "@mint-ui/map",
3
- "version": "0.1.2-beta",
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", "typescript"],
10
11
  "license": "MIT",
11
12
  "private": false,
12
13
  "devDependencies": {