markMapReady method
void
markMapReady()
Implementation
void markMapReady() {
if (_mapReady) return;
_mapReady = true;
// ✅ 先应用初始相机(如果有)
if (_initialLatitude != null && _initialLongitude != null) {
moveCamera(
CameraPosition(
target: LatLng(_initialLatitude!, _initialLongitude!),
zoom: _initialZoom ?? 14,
),
);
// 只执行一次
_initialLatitude = null;
_initialLongitude = null;
_initialZoom = null;
}
// ⭐ 回放所有缓存操作
for (final action in _pendingActions) {
if (_disposed) break;
action();
}
_pendingActions.clear();
}