feat : some changes
This commit is contained in:
@@ -22,7 +22,9 @@ class MapWidgetLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
Timer? _debounceTimer;
|
||||
RxBool isLoading = false.obs;
|
||||
|
||||
late FMTCTileProvider tileProvider;
|
||||
/* FMTCTileProvider tileProvider = FMTCTileProvider(
|
||||
stores: {mapStoreKey: BrowseStoreStrategy.readUpdateCreate},
|
||||
);*/
|
||||
|
||||
RxList<LatLng> markerLocations = RxList();
|
||||
RootLogic rootLogic = Get.find<RootLogic>();
|
||||
@@ -57,8 +59,6 @@ class MapWidgetLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
}
|
||||
});
|
||||
|
||||
tileProvider = FMTCTileProvider(stores: {mapStoreKey: BrowseStoreStrategy.readUpdateCreate});
|
||||
|
||||
repository.addLocations(generateRandomLocations(currentLocation.value, 10, 100));
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,15 @@ class MapWidget extends GetView<MapWidgetLogic> {
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
|
||||
Positioned(
|
||||
top: 10,
|
||||
right: 0,
|
||||
left: 0,
|
||||
child: RMarquee(text: "This is scrolling text from right to left..."),
|
||||
),
|
||||
|
||||
|
||||
ObxValue((errorType) {
|
||||
if (errorType.isNotEmpty) {
|
||||
if (errorType.contains(ErrorLocationType.serviceDisabled)) {
|
||||
@@ -104,7 +113,6 @@ class MapWidget extends GetView<MapWidgetLogic> {
|
||||
flags: InteractiveFlag.all & ~InteractiveFlag.rotate,
|
||||
),
|
||||
initialZoom: 15,
|
||||
|
||||
onPositionChanged: (camera, hasGesture) {
|
||||
controller.currentZoom.value = camera.zoom;
|
||||
/* controller.debouncedUpdateVisibleMarkers(
|
||||
@@ -118,7 +126,7 @@ class MapWidget extends GetView<MapWidgetLogic> {
|
||||
TileLayer(
|
||||
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
userAgentPackageName: 'ir.mnpc.rasadyar',
|
||||
tileProvider: controller.tileProvider,
|
||||
// tileProvider: controller.tileProvider,
|
||||
),
|
||||
|
||||
ObxValue((markers) {
|
||||
@@ -181,24 +189,26 @@ class MapWidget extends GetView<MapWidgetLogic> {
|
||||
);
|
||||
}
|
||||
|
||||
List<Marker> buildMarkers(RxList<LatLng> latLng) => latLng
|
||||
.map(
|
||||
(element) => Marker(
|
||||
point: element,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
Get.bottomSheet(
|
||||
detailsBottomSheet(),
|
||||
isScrollControlled: true,
|
||||
isDismissible: true,
|
||||
ignoreSafeArea: false,
|
||||
);
|
||||
},
|
||||
icon: Icon(CupertinoIcons.location_solid, color: AppColor.error),
|
||||
),
|
||||
),
|
||||
List<Marker> buildMarkers(RxList<LatLng> latLng) =>
|
||||
latLng
|
||||
.map(
|
||||
(element) =>
|
||||
Marker(
|
||||
point: element,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
Get.bottomSheet(
|
||||
detailsBottomSheet(),
|
||||
isScrollControlled: true,
|
||||
isDismissible: true,
|
||||
ignoreSafeArea: false,
|
||||
);
|
||||
},
|
||||
icon: Icon(CupertinoIcons.location_solid, color: AppColor.error),
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
.toList();
|
||||
|
||||
Widget detailsBottomSheet() {
|
||||
return BaseBottomSheet(
|
||||
|
||||
Reference in New Issue
Block a user