From 11355dc18cc57c0a321b8407a7e8f4eb427450a7 Mon Sep 17 00:00:00 2001 From: Wei Shen Date: Sun, 14 Apr 2024 14:51:22 +0800 Subject: [PATCH] docs: props docs in readme --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a7b263..c5f285b 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,6 @@ import LeafletMapView from 'react-native-leaflet-map'; maxNativeZoom: 18, minZoom: 11, maxZoom: 20, - // bounds: ONEMAP_MAX_BOUNDS, }, ]} mapMarkers={[ @@ -48,6 +47,16 @@ import LeafletMapView from 'react-native-leaflet-map'; ; ``` +## 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: