Responsive OpenStreetMap

Lightweight and interactive OpenStreetMap integration with Leaflet

Responsive OpenStreetMap

The Air theme lets you embed an interactive OpenStreetMap map directly at the bottom of any page.

Two Configuration Modes

Define a list of markers (osm_markers) with coordinates, titles, descriptions, and optional links in your hugo.yaml or page front matter:

params:
  osm_zoom: 16
  osm_markers:
    - title: "Quartier Libre"
      lat: 50.643936
      lon: 3.050444
      description: "Espace convivial & culturel au bord de la Deûle — Lille"
      link: "https://www.openstreetmap.org/search?lat=50.643936&lon=3.050444"
    - title: "Le p'tit quinquin"
      lat: 50.637125
      lon: 3.039490
      description: "Statue et symbole lillois — Square Foch, Lille"
      link: "https://www.openstreetmap.org/search?lat=50.637125&lon=3.039490"

The map automatically fits bounds (fitBounds) to display all markers at the optimal zoom level.

2. Iframe Mode (Standard OSM Export or uMap)

If you prefer an iframe from OSM or uMap:

params:
  osm_url: https://www.openstreetmap.org/export/embed.html?bbox=3.02%2C50.62%2C3.07%2C50.66&layer=mapnik&marker=50.6439%2C3.0504

Page Activation

Add osm: true to the Markdown front matter:

---
title: My Page
osm: true
---