putGeoEntity method

void putGeoEntity(
  1. String name,
  2. Map<String, dynamic> payload, {
  3. required double latitude,
  4. required double longitude,
  5. double lifetimeSeconds = 30,
})

Put a geo-entity on this geo-channel with a payload. You can query geo-entities and receive their payload with getNearbyEntities. You can specify a custom lifetime. The standard lifetime for geo-entities is 30 seconds, that means, after 30 seconds, they will disappear.

Implementation

void putGeoEntity(String name, Map<String, dynamic> payload,
    {required double latitude,
    required double longitude,
    double lifetimeSeconds = 30}) {
  if (phoenixChannel != null) {
    phoenixChannel!.push('put_geo_entity', {
      'name': name,
      'payload': "payload.toString()",
      'lat': latitude,
      'long': longitude,
      'lifetime': lifetimeSeconds
    });
  }
}