Mapping Historical Travel Routes

Events happening in the community are now at Drupal community events on www.drupal.org.
scottholmes's picture

By way of introduction, I'm an aficionado of Mark Twain and have a Drupal site with nodes devoted to the chapters of some of his books including The Innocents Abroad. I thought it would be interesting to add maps of his travels as we progress through the chapters. In furtherance of this I've been reading Mapping With Drupal, which led me to this group. At the moment I have only vague ideas of what I would like this to look like and how it might function so I thought I should ask a community of drupal/map enthusiasts for ideas.

Incidentally, I am not unfamiliar with maps and projections. Once upon a time I had a career with the Corps of Engineers as a Professional Cartographer and actually worked with GIS when it existed primarily on main frames. I do hope this post is not deemed inappropriate for this group.

Comments

Map "portfolio"

rdeboer's picture

Ahh Mark Twain...

I believe he visited the Melbourne (Australia) area when the country was still young and took a train to Maryborough, Victoria. He more or less described it as a town with a station attached: "you can put the whole population of Maryborough into it, and give them a sofa apiece, and have room for more. You haven't fifteen stations in America that are as big." Indeed, it's still there and it's still big for a small town. You should come and visit!

As fantastic a read it may be, that book "Mapping with Drupal" is probably a little outdated, already. For instance, does it talk about the new mobile-first kid on the block called Leaflet? And all the great auxiliary modules you can use, like Leafet MarkerCluster and Leaflet Mapbox. The Mapbox product allows you create a map "canvas" add some artistic touches, like maybe making your map look historic, which would be nice in the context of your project and then you can use the mapid in Leaflet Mapbox.

For instant gratification you can add a swag of map canvases to Leaflet by installing the super-light module Leaflet More Maps. Zero configuration. Demo here: http://flink.com.au/tips-tricks/27-reasons-not-to-use-google-maps.

Leaflet by itself only accepts Geofield to do the lat/long coordinate storage. However if you throw IP Geolocation Views & Maps (shameless plug!) in the mix you can combine just about any coordinate storage module with any of the three main mapping APIs: Google Maps, OpenLayers and Leaflet. "IP Geolocation Views & Maps" also comes with handy centering options, a differentiator to colour-code markers by the value of any field in your View, plugable marker sets, marker tags, tooltips etc.
The "IP Geolocation Views & Maps" project page has links to a mapping module comparison table, link to a video, other articles etc.

Rik

Before going into more

Sinan Erdem's picture

Before going into more technology, my advice for you would be to roughly decide what kind of presentation you would like to have for the visitor.

Each node is capable of keeping point(s), line(s) and polygon(s). It is also teoretically possible to keep "routes" (the actual path between two points snapped to roads) but there is no ready module to provide this functionality as far as i know.

Then, you can display that location information on the node display as a map. You can also aggregate all the information on many nodes on a single map. By using Views exposed filters or some other methods, you can even allow users to filter on some criteria.

Geofield is a good module to keep location information on a node. To display that information on a map, I would suggest either Openlayers (more flexibility + complexity) or Leaflet (simpler, faster, etc).

Geofield and Mark Twain

scottholmes's picture

Thanks for the suggestions. I've starting playing around with geofield and leaflet and even played a bit with map tiles. ESRI physical and Google hybrid look pretty good with the kind of map I think I want to use. I'm going to stick with points rather than lines or polygons, at least until I'm far more experienced with these modules. What I have currently is a Geofield field, with unlimited number in my content type for Twain chapters. I'm thinking of defining a point for each geographic point of interest found in each chapter. The field widget is defined as Latitude/Longitude. It is displayed in a Pane with Leaflet using a Google Hybrid map. This works fine except that there does not seem to be a method for assigning labels to each of the points. I tried a different approach with Views but there seems to be a problem with the views module:

Location http://bshd7/admin/structure/views/ajax/config-item/geo_view/page/field/...
Referrer http://bshd7/admin/structure/views/view/geo_view
Message Notice: Uninitialized string offset: 0 in leaflet_field_formatter_settings_form() (line 168 of /home/scott/WebProjects/bshD7/sites/all/modules/leaflet/leaflet.formatters.inc).

This results in what looks like unformated xml when trying to save a settings value in a geofield view.

... there does not seem to be

rdeboer's picture

... there does not seem to be a method for assigning labels to each of the points.

Add "IP Geolocation Views and Maps" to the mix you already have (Geofield, Views, Leaflet, Leaflet More Maps) and you'll have several ways of assigning labels of various kinds (marker balloons, marker tags, marker tooltips), each of them configurable via the standard Views UI (i.e. exclude or customise fields you want).

When using "IP Geolocation Views and Maps", you can safely disable the Leaflet Views and Geofield Views submodules.

Beauty...

scottholmes's picture

IP Geolocation works perfectly. My thanks for your assistance. Now my real work must begin, create a gazetteer for The Innocents Abroad.

The 1867 Quaker City Excursion Itinerary

scottholmes's picture

Just to let those of you interested know, I've plotted all the major points of Mark Twain's journey to Europe and the Holy Land, from his book The Innocents Abroad. I still have probably hundreds of points yet to plot and much CSS work to do on this. I'm using a geofield, in a content type I call Twain Sites, leaflet, and IP Geolocation. I created a view with two different blocks, one based on a category field and another that uses a node reference to select sites for mapping. If you'd care to take a look and perhaps offer suggestions and/or criticisms, I would be grateful. The first page of the drupal book displays the map block with sites selected for a category of Quaker City Port of Call. Some chapters don't have mapped points yet so currently only a blank map is displayed. This project is for my own edification and enjoyment (and of course for anyone else with an interest). It has no commercial application.

http://bscottholmes.com/twain/innocents

Marvellous!

rdeboer's picture

That's an awful lot of content and maps you've produced in a very short time, Scott! Awesome work. Am enticed to learn more about and read more by Mark Twain.

One comment: if you're not going to use the visitor geolocation feature of "IP Geolocation Views and Maps", then maybe you should turn it off on its configuration page. Otherwise the user will be prompted repeatedly to share their location.

Great stuff! As you say, add a little theming (i.e. CSS) and you have a cracker of a document!

Rik

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: