feat: add service area restriction overlay and bump version to 1.0.3+8

This commit is contained in:
Hamza-Ayed
2026-08-11 00:14:03 +03:00
parent e52afa1863
commit bb9517826e
10 changed files with 128 additions and 55 deletions
@@ -56,12 +56,27 @@ class CountryPolygons {
const LatLng(30.00, 30.80), // 6 أكتوبر / غرب القاهرة
];
// ==========================================================
// 4. العراق: بغداد ومساحة واسعة من وسط وجنوب وشمال العراق
// ==========================================================
static final List<LatLng> iraqBoundary = [
const LatLng(37.30, 42.00), // الشمال
const LatLng(37.00, 46.00), // الشمال الشرقي
const LatLng(34.00, 46.50), // شرق بغداد
const LatLng(29.50, 48.50), // البصرة
const LatLng(29.00, 46.00), // الجنوب
const LatLng(31.00, 43.00), // الجنوب الغربي
const LatLng(33.00, 39.00), // الغرب
const LatLng(35.00, 41.00), // الشمال الغربي
];
/// دالة للتحقق مما إذا كان الموقع ضمن نطاق الخدمة المدعوم
static bool isServiceSupported(LatLng? point) {
if (point == null) return false;
if (_isPointInPolygon(point, jordanBoundary)) return true;
if (_isPointInPolygon(point, syriaBoundary)) return true;
if (_isPointInPolygon(point, egyptBoundary)) return true;
if (_isPointInPolygon(point, iraqBoundary)) return true;
return false;
}
@@ -74,6 +89,8 @@ class CountryPolygons {
return 'https://routec.intaleq.xyz/route';
case 'Egypt':
return 'https://routec.intaleq.xyz/route-eg';
case 'Iraq':
return 'https://routec.intaleq.xyz/route'; // You can update this if Iraq has a specific routing API
default:
// الافتراضي في حالة لم يقع الموقع ضمن أي من المضلعات
return 'https://routec.intaleq.xyz/route';
@@ -87,6 +104,7 @@ class CountryPolygons {
if (_isPointInPolygon(point, jordanBoundary)) return "Jordan";
if (_isPointInPolygon(point, syriaBoundary)) return "Syria";
if (_isPointInPolygon(point, egyptBoundary)) return "Egypt";
if (_isPointInPolygon(point, iraqBoundary)) return "Iraq";
return "unsupported";
}