Jump to content

Wordpress

From OpenStreetMap Wiki

Wordpress (wordpress.org) is a very popular blogging system and, more generally, a content management system powering a lot of websites. Wordpress users can integrate OpenStreetMap maps in several ways.

Static map images

A simple static image is not to be sniffed at. They load faster with no compatibility problems, and can easily be linked to a slippy map (e.g. to the openstreetmap.org front page) to let visitors zoom etc.

To embed an image, obviously you could simply screenshot a little map image, and then upload it and embed it via the normal wordpress image upload procedure. Alternatively you might use an img url to one of the Static map images services.

Using a plugin

There are many plugins available for wordpress which offer some OpenStreetMap related functions. See wordpress plugins with the 'openstreetmap' tag . You can see the benefit of using a plugin and comparison of plugins(2025) on the LivingWithDragons blog.

  • Leaflet-map [1] based on the so-named javascript framework
  • Leaflet Maps Marker wordpress plugin (mapsmarker.com) allows you to pin, organize & show your favorite places through OpenStreetMap/WMTS, Google/KML, GeoJSON or Augmented-Reality browsers.
  • WP OSM Plugin lets you include your OSM maps with GPX / KML tracks, POIs, markers and geotagged posts. It's based on (WP OpenLayers 6)
  • Map Studio [2] shows vector maps with MapLibre GL JS and OpenFreeMap tiles, without an API key. Full-screen editor with places, areas and routes along real roads (OSRM routing of FOSSGIS by default), a list of places, import from CSV, KML and GeoJSON, and an optional load-after-click mode.

Manually embedding osm maps

If you have created your own special map by writing the Javascript code on your own, you need to manually embed it in your Wordpress posts or pages. See switch2osm.org for an overview of available Javascript libraries and further links to their documentation.