LivemapController
LivemapController(int id, {OnMapReadyCallback? onMapReady, OnPinpointOpenCallback? onPinpointOpen, OnPinpointCloseCallback? onPinpointClose, OnContentUpdatedCallback? onContentUpdated, OnIndoorFeatureClickCallback? onIndoorFeatureClick, OnIndoorLevelChangedCallback? onIndoorLevelChanged, OnIndoorLevelsChangedCallback? onIndoorLevelsChanged, OnMapClickCallback? onMapClick, OnPinpointUpdatedCallback? onPinpointUpdated, OnEventUpdatedCallback? onEventUpdated, OnUserLoginCallback? onUserLogin})
Implementation
LivemapController(int id,
{this.onMapReady,
this.onPinpointOpen,
this.onPinpointClose,
this.onContentUpdated,
this.onIndoorFeatureClick,
//this.onFloorChanged,
this.onIndoorLevelChanged,
this.onIndoorLevelsChanged,
this.onMapClick,
// this.onContentUpdated,
this.onPinpointUpdated,
this.onEventUpdated,
this.onUserLogin}) {
_channel = MethodChannel('MapView/$id');
_channel.setMethodCallHandler(_handleMethod);
_onMapReadyPlatform.add((_) {
if (onMapReady != null) {
onMapReady!();
}
});
_onMapClickPlatform.add((dynamic coordinates) {
if (onMapClick != null) {
onMapClick!(coordinates);
}
});
_onPinpointOpenPlatform.add((dynamic pinpointId) {
if (onPinpointOpen != null) {
onPinpointOpen!(pinpointId);
}
});
_onPinpointClosePlatform.add((_) {
if (onPinpointClose != null) {
onPinpointClose!();
}
});
// _onContentUpdatedPlatform.add((Map<String, dynamic> contentUpdated) {
// print(contentUpdated);
// if (onContentUpdated != null) {
// onContentUpdated!(contentUpdated);
// }
// });
_onPinpointUpdatedPlatform.add((List<dynamic> pinpoints) {
if (onPinpointUpdated != null) {
onPinpointUpdated!(pinpoints);
}
});
_onEventUpdatedPlatform.add((List<dynamic> events) {
if (onEventUpdated != null) {
onEventUpdated!(events);
}
});
_onUserLoginPlatform.add((_) {
if (onUserLogin != null) {
onUserLogin!();
}
});
_onIndoorFeatureClickPlatform.add((dynamic indoorFeature) {
if (onIndoorFeatureClick != null) {
onIndoorFeatureClick!(indoorFeature);
}
});
// _onFloorChangedPlatform.add((dynamic data) {
// if (onFloorChanged != null) {
// onFloorChanged!(data);
// }
// });
_onIndoorLevelChangedPlatform.add((dynamic data) {
if (onIndoorLevelChanged != null) {
onIndoorLevelChanged!(data);
}
});
_onIndoorLevelsChangedPlatform.add((List<dynamic> data) {
if (onIndoorLevelsChanged != null) {
onIndoorLevelsChanged!(data);
}
});
}