Mapa interactivo de VeganPal

Descubre una nueva forma de explorar tu ciudad y viajar sin complicaciones. En nuestro mapa colaborativo encontrarás restaurantes 100% veganos, opciones vegetarianas, locales adaptados y tiendas exclusivas seleccionadas y valoradas por la comunidad.

Explora · Filtra · Descubre · Comparte

Explora por categoría

🗺️ Lugares cerca de ti

Explora opciones veganas, descubre nuevos lugares y encuentra sitios donde comer, comprar y disfrutar.

🌿 Explora VeganPal
Mostrando lugares de ejemplo
'; return; } /* ================================================= MAPA Madrid como ubicación inicial de demostración ================================================= */ var mapa = L.map('vp-leaflet-map', { zoomControl: true, attributionControl: true }).setView([40.4168, -3.7038], 13); /* ================================================= OPENSTREETMAP ================================================= */ L.tileLayer( 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 19, attribution: '© OpenStreetMap contributors' } ).addTo(mapa); /* ================================================= DATOS DE DEMOSTRACIÓN ================================================= */ var lugares = [ { id: 1, name: 'Verde Madrid', category: 'restaurant', icon: '🥗', type: 'Restaurante', lat: 40.4168, lng: -3.7038, address: 'Centro de Madrid', price: '€€', vegan: '100% vegetal' }, { id: 2, name: 'Green Coffee', category: 'cafe', icon: '☕', type: 'Cafetería', lat: 40.4215, lng: -3.7075, address: 'Zona Centro', price: '€', vegan: 'Opciones veganas' }, { id: 3, name: 'Eco Market', category: 'shop', icon: '🛒', type: 'Tienda', lat: 40.4115, lng: -3.6990, address: 'Barrio de Las Letras', price: '€€', vegan: 'Productos veganos' }, { id: 4, name: 'Pan Verde', category: 'bakery', icon: '🥐', type: 'Panadería', lat: 40.4250, lng: -3.7000, address: 'Malasaña', price: '€', vegan: 'Opciones veganas' }, { id: 5, name: 'Vegan Stay', category: 'hotel', icon: '🏡', type: 'Alojamiento', lat: 40.4300, lng: -3.7100, address: 'Chamberí', price: '€€€', vegan: 'Servicios veganos' }, { id: 6, name: 'Raíces Veganas', category: 'restaurant', icon: '🥗', type: 'Restaurante', lat: 40.4085, lng: -3.7120, address: 'Lavapiés', price: '€€', vegan: '100% vegetal' } ]; /* ================================================= ICONOS PERSONALIZADOS ================================================= */ function crearIcono(lugar) { return L.divIcon({ className: '', html: '
' + '' + lugar.icon + '' + '
', iconSize: [42, 42], iconAnchor: [21, 42], popupAnchor: [0, -38] }); } /* ================================================= CREAR MARKERS ================================================= */ var markers = []; lugares.forEach(function (lugar) { var marker = L.marker( [lugar.lat, lugar.lng], { icon: crearIcono(lugar) } ); var popupHTML = '
' + '
' + lugar.icon + ' ' + lugar.type + '
' + '

' + lugar.name + '

' + '

' + '📍 ' + lugar.address + '

' + '
' + '🌱 ' + lugar.vegan + '' + '💶 ' + lugar.price + '' + '
' + '' + '
'; marker.bindPopup(popupHTML); marker.vpCategory = lugar.category; marker.vpData = lugar; marker.addTo(mapa); markers.push(marker); }); /* ================================================= FILTROS ================================================= */ var filtros = document.querySelectorAll( '#vp-map-app .vp-filter' ); filtros.forEach(function (boton) { boton.addEventListener('click', function () { var categoria = boton.getAttribute('data-category'); filtros.forEach(function (b) { b.classList.remove('active'); }); boton.classList.add('active'); markers.forEach(function (marker) { if ( categoria === 'all' || marker.vpCategory === categoria ) { if (!mapa.hasLayer(marker)) { marker.addTo(mapa); } } else { if (mapa.hasLayer(marker)) { mapa.removeLayer(marker); } } }); var texto = 'Mostrando lugares'; if (categoria === 'all') { texto = 'Mostrando todos los lugares'; } if (categoria === 'restaurant') { texto = 'Mostrando restaurantes'; } if (categoria === 'cafe') { texto = 'Mostrando cafeterías'; } if (categoria === 'shop') { texto = 'Mostrando tiendas'; } if (categoria === 'bakery') { texto = 'Mostrando panaderías'; } if (categoria === 'hotel') { texto = 'Mostrando alojamientos'; } document.getElementById( 'vp-map-status' ).textContent = texto; }); }); /* ================================================= MI UBICACIÓN ================================================= */ var locationButton = document.getElementById('vp-location-button'); locationButton.addEventListener( 'click', function () { if (!navigator.geolocation) { alert( 'Tu navegador no permite obtener la ubicación.' ); return; } locationButton.textContent = '⏳ Buscando…'; navigator.geolocation.getCurrentPosition( function (position) { var lat = position.coords.latitude; var lng = position.coords.longitude; mapa.setView( [lat, lng], 15, { animate: true } ); L.circleMarker( [lat, lng], { radius: 8, color: '#176B4D', weight: 3, fillColor: '#FFFFFF', fillOpacity: 1 } ) .addTo(mapa) .bindPopup( 'Tu ubicación' ) .openPopup(); locationButton.textContent = '📍 Mi ubicación'; document.getElementById( 'vp-map-status' ).textContent = 'Mapa centrado en tu ubicación'; }, function () { locationButton.textContent = '📍 Mi ubicación'; alert( 'No hemos podido obtener tu ubicación. Comprueba los permisos del navegador.' ); }, { enableHighAccuracy: true, timeout: 10000, maximumAge: 300000 } ); } ); /* ================================================= BOTÓN "VER LUGAR" ================================================= */ document.addEventListener( 'click', function (event) { var boton = event.target.closest( '.vp-popup-button' ); if (!boton) { return; } var id = boton.getAttribute( 'data-place-id' ); var lugar = lugares.find(function (item) { return String(item.id) === String(id); }); if (!lugar) { return; } /* * De momento mostramos una acción * de demostración. * * Más adelante este botón abrirá * la ficha real del establecimiento. */ alert( 'Ficha de "' + lugar.name + '" — próximamente disponible.' ); } ); /* ================================================= CORREGIR TAMAÑO DESPUÉS DE CARGAR ================================================= */ setTimeout(function () { mapa.invalidateSize(); }, 300); setTimeout(function () { mapa.invalidateSize(); }, 1000); window.addEventListener( 'resize', function () { mapa.invalidateSize(); } ); /* ================================================= EXPONER MAPA PARA FUTURAS AMPLIACIONES ================================================= */ window.VeganPalMap = mapa; window.VeganPalPlaces = lugares; } /* ===================================================== ARRANQUE ===================================================== */ if (typeof L !== 'undefined') { iniciarMapa(); } else { window.addEventListener( 'load', function () { setTimeout( iniciarMapa, 300 ); } ); } })();
Lugares cerca de ti
Descubre opciones veganas para comer, comprar y disfrutar.
🥗
Restaurante
Nombre del lugar
📍 Madrid · Centro
🌱 100% vegano €€
Cafetería
Nombre de la cafetería
📍 Madrid · Malasaña
🌱 Opciones veganas
🛒
Tienda
Tienda vegana
📍 Madrid · Chamberí
🌱 Productos veganos €€
🌱
¿No encuentras un lugar?
Ayúdanos a hacer crecer la Guía Vegana. Si conoces un restaurante, cafetería, tienda o cualquier otro lugar con opciones veganas, puedes proponérnoslo.