25-12-2/1
This commit is contained in:
@@ -134,16 +134,32 @@ class _HomeAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
_MapControlButton(
|
||||
iconColor: Colors.blue,
|
||||
icon: Icons.satellite_alt,
|
||||
tooltip: 'Change Map Type'.tr,
|
||||
onPressed: homeCaptainController.changeMapType,
|
||||
),
|
||||
_MapControlButton(
|
||||
iconColor: Colors.blue,
|
||||
icon: Icons.streetview_sharp,
|
||||
tooltip: 'Toggle Traffic'.tr,
|
||||
onPressed: homeCaptainController.changeMapTraffic,
|
||||
),
|
||||
GetBuilder<HomeCaptainController>(
|
||||
builder: (controller) {
|
||||
return _MapControlButton(
|
||||
// تغيير الأيقونة واللون بناءً على الحالة
|
||||
icon: Icons.local_fire_department,
|
||||
iconColor: controller.isHeatmapVisible
|
||||
? Colors.orange
|
||||
: Colors.grey,
|
||||
tooltip: 'Show Heatmap'.tr,
|
||||
onPressed: controller.toggleHeatmap,
|
||||
);
|
||||
},
|
||||
),
|
||||
_MapControlButton(
|
||||
iconColor: Colors.blue,
|
||||
icon: Icons.my_location, // Changed for clarity
|
||||
tooltip: 'Center on Me'.tr,
|
||||
onPressed: () {
|
||||
@@ -225,12 +241,16 @@ class _MapView extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(bottom: 110, top: 300),
|
||||
fortyFiveDegreeImageryEnabled: true,
|
||||
onMapCreated: controller.onMapCreated,
|
||||
// onCameraMove: controller.onCameraMove,
|
||||
minMaxZoomPreference: const MinMaxZoomPreference(6, 18),
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: locationController.myLocation,
|
||||
zoom: 15,
|
||||
),
|
||||
// --- تم حذف onCameraMove الخاطئ ---
|
||||
// === إضافة الطبقة الحرارية هنا ===
|
||||
polygons: controller.heatmapPolygons,
|
||||
// =
|
||||
markers: {
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
@@ -538,6 +558,7 @@ class _MapControlButton extends StatelessWidget {
|
||||
required this.icon,
|
||||
required this.onPressed,
|
||||
required this.tooltip,
|
||||
required MaterialColor iconColor,
|
||||
});
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user