removePolygonMapObject method

  1. @override
bool removePolygonMapObject(
  1. PolygonMapObject polygonMapObject
)
override

Removes a polygon map object from the location view. polygonMapObject The polygon map object instance PolygonMapObject. Returns true if the operation is successful, false otherwise.

Example:

// Remove polygon map object
if (_polygonMapObject != null) {
 bool removed = _locationWindow!.removePolygonMapObject(
   _polygonMapObject!,
 );
 print("Removed polygon map object: $removed");
 _polygonMapObject = null;
}

Implementation

@override
bool removePolygonMapObject(PolygonMapObject polygonMapObject) {
    final _removePolygonMapObjectFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
        Uint8 Function(Pointer<Void>, Pointer<Void>),
        int Function(Pointer<Void>, Pointer<Void>)
      >('navigine_sdk_flutter_LocationWindow_removePolygonMapObject__PolygonMapObject'));
    final _polygonMapObjectHandle = navigine_sdk_flutter_PolygonMapObject_ToFfi(polygonMapObject);
    final _handle = this.handle;
    final __resultHandle = _removePolygonMapObjectFfi(_handle, _polygonMapObjectHandle);
    navigine_sdk_flutter_PolygonMapObject_ReleaseFfiHandle(_polygonMapObjectHandle);
    final _result = navigine_sdk_flutter_bool_FromFfi(__resultHandle);
    navigine_sdk_flutter_bool_ReleaseFfiHandle(__resultHandle);
    return _result;
}