Tracking Profiles

Use Search API to monitor region around POIs using React Native plugin

  1. Use Search API to monitor region around POIs

Use Search API to monitor region around POIs

Regions creation is enabled on the nearest result of the Search API request. More details in the Monitor POIs documentation

Radius of POI

When you create a Geofence around a POI, manually define the radius value:

JavaScript
        WoosmapGeofencing.setPoiRadius("100")
    .then((value: string) => {
        console.log(value);
    })
    .catch((error: any) => {
        alert('message: ' + error.message);
    });

    

or choose the user_properties subfield that corresponds to radius value of the Geofence:

JavaScript
        WoosmapGeofencing.setPoiRadius("radiusPOI")
    .then((value: string) => {
        console.log(value);
    })
    .catch((error: any) => {
        alert('message: ' + error.message);
    });

    

Get POI (Woosmap Assests) from the local database

Call getPois method to get an array of POI from the local db.

JavaScript
        WoosmapGeofencing.getPois(storeId) //storeId is optional
    .then((value: Location[]) => {
        console.log(String(value.length));
    })
    .catch((error: any) => {
        console.error(error);
    });

    

Remove POI (Woosmap Assets)

Call removePois method to remove all POIs

JavaScript
        WoosmapGeofencing.removePois()
    .then((value: string) => {
        console.log(value);
    })
    .catch((error: any) => {
        console.error(error);
    });

    
Was this article helpful?
Have more questions? Submit a request