Skip to content

Micro.blog plugin for embedding static, and on-click interactive maps from OpenStreetMap while respecting data privacy.

License

Notifications You must be signed in to change notification settings

flschr/mbplugin-osm-embeds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Privacy-Friendly OSM Maps for Micro.blog

OSM Embeds for Micro.blog

Embed OpenStreetMap views in your Micro.blog posts with optional privacy protection. Readers see a static preview first, then can opt-in to load the interactive map.

Usage

{{< map loc="48.1351,11.5820" >}}
{{< map loc="48.1351,11.5820" zoom="17" >}}

Parameters

  • loc – Coordinates in latitude,longitude format (e.g. 48.1351,11.5820)
  • zoom – Zoom level from 0 (whole world) to 19 (building level), default: 14

Recommended Zoom Levels

  • 10–13 for city/region
  • 14–16 for neighborhood/town center (default)
  • 17–19 for individual buildings

Example

Embedded OSM in a Micro.blog posting

Configuration

Install the plugin and configure optional settings:

  • Privacy Mode - If enabled, a static preview image is loaded instead of interactive map.
  • Privacy banner text – Text for optional privacy overlay
  • Button text - Text for the alternative button (displayed instead of privacy banner)
  • Geoapify API Key – Necessary for static preview images
  • Custom marker - Code to display individual marker on static preview images
  • Default Zoom – Used when no zoom is specified in the shortcode
  • Preview Styles – Map design for light/dark mode

Setup static preview images (optional)

Without an API key, the map embeds directly. With Geoapify you get a clickable preview image:

  1. Create free account at Geoapify (3000 requests/day free)
  2. Generate API key in dashboard
  3. Enter key in plugin settings
  4. Optional: Choose map style (e.g. osm-carto, dark-matter-yellow-roads)

Customization

Explore customization options with these interactive playgrounds:

Notes

  • The plugin uses OpenStreetMap servers. High-traffic sites should consider running their own tile servers.
  • RSS feeds will show maps automatically when coordinates are provided.

Changelog

1.0.2

  • Fixed map preview not loading on mobile devices (improved DOMContentLoaded handling)
  • Improved code stability and maintainability
  • Enhanced error handling and validation

1.0.0

  • Initial public release
  • Privacy-friendly OpenStreetMap embeds with optional static previews
  • Support for custom map styles (light/dark mode)
  • Configurable zoom levels and custom markers
  • RSS feed compatibility

Author

Created by René Fischer.

About

Micro.blog plugin for embedding static, and on-click interactive maps from OpenStreetMap while respecting data privacy.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages