google-maps-react-markers 2.0.0-alpha.2 → 2.0.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 (2) hide show
  1. package/README.md +9 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -30,8 +30,9 @@ The library implements [Google Maps Custom Overlays](https://developers.google.c
30
30
  [![Buy me a Coffee](https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/giorgiabosello)
31
31
  [![PayPal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://www.paypal.me/giorgiabosello)
32
32
 
33
- ## 🚧 Status
34
- > **Currently working on a fully typed TypeScript version of the library. It will be released soon. Stay tuned!**
33
+ ## 💬 Discussion
34
+
35
+ > **Released TypeScript version of the library!**
35
36
 
36
37
  Feedbacks are welcome in [this discussion](https://github.com/giorgiabosello/google-maps-react-markers/discussions/109).
37
38
 
@@ -108,7 +109,7 @@ const App = () => {
108
109
  lat={lat}
109
110
  lng={lng}
110
111
  markerId={name}
111
- onClick={onMarkerClick}
112
+ onClick={onMarkerClick} // you need to manage this prop on your Marker component!
112
113
  // draggable={true}
113
114
  // onDragStart={(e, { latLng }) => {}}
114
115
  // onDrag={(e, { latLng }) => {}}
@@ -164,6 +165,10 @@ export default App
164
165
  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:
165
166
 
166
167
  ```jsx
168
+ const [mapBounds, setMapBounds] = useState({
169
+ bounds: [0, 0, 0, 0],
170
+ zoom: 0,
171
+ })
167
172
  const onMapChange = ({ bounds, zoom }) => {
168
173
  const ne = bounds.getNorthEast()
169
174
  const sw = bounds.getSouthWest()
@@ -218,4 +223,4 @@ MIT © [giorgiabosello](https://github.com/giorgiabosello)
218
223
  <hr>
219
224
  <p align="center">
220
225
  Developed with ❤️ in Italy 🇮🇹
221
- </p>
226
+ </p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "google-maps-react-markers",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0",
4
4
  "description": "Google Maps library with markers as react components",
5
5
  "author": "Giorgia Bosello",
6
6
  "license": "MIT",