MapboxMap constructor
MapboxMap({
- required _MapboxMapsPlatform mapboxMapsPlatform,
- OnStyleLoadedListener? onStyleLoadedListener,
- OnCameraChangeListener? onCameraChangeListener,
- OnMapIdleListener? onMapIdleListener,
- OnMapLoadedListener? onMapLoadedListener,
- OnMapLoadErrorListener? onMapLoadErrorListener,
- OnRenderFrameStartedListener? onRenderFrameStartedListener,
- OnRenderFrameFinishedListener? onRenderFrameFinishedListener,
- OnSourceAddedListener? onSourceAddedListener,
- OnSourceDataLoadedListener? onSourceDataLoadedListener,
- OnSourceRemovedListener? onSourceRemovedListener,
- OnStyleDataLoadedListener? onStyleDataLoadedListener,
- OnStyleImageMissingListener? onStyleImageMissingListener,
- OnStyleImageUnusedListener? onStyleImageUnusedListener,
- OnMapTapListener? onMapTapListener,
- OnMapLongTapListener? onMapLongTapListener,
- OnMapScrollListener? onMapScrollListener,
Implementation
MapboxMap({
required _MapboxMapsPlatform mapboxMapsPlatform,
this.onStyleLoadedListener,
this.onCameraChangeListener,
this.onMapIdleListener,
this.onMapLoadedListener,
this.onMapLoadErrorListener,
this.onRenderFrameStartedListener,
this.onRenderFrameFinishedListener,
this.onSourceAddedListener,
this.onSourceDataLoadedListener,
this.onSourceRemovedListener,
this.onStyleDataLoadedListener,
this.onStyleImageMissingListener,
this.onStyleImageUnusedListener,
this.onMapTapListener,
this.onMapLongTapListener,
this.onMapScrollListener,
}) : _mapboxMapsPlatform = mapboxMapsPlatform {
_proxyBinaryMessenger = _mapboxMapsPlatform.binaryMessenger;
annotations = _AnnotationManager(mapboxMapsPlatform: _mapboxMapsPlatform);
if (onStyleLoadedListener != null) {
_mapboxMapsPlatform.onStyleLoadedPlatform.add((argument) {
onStyleLoadedListener?.call(argument);
});
}
if (onCameraChangeListener != null) {
_mapboxMapsPlatform.onCameraChangeListenerPlatform.add((argument) {
onCameraChangeListener?.call(argument);
});
}
if (onMapIdleListener != null) {
_mapboxMapsPlatform.onMapIdlePlatform.add((argument) {
onMapIdleListener?.call(argument);
});
}
if (onMapLoadedListener != null) {
_mapboxMapsPlatform.onMapLoadedPlatform.add((argument) {
onMapLoadedListener?.call(argument);
});
}
if (onMapLoadErrorListener != null) {
_mapboxMapsPlatform.onMapLoadErrorPlatform.add((argument) {
onMapLoadErrorListener?.call(argument);
});
}
if (onRenderFrameFinishedListener != null) {
_mapboxMapsPlatform.onRenderFrameFinishedPlatform.add((argument) {
onRenderFrameFinishedListener?.call(argument);
});
}
if (onRenderFrameStartedListener != null) {
_mapboxMapsPlatform.onRenderFrameStartedPlatform.add((argument) {
onRenderFrameStartedListener?.call(argument);
});
}
if (onSourceAddedListener != null) {
_mapboxMapsPlatform.onSourceAddedPlatform.add((argument) {
onSourceAddedListener?.call(argument);
});
}
if (onSourceDataLoadedListener != null) {
_mapboxMapsPlatform.onSourceDataLoadedPlatform.add((argument) {
onSourceDataLoadedListener?.call(argument);
});
}
if (onSourceRemovedListener != null) {
_mapboxMapsPlatform.onSourceRemovedPlatform.add((argument) {
onSourceRemovedListener?.call(argument);
});
}
if (onStyleDataLoadedListener != null) {
_mapboxMapsPlatform.onStyleDataLoadedPlatform.add((argument) {
onStyleDataLoadedListener?.call(argument);
});
}
if (onStyleImageMissingListener != null) {
_mapboxMapsPlatform.onStyleImageMissingPlatform.add((argument) {
onStyleImageMissingListener?.call(argument);
});
}
if (onStyleImageUnusedListener != null) {
_mapboxMapsPlatform.onStyleImageUnusedPlatform.add((argument) {
onStyleImageUnusedListener?.call(argument);
});
}
_setupGestures();
}