Offer OpenHistoricalMap as an option for the map view

GRAMPS offers several basemap options for the map view, including OpenStreetMap. A basemap of the present certainly helps me orient myself on the map, but it can be misleading in some ways. For example, both sides of my family immigrated from South Vietnam, a country that no longer exists. Before that, they migrated from villages in northern Vietnam that were successively transferred to different provinces and later swallowed up by larger cities. It’s harder to get a sense of my ancestors’ background just by looking at OSM or even a satellite map. Even the hospital where I was born was later destroyed by a hurricane, demolished, and replaced by a Walmart store.

OSM has a sister project, OpenHistoricalMap, that seeks to map the world in detail throughout history. Although this ambitious project is still in its infancy, it has extensive and growing coverage of historical boundaries, especially in Europe, the United States, and East Asia. Like OSM, it welcomes contributions from the public, so that a user can map the local context around any events they want to display for their family tree: the church, no longer standing, where a couple was married; the shop that someone owned that later closed due to the pandemic; the office where someone worked that moved after a merger.

OHM would be a fantastic addition to the map view, in my opinion. Perhaps not as the default option, since the database and cartography are still such works in progress, but at least as an option for users to try out, in case they’re lucky enough to have local coverage or are willing to roll up their sleeves and map it themselves.

OHM would be more challenging to integrate than the existing basemap layers. Since it isn’t feasible to render a separate raster tileset for each year in history, the project only publishes a vector tileset that needs to be rendered client-side by a library such as MapLibre ( or libshumate. It also requires client-side code to filter the data to just the relevant dates. The “OpenHistoricalMap/Reuse” article on the OSM Wiki provides an overview of existing services and packages for using OHM outside of the main website.

As a contributor and advisor to OHM, I’d be happy to help this community figure out what’s needed to successfully integrate OHM into GRAMPS. As this might also be the first time some in the genealogical community have heard of OHM, I’d be happy to provide more information about the project. I’m sure OHM also has plenty to learn from this community about best practices in historical research.


Looks like someone asked about this on Reddit a few years ago, but OHM was much more primitive back then and I don’t know if anyone ever followed up.

Do you mean something like what Gramps Web describes in its Features : Powerful map" ?

Or the new 5.2 Feature that for Custom Tile Providers (which needs a volunteer to explore and write wiki docs in the “How to change the map provider ?” section of Geography)


Ideally both. :grin: In either case, it won’t be a straightforward as dropping in an additional tileset URL template. OHM tiles are in MVT format, not an image format. Each tile contains data about every year, so it’s up to the client to filter it down to what’s interesting – that could potentially be a new UI feature. There’s documentation for reusing OHM on websites and various software platforms. (I couldn’t link it earlier because Discourse restricts new users from sharing too many links.)

Since Gramps Web uses Leaflet, it could install MapLibre GL JS and a compatibility plugin for Leaflet. The main OHM website does that too, so there’s likely some code that can be adapted without much fuss. As for the desktop application, my understanding is that the map plugin is a custom renderer. It would probably be a huge effort to build MVT support for this custom renderer, but since the overall application is written for GTK+, maybe migrating to libshumate would be a way forward?

So the 1st step is probably to ask @DavidMStraub about how the Gramps Web feature is implemented.

And to find a volunteer to see how the “Custom Map Tile Provider” feature works and write some docs for the rest of us. And to discover the limits of the feature.

The primary people working on features that use Mapping services are:

1 Like

Unfortunately, this feature was removed last August, apparently because of Stamen’s move to Stadia Maps. At a glance, the removal is a bit puzzling to me, since the feature seems to have been written generically enough to support any OSM or TMS endpoint that serves up raster images, not just those from Stamen. Perhaps @SNoiraud has more context that I’m missing.

Even if the personal map option does get restored, the overall map functionality would need a more substantial overhaul in order to load OHM’s vector tiles. As far as I can tell, the osm-gps-map widget doesn’t support vector tiles, and it looks like there are some more pressing updates to push through anyhow. I don’t mean to be pushy about it, but if there’s an appetite to explore alternatives, libshumate is what powers the OSM-based vector map in GNOME Maps, so it could be suitable for Gramps as well.

This year, OSM is also migrating the default OSM basemap to vector tiles, which could eventually impact Gramps. Though I don’t foresee the legacy maps breaking in the near or medium term, migrating to a vector-capable library would open up some possibilities like enabling ordinary users to restyle the map to suit their individual projects’ needs.

Maybe the Web side would be easier, come to think of it. :sweat_smile:

1 Like

I did not realize that Personal map tile selection was removed along with the lamented Stamen Maps provider.

Map Layers as used in GENUKI and NLS (National Library for Scotland)
might be a useful tool


1 Like

When you write “map view”, I assume you’re talking about geography views?
If so, we do not use a browser to display the maps but the osm-gps-map library.
It is therefore difficult to choose the years and the actual year to display. I have not tried this.


@mxn I had not heard of OpenHistoricalMap but from what I can see I think this is something I’ve always dreamed of :star_struck: even if it’s still in an early stage. So I’ll be very happy to support what’s necessary to integrate that into Gramps Web. Any help (also for how to generally enable vector tile support) would be very welcome.

1 Like

Glad to hear it!

The existing codebase can be retrofitted to support vector tiles without changing very much. The maplibre-gl-leaflet library makes MapLibre GL JS run headlessly, so that you can add vector tile layers to the Leaflet map as if they’re ordinary raster tile layers. Once you install the library, any of the JSON stylesheets linked in this documentation, such as “Historic”, can be dropped in as replacements for the .png URL you’re specifying in the configuration.

That’ll get you a map of everything everywhere all at once. It’s a bit overwhelming, so you’ll need to call MapLibre’s methods to filter the style after it’s done loading. You can either install the Timeslider plugin, which comes with a UI for adjusting and animating the date, or you can come up with the date yourself and adapt this code (which is in the public domain) to filter the map.

Down the line, you could eliminate Leaflet and use only MapLibre to handle the map by itself. This would improve performance and allow the user to zoom smoothly and rotate the map. But the maplibre-gl-leaflet approach would be a great start.

Let me know if you run into any hiccups setting up OHM, or you can post in our issue tracker or forum for help from others in the community. If anyone is interested in contributing to OHM, for example to make their Gramps Web map shine, we have a getting started guide. It’s written for people somewhat familiar with OSM, but maybe we can collaborate on a more Gramps-oriented guide at some point.


The NLS maps are excellent.

Just traced my first historical map and added my first building to OHM :mortar_board: