Skip to content

Commit

Permalink
docs: props docs in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei Shen committed Apr 14, 2024
1 parent 9b69f77 commit 11355dc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import LeafletMapView from 'react-native-leaflet-map';
maxNativeZoom: 18,
minZoom: 11,
maxZoom: 20,
// bounds: ONEMAP_MAX_BOUNDS,
},
]}
mapMarkers={[
Expand All @@ -48,6 +47,16 @@ import LeafletMapView from 'react-native-leaflet-map';
</View>;
```

## Props

| property | required | type | purpose |
| ----------------- | -------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mapLayers | optional | MapLayer array | An array of map layers \*\*\* Current only suppport 1 layer |
| mapMarkers | optional | MapMarker array | An array of map markers |
| mapCenterPosition | optional | {lat: [Lat], lng: [Lng]} object | The center position of the map. This coordinate will not be accurate if the map has been moved manually. However, calling the map's setMapCenterPosition function will cause the map to revert to this location |
| onMessageReceived | required | function | This function receives messages in the form of a WebviewLeafletMessage object from the map |
| zoom | optional | number | Desired zoom int value of the map. Typically (1 to 22)

## Acknowledgement & References

This project incorporates tailored integrations of functionalities sourced from various open-source repositories. The author extends sincere appreciation to the following repositories for their invaluable contributions. This project owes its success to their foundational support:
Expand Down

0 comments on commit 11355dc

Please sign in to comment.