Summary
Create an embeddable map widget that third parties can integrate into their websites via <iframe>. This will increase DeaMap visibility, generate natural backlinks (SEO), and facilitate adoption by organizations that manage or install AEDs.
Use Cases
- AED installers: Show their installed defibrillators on their company website
- Maintenance companies: Display their coverage area and maintained AEDs
- Municipalities: Embed a map of all AEDs in their city on the official website
- Shopping centers / hospitals / sports venues: Show nearby AEDs for visitors
- Organizations: Display their organization's AEDs on their website
Proposed Routes
| Route |
Description |
/embed/map?city={city} |
Map centered on a city showing all its AEDs |
/embed/map?lat={lat}&lng={lng}&radius={km} |
Map centered on coordinates within a radius |
/embed/map?org={orgId} |
Map showing only an organization's AEDs |
/embed/map?ids={id1,id2,...} |
Map showing specific AEDs by ID |
Integration Snippet
<iframe
src="https://deamap.es/embed/map?city=Madrid"
width="100%"
height="400"
frameborder="0"
allow="geolocation"
title="Mapa de Desfibriladores - DeaMap"
></iframe>
Requirements
Core
Query Parameters
Security
SEO & Visibility
Technical Notes
- The embed page should be a minimal Next.js page without the main navigation/layout
- Use the existing
/api/v1/aeds/nearby and /api/v1/aeds/city/{city} endpoints for data
- Consider lazy-loading markers for large datasets
- The
X-Frame-Options: DENY header in next.config.ts must be conditionally removed for /embed/* paths
Out of Scope (Future)
- Customizable marker colors/icons per embed
- Embed analytics dashboard for organizations
- Premium embeds with custom branding (no DeaMap watermark)
Summary
Create an embeddable map widget that third parties can integrate into their websites via
<iframe>. This will increase DeaMap visibility, generate natural backlinks (SEO), and facilitate adoption by organizations that manage or install AEDs.Use Cases
Proposed Routes
/embed/map?city={city}/embed/map?lat={lat}&lng={lng}&radius={km}/embed/map?org={orgId}/embed/map?ids={id1,id2,...}Integration Snippet
Requirements
Core
Query Parameters
city- Filter by city namelat+lng+radius- Geographic filterorg- Filter by organization IDids- Comma-separated list of specific AED IDszoom- Initial zoom level (optional)theme- Light/dark theme (optional, default: light)lang- Language: es, en, fr, de, pt (optional, default: es)Security
X-Frame-Optionsonly for/embed/*routes (currently DENY globally innext.config.ts)Content-Security-Policy: frame-ancestors *for embed routesSEO & Visibility
/embedwhere users can configure and copy the snippetTechnical Notes
/api/v1/aeds/nearbyand/api/v1/aeds/city/{city}endpoints for dataX-Frame-Options: DENYheader innext.config.tsmust be conditionally removed for/embed/*pathsOut of Scope (Future)