Put your stories on the map. Geolocation adds a location to your posts and shows it to your readers: as a line of text, as a link that reveals a map, or as a map. Collect your posts on an overview map, connect them to a route and add the GPX tracks of your hikes and bike tours.
Made for travel blogs, and for everyone who wants to show where a story happened. Maintained by
Yann Michel since 2017.
Highlights
- A location for every post – search for an address, click on the map, drag the marker or use the position of your device. If a post has no location, the plugin reads it from the GPS data of the featured image.
- Three ways to show it – plain text, a link that reveals a map on hover, or a map. Before the post, after it, or exactly where you place the block.
- Overview maps – all posts of your blog, of a category or of a tag on one map. Popups show the featured image, the date and the excerpt; markers lying close together are grouped.
- Routes and GPX tracks – connect the posts of a trip in the order they were published, and show the recorded track of a hike or a bike tour with its length, ascent, descent and elevation profile.
- Blocks – two blocks with a live preview for the block editor: one for the location of a post, one for an overview map.
- Privacy by design – OpenStreetMap by default, map tiles from your own server, a strict mode that falls back to text, and GPX files that never leave your computer.
- OpenStreetMap – with an optional link that opens a location in the full map service.
- Translated – English, German, Spanish, French, Italian, Portuguese (Brazil) and Dutch.
Privacy
The plugin uses OpenStreetMap by default and delivers the map library itself. Together with the
proxy plugin for OSM the map tiles come from your own server, so the browsers of your visitors do not connect to an external map server.
- The strict privacy mode only shows maps if the tiles are delivered by the proxy. Otherwise visitors see the location as text.
- The strict privacy mode also covers the admin area: without the proxy the post editor and the settings page show no map, and addresses are looked up through your own server instead of by the browser of the author.
- The display mode plain text never loads a map for your visitors.
- Without the proxy, or with Google Maps, the tiles are loaded directly from the map service.
- The optional link to the external map requests nothing from the map service until a visitor follows it, and it does not tell the service which page the visitor comes from. A notice can be shown before the visitor leaves your website; in strict privacy mode it always is.
- With the proxy, the settings page can pre-cache the tiles of your maps, so the first visitor does not have to wait for them. It covers the first view of the map of every post and of every overview map, and works in small steps in the background; the tiles are also pre-cached automatically when a page or post is saved, unless you switch that off.
Locations from your photos
A post without a location takes it from the GPS data of its featured image. Two tips for photos taken with a phone:
- On an iPhone, take your photos as JPG. When a HEIC photo is converted for the upload, its GPS data is removed.
- In the WordPress app, enable the option to keep the metadata of uploaded files.
This also works for posts which are not created in the editor, e.g. by the WordPress app or through the REST API. Nobody has released such a location, so only logged-in users see it until you set it to public in the editor. With the setting "Featured image" these locations are public at once.
Google Maps
The connection to Google Maps is no longer developed further: from version 1.19.0 on, new functions are made for OpenStreetMap only. New installations use OpenStreetMap; websites which already use Google Maps keep it with the functions it has today, as long as an API key is stored.
Google Maps needs an API key, which you get from the Google Cloud Platform. Activate the "Maps JavaScript API" and the "Geocoding API" for it.
Support
Questions, problems or ideas? Open a
support request anytime, I am happy to help. If you like the plugin, a
review is very welcome.
Overview maps on pages
Insert the block "Geolocation Map" into a page or a post to show a map with the locations of your posts. In the settings of the block you choose:
- the categories and tags whose posts are shown
- the width and the height of the map
- a fixed zoom level instead of fitting the map to the markers
- the route: a line which connects the locations in the order of the post dates. Combine it with a category to show the route of a single trip.
A page can contain several maps, and the editor shows each of them as a preview.
Tracks (GPX)
A post can carry the track of a GPX file, e.g. the recording of a hike or a bike tour. Choose the file in the Geolocation box of the post editor.
- The file is read in your browser. Only the simplified line of the track is stored with the post; the file itself, its times and elevations are not uploaded.
- With the display setting "Simple map" the map of the post shows the track; the map in the editor shows it as well.
- The post shows the key figures of the track: its length and, if the file contains elevations, ascent, descent and highest point. Below a map it also shows the elevation profile. Both can be switched off in the settings, and the block "Post Location" can show or hide them for a single post.
- An overview map with the option "route" draws the tracks as recorded and the gaps between them as dashed lines. The popup of a post shows the length of its track.
- A post without a location gets the end of its track as location.
- The setting "Shorten tracks" hides a distance at the start and at the end of every track, e.g. to keep your home address private.
Block "Post Location"
In a post the block "Post Location" shows the location of the post wherever you place it, as text, as link with a map on hover or as map with its own size. The editor shows a preview of the saved location. The automatic output before or after the post is omitted for posts using the block.
With the position setting "Not automatically" a location is only shown in posts containing the block. Such a post still appears on overview maps if its location is enabled and public.