init static method

Future<MFMapViewController> init(
  1. int mapId,
  2. _MFMapViewState mapState
)

Initialize control of a Map4d with mapId.

Mainly for internal use when instantiating a MFMapViewController passed in Map4dMap.onMapCreated callback.

Implementation

static Future<MFMapViewController> init(
  int mapId,
  _MFMapViewState mapState,
) async {
  final channel = MethodChannel('plugin:map4d-map-view-type_$mapId');
  await _init(channel);
  return MFMapViewController._(mapId, mapState, channel);
}