@props(['stations']) @php $cleanMarkers = []; foreach ($stations as $station) { $s = (array) $station; $lat = isset($s['lat']) ? (float) $s['lat'] : null; $lng = isset($s['lng']) ? (float) $s['lng'] : null; // CORRETTO: Aggiunto il simbolo del dollaro $ a $lng if (!$lat || !$lng) continue; $cleanMarkers[] = [ 'id' => $s['id'] ?? null, 'name' => $s['name'] ?? ($s['manager'] ?? 'Distributore'), 'address' => $s['address'] ?? '', 'municipality' => $s['municipality_name'] ?? ($s['municipality'] ?? ''), 'price' => isset($s['price']) ? number_format($s['price'], 3, ',', '.') : '0,000', 'lat' => $lat, 'lng' => $lng, 'url' => isset($s['id']) ? route('stations.show', $s['id']) : '#' ]; } @endphp