This was my first week back after a two-week break for Christmas. On Monday I replied to a few emails, looked at the stats for SCOSYA (which had another couple of sizeable peaks over the holidays) and upgraded all of the WordPress sites that I manage to the latest version of both WordPress and the various plugins that I use. I did encounter a strange issue with the Jetpack plugin, which caused scary error messages about the site being broken during installation, but thankfully this was just a minor issue caused by the plugin having changed its file locations. I also arranged for a new subdomain to be set up for the new Mull and Ulva place-names project I’m setting up the technical infrastructure for. Once this had been set up later in the week I set up an initial WordPress site of the project and migrated the content management system I’d made for the Berwickshire place-names project across and configured it for the new project. The new project needs to be entirely bilingual, with all content available in both English and Gaelic, so I spent some time experimenting with WordPress plugins to find a solution that would allow a bilingual site with a URL structure that would also work for the non-Wordpress pages where the place-name data will be presented. I used a plugin called Polylang, which provides a language switcher widget and facilities for every page to have multiple versions in different languages. It provides the option to do all of this without changing the URL structure (e.g. no /EN/ for English in the URL) which is what I needed for my non-Wordpress pages to work. It took a bit of tweaking to get the plugin working properly, as for some reason the Gaelic version of the blog post page didn’t work to start with and there were some issues with setting up a different menu for the Gaelic site, but I managed to get it all working as I’d hoped. I then started looking into how to make the CMS multilingual. This is going to be rather tricky as both content and labels need to be stored in both English and Gaelic, with cross-references from one to the other. I contacted the project PI Alasdair Whyte with some questions about this and I’ll continue with the development once I hear back from him.
Other than dealing with some minor managerial issues with SCOSYA and responding to a few other emails I spent the rest of the week developing the interactive map feature for Gerry McKeever’s Regional Romanticism project. Gerry wanted a map where sections of a novel (Paul Jones by Allan Cunningham) that relate to specific geographical areas can be associated with these locations, and a trail from one location to another throughout the novel can be visualised. Before Christmas I’d experimented with the Storymap tool that I’d previously used for the Romantic National Song Network project (e.g. https://rnsn.glasgow.ac.uk/english-scots-and-irishmen/) only using a geographical map rather than an image. I’d come up with a working version using the 40 entries Gerry had compiled, as the following screenshot demonstrates:
However, this version was not really going to work as Gerry wanted people to be able to control the zoom level, which Storymap doesn’t allow out of the box. Plus we wanted the layout to be very different, to be able to categorise entries and to handle the joining lines differently. For these reasons I decided to create my own interface, based on the interactive stories I’d recently made for the SCOSYA project, for example: https://scotssyntaxatlas.ac.uk/atlas/?j=y#6.25/57.929/-4.448/0/0/0/1
We’d been given approval by Christ Fleet of NLS Maps to use one of their georeferenced historical maps (Arrowsmith, 1807), so I created an initial version using this map as an overlay and a freely available tileset called ‘Thunderforest Pioneer’ as a full basemap. Here’s a screenshot of this version:
In this version the map markers were just Leaflet’s default blue markers with tooltips when you hover over them and there were no connecting lines or arrows. The story pane in the top right of the map displays the slide content and an opacity slider that allows you to see the base map through the historical map. You can navigate between slides using the ‘Next’ and ‘Previous’ buttons. In this version the zoom transitions between slides needed refinement and there was no highlighting of the marker that the slide corresponds to. There is also no differentiation between marker types (‘real’, ‘fictional’ etc) and book volumes.
I also realised that there were some limitations with the Arrowsmith map. Firstly, it is not possible to zoom into it any further than the zoom level shown in the above screenshot. The NLS simply doesn’t provide tiles for any greater zoom level, so although I can allow users to zoom in further the overlay then disappears. At the maximum zoom level available for the Arrowsmith map there’s not much distance between many of the markers so the connecting lines / arrows are possibly not going to work very well. Also, the section of the Arrowsmith map where all the action happens is unfortunately not at all accurate. If you make the overlay more transparent the area around Sandyhills is really very wrong, with markers currently identified as ‘shoreline’ massively inland, for example. I also realised that what happens when someone clicks on a marker needs further thought as many locations are associated with multiple entries so it can’t just be a case of ‘click on a marker and view a specific entry’, even though in the current map there is a marker for each entry, even when this means multiple markers appearing at the same point on the map.
After some discussions with Gerry we decided to try an alternative historical map, the OS six-inch map from 1843-1882. We also decided that entries should be numbered and locations should have a one to many relationship to entries, i.e. a location is stored separately from entries in the JSON data and any number of entries may connect to a specific location by referencing the entry’s ID. This meant I had to manually reorganise the data, but this was both necessary and worth it.
With the new data and the new historical map ready to use I set about creating some further prototypes, using different Leaflet plugins to get nicely formatted lines and arrows. One version featured straight grey lines between locations with arrows all the way along the line to show direction. Where a location is connected in both directions there are arrows in both directions. The line colour, number of arrows and arrow style can be changed. Below is a screenshot of this version:
I created another version that had curved, dashed lines, which I think look nicer than the straight lines. Unfortunately it’s not possible to add arrows to these lines, or at least it’s not without spending a long time redeveloping the plugin, and even then it might not work. I also added in different icons here to denote location type (book for fictional, globe for real, question mark for approximate). Icons also have different colours, as the following screenshot demonstrates:
After discussions with Gerry I decided to use the version with curved lines, and created a further version that included a full-width panel for the introduction, entry IDs appearing in the slides and also information about the location type and the volume the entry appears in. For the final version I created I replaced the map markers with circular markers featuring the icons (retaining the colours). This is because the mapping library Leaflet doesn’t include a method of associating IDs with markers, which makes doing things to markers programmatically rather tricky (e.g. highlighting a marker when a new slide loads or triggering the loading of data when a marker is selected). Thankfully it is possible to pass IDs when using HTML based markers, which is what the new version features. When you click on a map marker now two things may happen. If the location is associated with multiple entries (e.g. The Mermaid Bay) then the story pane lists all of the entries, featuring their volume and number, the first 100 characters of the entry and a ‘view’ button that when pressed displays the entry. If the location is associated with a single entry (e.g. Ford) then the entry loads immediately. Map markers are now highlighted with a yellow border either when they’re clicked on or when navigating through the entries and the line joining the previous slide to the current slide now turns yellow when navigating between slides, as the following screenshot demonstrates:
With all this in place my work on the interactive map is now complete until Gerry does some further work on the data, which will probably be in a month or so.