Third-party article by MiKa, developer of WP OSM Plugin.
Adding OpenStreetMap maps to a WordPress blog can be realized just be taking an image of the current map and add it like a photo in your site. That sounds weird but is sometimes a good solution since you do not need to install any WordPress plugin and the loading time of your site will not be influenced in a bad way.
Anyway, if you want a slippy map that is always up to date with zoom and navigation, you have to install a plugin since it is not covered by standard WordPress.
The agony of choice
Searching for „map” in the WordPress directory leads to a result with 1.000 Plugins – that’s the time to have a beer. Most of them cover map types with hard license conditions and add non open source libraries to your site or just catch your attention to buy a „full version” of a plugin to use the free OSM map. In 2004 we searched for a mapping solution for the photoproject www.Fotomobil.at. Requirements were:
- Map with free license
- Open source without loading external software components
- Free – since there was no budget 😉
- Adding data with standard formats
There was no plugin available and so WordPress OSM Plugin development started. According to feedback from the WordPress community it was handed over to the official WordPress Plugin directory and Steve Coast – the founder of OpenStreetMap – announced the WP OSM plugin at OpenStreetMap.org. The free plugin is released under GPL license and used by professional bloggers for travelogues with tracks, overview maps or just to show the current location:
Tigerbus.de by Martin uses WP OSM Plugin to display GPX tracks in his Bulli-travelogue. The map shows the track and provides an button for a fullscreen map.
Fotomobil.at uses WP OSM Plugin widget to show the location of the post. The widget shows automatically the location of the post.
Sabine leads the blog with 529 geotagged posts / stories about bridges in Hamburg. Each post automatically gets an icon with link to the post in the overview map.
Mapping according to a philosophy instead of following a business plan
If you want to build a ship,
don’t drum up people to collect wood and don’t assign them tasks and work,
but rather teach them to long for the endless immensity of the sea.
WP OSM Plugin continues this idea by providing an open source plugin with a free license and without any pro version nor a business plan. WP OSM Plugin is a free plugin for a free map!
Features of WP OSM Plugin are:
- Add geolocation to a post or a page
- Add GPX and KML files or just a single marker to a map
- Add maps as shortcode or widget to a post / page
- Fullscreen map, maps with markers linked to post / page with geolocation
- OpenStreetMap, OpenSeaMap, Stamen maps, basemap, …
Have you ever thought about taking a picture that can be shown only in WordPress – or even only in one plugin of WordPress?
The latest version of WP OSM Plugin is based on OpenLayers 3 with focus on mobile devices and adding personal data in a standardized way. Have you ever thought about taking a picture that can be shown only in WordPress – or even only in one plugin of WordPress? Then, why accepting it for your map? You might want to use your maps on other pages made with Joomla, or even in an old style photo album. Therefore XML files like GPX or KML are a great way to add personal information like routes / tracks or just markers to your map. You can freely change the mapping plugin or even the CMS without loosing your geo data.
The following sample shows our tour in a VW Bulli to Southern Italy with a tracks and campsites. The route was generated with the free geo editor Viking and Inkscape was used to generate the vector icon. But there are also CC0 – license icons included in WP OSM Plugin and there are many free online GPX generators for routes or a list of markers. Once you generated your geodata as KML or GPX file make sure you add all your data with relative paths to enable standard URLs as well as secure https connections to your site:
Clicking on the [↔] button in the map will give you fullscreen map.
The WordPress shortcode with relative file address looks like:
[*osm_map_v3 map_center="44,14.4" zoom="6" width="75%" height="450" file_list="../../../../wp-content/uploads/osm_map/2015_It_Camping_01.kml" control="fullscreen"]
This shortcode does not need to be written manually, but there is a WP OSM Plugin shortcode generator when you write your article in the backend of your WP site.
Files produced with a GPS logger or a mobile phone might get quite huge, make sure the size does not slow down your page, but reduce the size of your file by using the great tool GPXBabel. Find an how to here. And finally make sure the icons in your file are also referenced relative.
Keep it running
There is no way to donate money for WP OSM Plugin development, but if you want to support WP OSM Plugin, choose one of these possibilities:
- Correct or add a translation
- Add icons under CC0 license
- Rate it at WordPress.org
- Add your extensions of the WP OSM Plugin to the standard
Links related to the WP OSM Plugin:
- Download im WordPress Directory
- Blog, Forum and Dokumentation
- WP OSM Plugin @ Twitter
- WP-OSM-Plugin auf facebook
- Privater Blog von MiKa
- Kontakt mit MiKa
- OpenLayers 3