blueprint-geofencing
Geofencingblueprint is tool which is use for create multiple polygon on map and also apply diffrent color and display name of the polygon for perticuler area.User can also click on polygon and we can handle purticuler polygon click event.Also we can get notification for user enter and exit from area.
Prerequisites
You have to follow all bellow step for run google map in your application and if you didn't do that then follow bellow link all the steps.
https://github.com/react-native-community/react-native-maps/blob/master/docs/installation.md
Installation
After follow all the stpes for implement google map in your application, and successfully run google map in your application run this command in you project for install geofencing.
npm i react-native-geofencing-blueprint
Usage
// ...;; //Ppolygon list for you areaslet polygons = id: "k1nFj8b0imq9NzALveDA" fencePoints: latitude: 33982798 longitude: -1184710194 latitude: 339941135 longitude: -1184496422 latitude: 34002439 longitude: -1184669844 latitude: 339946827 longitude: -1184821803 name: "" userCount: 344 fillColor: "rgba(255, 95, 95,0.5)" id: "EtlI49XRiaKGUR8tbwqH" fencePoints: latitude: 339798087 longitude: -1184680274 latitude: 340075975 longitude: -1184175163 latitude: 340026524 longitude: -1184141017 latitude: 339955723 longitude: -1184231645 name: "Marina Del Rey" userCount: 200 fillColor: "rgba(255, 95, 95,0.5)"; { console; } { console; } { return <Geofencing data=polygons initialLatitude=339957146 initialLongitude=-1184790071 markerTitle='Test Title' markerdescription='Test Description' isInArea=thisisInStatus polygonClick=thisonPolygonClick/> ; }
Props
Name | Type | Description | Default |
---|---|---|---|
data |
Array | Array of polygon which you want to display on map | |
initialLatitude |
Number | Initial latitude that you want to display when load map | null |
initialLongitude |
Number | Initial longitude that you want to display when load map | |
markerTitle |
String | Maker title that you want to display when you click on maker | |
markerdescription |
String | Maker description that you want to display when you click on maker | |
isInArea |
Bool | Return user enter and exit from the area. | |
polygonClick |
Function | Detail of polygon on which you click |