google-maps-react-markers 1.1.1 → 1.1.2
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 +52 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
1
|
+
<h1 align="center">google-maps-react-markers</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://www.npmjs.com/package/google-maps-react-markers" target="_blank">
|
|
5
|
+
<img src="https://img.shields.io/npm/v/google-maps-react-markers.svg?style=flat-square" alt="NPM" />
|
|
6
|
+
</a>
|
|
7
|
+
<a href="https://npm-stat.com/charts.html?package=google-maps-react-markers" target="_blank">
|
|
8
|
+
<img src="https://img.shields.io/npm/dt/google-maps-react-markers.svg?style=flat-square" alt="NPM total downloads" title="last year">
|
|
9
|
+
</a>
|
|
10
|
+
<img src="https://img.shields.io/badge/Maintained%3F-yes-green.svg?style=flat-square" alt="Maintained" />
|
|
11
|
+
<a href="https://github.com/giorgiabosello/google-maps-react-markers/blob/master/LICENCE.md" target="_blank">
|
|
12
|
+
<img src="https://img.shields.io/github/license/giorgiabosello/google-maps-react-markers?style=flat-square" alt="GitHub license: MIT" />
|
|
13
|
+
</a>
|
|
14
|
+
<img src="https://img.shields.io/github/stars/giorgiabosello/google-maps-react-markers?style=flat-square" alt="GitHub stars" />
|
|
15
|
+
<a href="https://github.com/giorgiabosello/google-maps-react-markers/issues" target="_blank">
|
|
16
|
+
<img src="https://img.shields.io/github/issues/giorgiabosello/google-maps-react-markers?style=flat-square" alt="GitHub open issues" />
|
|
17
|
+
</a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
Google Maps library that accepts markers as react components and works with React 18+.
|
|
4
21
|
|
|
5
22
|
It supports a small set of the props of [Google Map React](https://github.com/google-map-react/google-map-react). Clustering also is possible.
|
|
6
23
|
The library implements [Google Maps Custom Overlays](https://developers.google.com/maps/documentation/javascript/customoverlays) official library.
|
|
7
24
|
|
|
8
|
-
[](https://www.npmjs.com/package/google-maps-react-markers)  [](https://github.com/giorgiabosello/google-maps-react-markers/blob/master/LICENCE.md) 
|
|
9
|
-
[](https://github.com/giorgiabosello/google-maps-react-markers/issues)
|
|
10
|
-
|
|
11
25
|
**If you like this library, please consider supporting me ❤️**
|
|
12
26
|
|
|
13
27
|
[](https://www.buymeacoffee.com/giorgiabosello)
|
|
14
28
|
[](https://www.paypal.me/giorgiabosello)
|
|
15
29
|
|
|
16
|
-
##
|
|
30
|
+
## 🚀 Demo
|
|
31
|
+
|
|
32
|
+
<a href="https://giorgiabosello.github.io/google-maps-react-markers/" target="blank">
|
|
33
|
+
<img src="https://img.shields.io/website?url=https%3A%2F%2Fgiorgiabosello.github.io%2Fgoogle-maps-react-markers&logo=github&style=flat-square" />
|
|
34
|
+
</a>
|
|
35
|
+
|
|
36
|
+
See it in action [here](https://giorgiabosello.github.io/google-maps-react-markers/) _(API KEY not provided)_.
|
|
37
|
+
|
|
38
|
+
Demo source code is available [here](https://github.com/giorgiabosello/google-maps-react-markers/tree/master/docs/src)
|
|
39
|
+
|
|
40
|
+
## 🛠 Install
|
|
17
41
|
|
|
18
42
|
```bash
|
|
19
43
|
pnpm add google-maps-react-markers
|
|
@@ -31,7 +55,7 @@ or
|
|
|
31
55
|
npm install --save google-maps-react-markers
|
|
32
56
|
```
|
|
33
57
|
|
|
34
|
-
## Usage
|
|
58
|
+
## 💻 Usage
|
|
35
59
|
|
|
36
60
|
```jsx
|
|
37
61
|
const App = () => {
|
|
@@ -75,7 +99,7 @@ const App = () => {
|
|
|
75
99
|
export default App
|
|
76
100
|
```
|
|
77
101
|
|
|
78
|
-
## Props
|
|
102
|
+
## 🧐 Props
|
|
79
103
|
|
|
80
104
|
| Prop | Type | Required | Default | Description |
|
|
81
105
|
| -------------------- | -------- | -------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -95,7 +119,7 @@ export default App
|
|
|
95
119
|
| mapMinHeight | string | no | `'unset'` | Min height of the map |
|
|
96
120
|
| containerProps | object | no | `{}` | Props for the div container of the map |
|
|
97
121
|
|
|
98
|
-
## Clustering
|
|
122
|
+
## 📍 Clustering
|
|
99
123
|
|
|
100
124
|
For clustering, follow this [guide](https://www.leighhalliday.com/google-maps-clustering) using [useSupercluster Hook](https://github.com/leighhalliday/use-supercluster), but use bounds in this way:
|
|
101
125
|
|
|
@@ -115,6 +139,23 @@ const onMapChange = ({ bounds, zoom }) => {
|
|
|
115
139
|
}
|
|
116
140
|
```
|
|
117
141
|
|
|
118
|
-
##
|
|
142
|
+
## 💻 Built with
|
|
143
|
+
|
|
144
|
+
- [React](https://reactjs.org/)
|
|
145
|
+
- [Google Maps Custom Overlays](https://developers.google.com/maps/documentation/javascript/customoverlays)
|
|
146
|
+
- [ESLint](https://eslint.org/): for linting
|
|
147
|
+
- [Prettier](https://prettier.io/): for code formatting
|
|
148
|
+
|
|
149
|
+
## 🗒 License
|
|
119
150
|
|
|
120
151
|
MIT © [giorgiabosello](https://github.com/giorgiabosello)
|
|
152
|
+
|
|
153
|
+
## 🙏 Support
|
|
154
|
+
|
|
155
|
+
[](https://www.buymeacoffee.com/giorgiabosello)
|
|
156
|
+
[](https://www.paypal.me/giorgiabosello)
|
|
157
|
+
|
|
158
|
+
<hr>
|
|
159
|
+
<p align="center">
|
|
160
|
+
Developed with ❤️ in Italy 🇮🇹
|
|
161
|
+
</p>
|