MapRF constructor
MapRF({
- Key? key,
- IConfigRF? IConfig,
- CoordinateRF? CurrentLocation,
- SettingsRF? Settings,
- List<
MarkerRF> Markers = const [], - List<
PanelRF> Panels = const [], - PolylineRF? polyline,
- List<
IShapeRF> ? Fences, - required MapControllerRF Controller,
- dynamic OnMapScroll()?,
- dynamic OnTap()?,
- dynamic OnCircleTap()?,
- dynamic OnPolygonTap()?,
- dynamic OnMapCreated()?,
- dynamic OnPointerUp()?,
Implementation
MapRF({
super.key,
this.IConfig,
this.CurrentLocation,
this.Settings,
this.Markers = const [],
this.Panels = const [],
this.polyline,
this.Fences,
required this.Controller,
this.OnMapScroll,
this.OnTap,
this.OnCircleTap,
this.OnPolygonTap,
this.OnMapCreated,
this.OnPointerUp,
}) {
LibsRF();
ConfigurationRF configuration = ConfigurationRF();
if (IConfig != null) IConfig!.configure(configuration);
RFN = RapidFireNavigator(
// configuration,
Controller: Controller,
Settings: Settings,
polyline: polyline,
Fences: Fences,
Markers: Markers,
OnMapScroll: OnMapScroll,
OnMapTap: OnTap,
OnCircleTap: OnCircleTap,
OnPolygonTap: OnPolygonTap,
OnMapCreated: OnMapCreated,
onPointerUp: OnPointerUp,
);
Controller.Http = HttpClientRF(config: IConfig);
// if (IConfig == null) {
// // var appConfig = DefaultAppConfigRF(
// // currentLocation: CurrentLocation,
// // );
// // LibsRF.instance.LoadConfiguration(appConfig);
// RFN = RapidFireNavigator(
// // _configuration,
// Controller: Controller,
// Settings: Settings,
// polyline: polyline,
// Fences: Fences,
// Markers: Markers,
// OnMapScroll: OnMapScroll,
// OnMapTap: OnTap,
// OnCircleTap: OnCircleTap,
// OnPolygonTap: OnPolygonTap,
// OnMapCreated: OnMapCreated,
// onPointerUp: OnPointerUp,
// );
// Controller.RFN.Engine.Map!.OnTap = OnTap;
// Controller.Http = HttpClientRF(config: IConfig);
// } else {
// LibsRF.instance.LoadConfiguration(IConfig!);
// RFN = RapidFireNavigator(
// // IConfig!,
// Controller: Controller,
// Settings: Settings,
// polyline: polyline,
// Fences: Fences,
// Markers: Markers,
// OnMapScroll: OnMapScroll,
// OnMapTap: OnTap,
// OnCircleTap: OnCircleTap,
// OnPolygonTap: OnPolygonTap,
// OnMapCreated: OnMapCreated,
// onPointerUp: OnPointerUp,
// );
// Controller.Http = HttpClientRF(config: IConfig);
// }
Controller.RFN = RFN;
_layout = LayoutRF(
Panel: Panels,
polyline: polyline,
RFN: RFN,
Controller: Controller,
);
}