createPolygonAnnotationManager method

Future<PolygonAnnotationManager> createPolygonAnnotationManager({
  1. String? id,
  2. String? below,
})

Create a PolygonAnnotationManager to add/remove/update PolygonAnnotations on the map.

If id is specified, the string is used as an identifier for a layer and a source backing the create manager. Use below to specify the id of the layer above the annotation layer.

Implementation

Future<PolygonAnnotationManager> createPolygonAnnotationManager(
    {String? id, String? below}) async {
  return _mapboxMapsPlatform
      .createAnnotationManager('polygon', id: id, belowLayerId: below)
      .then((value) => PolygonAnnotationManager._(
          id: value,
          messenger: _mapboxMapsPlatform.binaryMessenger,
          channelSuffix: _mapboxMapsPlatform.channelSuffix.toString()));
}