Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
weishenho committed Apr 14, 2024
1 parent c98a303 commit 443cc56
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,33 @@ import LeafletMapView from 'react-native-leaflet-map';
##### Screenshot
<img width="314" alt="onemap" src="https://github.com/weishenho/react-native-leaflet-map/assets/15232303/bb1f6eae-d6c2-4131-afb6-6ca928265b35">

## Marker Cluster
```typescript
mapClusterMarkers={{
mapMarkers: hawkersJSON.SrchResults.map((data) => {
const [lat, lng] = data.LatLng.split(',').map((d) => Number(d));
return {
id: data.LatLng,
icon: 'https://cdn-icons-png.flaticon.com/128/5193/5193665.png',
size: [40, 40],
iconAnchor: [20, 40],
position: {
lat: lat,
lng: lng,
},
} as MapMarker;
}),
maxClusterRadius: 100,
clusterIcon:
'https://cdn-icons-png.flaticon.com/128/5193/5193665.png',
clusterIconSize: [40, 40],
clusterIconAnchor: [40 / 2, 40],
}}
```

#### Demo Video
[![Markers Clustering Demo](https://img.youtube.com/vi/-hVGKoGNVY8/0.jpg)](http://www.youtube.com/watch?feature=player_embedded&v=-hVGKoGNVY8)



## Acknowledgement & References
Expand Down

0 comments on commit 443cc56

Please sign in to comment.