onViewRendered method
- dynamic data
Called by the View after rendering is finished
Implementation
@override
void onViewRendered(final dynamic data) {
// if (data['markersIds']!.length > 0) {
if (_mapViewMoveStateChangedCallback != null) {
final bool cameraIsMoving = data['cameraStatus'] != 0;
final Coordinates topLeft = Coordinates.fromLatLong(
data['leftTopX'],
data['leftTopY'],
);
final Coordinates rightBottom = Coordinates.fromLatLong(
data['rightBottomX'],
data['rightBottomY'],
);
//bool viewDataTransitionStatus = data['viewDataTransitionStatus'];
final RectangleGeographicArea pArea = RectangleGeographicArea(
topLeft: topLeft,
bottomRight: rightBottom,
);
if (_isCameraMoving != cameraIsMoving) {
//if(viewDataTransitionStatus == false) {
_isCameraMoving = cameraIsMoving;
if (_mapViewMoveStateChangedCallback != null) {
if (_delayedEvent != null) {
_delayedEvent!.cancel();
}
_delayedEvent = Timer(const Duration(milliseconds: 100), () {
_mapViewMoveStateChangedCallback!(cameraIsMoving, pArea);
});
}
//}
}
}
preferences.markers.onViewRendered(data);
if (_mapViewRenderedCallback != null) {
_mapViewRenderedCallback!(MapViewRenderInfo.fromJson(data));
}
// }
}