feat: add vehicle customization, Arabic search normalization, and smooth movement interpolation

This commit is contained in:
Hamza-Ayed
2026-09-19 12:34:25 +03:00
parent 43ad2e0ad4
commit 55830beee8
16 changed files with 2295 additions and 393 deletions
@@ -90,6 +90,7 @@ class IntaleqMapController {
// stale handle so the next [setUserMarker] call re-creates it.
_userSymbol = null;
await _registerDefaultImages();
await applyMarkerVisibilityDefaults();
// Safely execute camera updates queued before style finished rendering
if (_pendingCameraUpdate != null) {
@@ -205,6 +206,10 @@ class IntaleqMapController {
Future<mgl.Symbol?> addMarker(Marker marker) async {
if (!_isStyleLoaded) return null;
try {
if (_symbols.containsKey(marker.markerId)) {
await _updateMarker(marker);
return _symbols[marker.markerId];
}
await _loadBitmapIfNeeded(marker.icon);
final symbol = await _raw.addSymbol(marker.toSymbolOptions());
_symbols[marker.markerId] = symbol;
@@ -223,7 +228,10 @@ class IntaleqMapController {
Future<void> _updateMarker(Marker marker) async {
if (!_isStyleLoaded) return;
final symbol = _symbols[marker.markerId];
if (symbol == null) return;
if (symbol == null) {
await addMarker(marker);
return;
}
try {
await _loadBitmapIfNeeded(marker.icon);
await _raw.updateSymbol(symbol, marker.toSymbolOptions());
@@ -243,6 +251,12 @@ class IntaleqMapController {
} catch (_) {}
}
/// Removes a marker from the map by its [MarkerId].
Future<void> removeMarker(MarkerId id) => _removeMarker(id);
/// Removes a polyline from the map by its [PolylineId].
Future<void> removePolyline(PolylineId id) => _removePolyline(id);
// ── User-location puck (imperative, high-frequency) ────────
/// Places or moves the single "user location" puck.
@@ -89,6 +89,17 @@ class InlqBitmap {
);
}
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is InlqBitmap &&
runtimeType == other.runtimeType &&
mapLibreImageId == other.mapLibreImageId &&
size == other.size;
@override
int get hashCode => Object.hash(mapLibreImageId, size);
@override
String toString() => 'InlqBitmap($mapLibreImageId)';
}