Maps in articles

Published: 27 March 2022
This article shows how to insert maps into articles, and describes some links within articles to display maps in separate windows. It was formerly part of Creating, editing and formatting articlesExternal link which also describes limits and statistics.
ARTICLE BEING AMENDED


There are basically two types of map display within articles. One is the 1:50,000 scale Ordnance Survey mapping from 2006-2008, held within Geograph. The other uses a mapping system LeafletJS, gives a choice of different mapping including some Ordnance Survey, various styles of Open Street Map, and some others. The content is generally determined by a numbered Geograph search, and a choice of thumbnails, dots, etc.

This article describes some of the mapping available as links to open separate windows. A help article Geograph maps describes a number of ways of displaying maps showing the locations or coverage of photographs in Geograph, with links to photo pages.

1:50,00 scale maps

Sections of 2006 0r 2008 1:50,000 Ordnance Survey maps for England, Scotland, Wales and the Isle of Man can be displayed in an article. This is the same mapping shown on a Geograph photo page, one grid square plus parts of neighbours. Maps of Ireland (Northern Ireland and Eire) are not available using the syntax shown here.
  1. smallmap - 1km square. For 8 digit grid reference the displayed map has that reference at its centre. See examples for display with 4 and 6 digit references.
  2. map - 2km square, with the 1km square of the 4, 6 or 8 digit grid reference at the centre. For 6 or 8 digits a target circle is displayed, moved within the map section to the position of the grid reference.

Note that map and smallmap must be lower case - not MAP or SMALLMAP.

Note that there may be a delay of many hours displaying ‘smallmap’; a square with ‘Map coming soon’ is displayed while waiting. If no map or message is displayed, the square may be ‘all at sea’ or outside the area of maps held by Geograph.

Examples of 1km square maps

The first three examples show the effect of changing the number of digits.
SK 17 51 and SK 175 515 and SK 1755 5155 all give the same position of the map, with the target circle at SK 1755 5155. The map centred on SK 1700 5100 is also shown.
SK 17 51 does not give a target circle.

[smallmap SK 17 51] [smallmap SK 17 51]

[smallmap SK 175 515] [smallmap SK 175 515]

[smallmap SK 1755 5155] [smallmap SK 1755 5155]

[smallmap SK 1700 5100] [smallmap SK 1700 5100]

The next examples show the size of the target circle, by moving the circle up progressively until it is just on the car park sign. The circle is always at the centre of a 1 km square map display - the area shown by the map changes as the target position changes.

[smallmap SK 1781 5173] [smallmap SK 1781 5173]

[smallmap SK 1781 5177] [smallmap SK 1781 5177]

[smallmap SK 1781 5185] [smallmap SK 1781 5185]

[smallmap SK 1781 5190] [smallmap SK 1781 5190]

Examples of 2km square maps


The larger 2km square map is centred on the grid square within which the 4 or 6 or 8 digit grid reference falls. A target circle can be moved within that grid square.

[map SK 17 51] [map SK 17 51] 4 digit reference, no target circle

[map SK 1780 5190] [map SK 1780 5190] 6 0r 8 digit reference moves the target circle within the grid square.

Map in table

A map can be placed within a table. This allows text, an image, or an image with text to be placed to its left or right.


[map TQ 18 76] Kew Gardens


---------------
| [map TQ 18 76] | Kew Gardens |
---------------
TQ1876 : Kew Gardens Temperate House from the Pagoda by David Hawgood Kew Gardens Temperate House[smallmap TQ 1843 7648]


---------------
| [[[227173]]] | Kew Gardens Temperate House | [smallmap TQ 1843 7648] |
---------------
[smallmap TQ 18 76]
View of the Temperate House at Kew Gardens from the top of the pagoda. The public cannot normally climb the pagoda, but it was opened for a few months in summer 2006



---------------
| [smallmap TQ 18 76] | [image id=227173 text=View of the Temperate House at Kew Gardens from the top of the pagoda. The public cannot normally climb the pagoda, but it was opened for a few months in summer 2006] |
---------------



Map version

The Geograph website has available two sets of 1:50,000 scale OS maps, one from 2006, the other from 2008. You can specify which to display. For 2006, put revA after the grid reference. For 2008 map, put revB. If you put neither you get the most recent map. This has been used to show a "road under construction" map symbol where the road has now been built and current maps no longer show the "under construction" symbol. In the example below, the line of a cycle route past the Eton rowing lake has been changed - and the OS symbols have been changed. The example is "smallmap" but it works on "map" as well.

SU9278 : Thames Valley Cycle Route by Eton rowing lake by David Hawgood [smallmap SU 9275 7865 revA] 2006 map [smallmap SU 9275 7865 revB] 2008 map
[[[896056]]] [smallmap SU 9275 7865 revA] 2006 map [smallmap SU 9275 7865 revB] 2008 map



"LeafletJS" map from Geograph article or search


LeafletJS is a JavaScript library for interactive maps. Geograph has standardized on using LeafletJS for the majority of mapping functions, as of late 2021. It is used in Geograph for coverage maps v4, for the map obtained by clicking on the map in any Geograph photo page or grid square page, and for the Geograph browser. It can be recognised by the icon top right corner indicating a set of layers. Clicking that icon gives at the top a list of base maps, always including Open Street Map, others vary around the Geograph site. The bottom part of the list is to choose what items are to be shown on the map, to show Geograph coverage, option for thumbnails, option for neither, again varying around the site. This is the icon, which is copyright leafletjs contributors:
 Layer choice icon on maps in Geograph

Display search result as map in article

You can embed a map in an article, example:

Note that "gmap= " previously displayed a Google map, but Google maps changed so the link didn't work. "Gmap" now uses LeafletJS. An article with a "gmap" term should now display a map with a layer icon top right for choosing mapping.

That example is a search for the word "Royd" which is an enclosure, a Yorkshire word.
To display that map, put [gmap=153188652]
Generally, use [gmap=n], where n is the id number of a search showing the images you want to include.
The link for that search, after geograph.org.uk/ is:
search.php?i=153188652#13/53.5524/-1.7677
Take out the number after i= , here 153188652 , put that after gmap= to generate a map in Geograph.

The initial mapping depends what was last used in your browser, and can then be chosen from the layers icon. Choices available here are:
OpenStreetMap
OpenTopoMap
MapBox Grayscale
MapBox Imagery
Watercolour
ESRI Imagery
Geograph PhotoMap
OS Historic OS - GB 1920s
Historic OS - Ireland

Also on the layers icon, at the bottom, choose items to display. Here:
OS National Grid
Extra Dense Grid
BGS Bedrock Geology
Photo Subjects
Photo Viewpoints
PhotoMap Overlay
Search Points
Search Results

To see an example of the geology mapping, [gmap=154048689] is a search for "Jurassic Way", on it choose BGS Bedrock Geology.



Map images in an article

If you want to get a search of the images in an article, several routes use a search number after "i=", put the number into [gmap= ] .
Simplest, at bottom of article is "Images used in this article". Click it, displays the thumbnails, the web address includes the search number, e.g. "search.php?i=154207254"
For article Herd of Hospice (chosen as being compact) it gives a web link ending "search.php?i=154208037"
Put [gmap=154208037]


Alternative, click 'KML' button, which is on the right in the footer copyright message for the article. And it will be in the page address, eg article Grand Union Canal - Uxbridge to Brentford .
Click KML gives link including kml.php?i=154053134 , put [gmap=154053134] gives:


Alternative, at the bottom of the edit page is a line like:
Tip: Can now get a embeddable map of images [6] used in this article

This gives a page starting:
Auto-Updating Map Embed

This map will automatically update to include new images added to the live article.
Loading upto 250 images at once (the first 250 used in the article)

Map Embed Code: [gmap=152278025] (copy/paste into your article)
Preview of the Map...


Links to Display a map in separate window

Showmap - zoom in/out from a grid square


Each Great Britain photo page has a section of 50K scale map and an invitation "TIP: Click the map for Large scale mapping". Doing so displays a section of current 50K map with a bar on the left to go to smaller or larger scales, and a layers icon to choose mapping and display.

This type of map link can be in an article:
Map linkExternal link link ST148373
[url=http://www.geograph.org.uk/showmap.php?gridref=ST148373]Map link[/url]
This displays the complete grid square ST1437 at 50K scale with a blue circle at grid reference ST148373 .

Map linkExternal link ST1437 link
[url=http://www.geograph.org.uk/showmap.php?gridref=ST1437]Map link[/url] ST1437 link
This displays the grid square map with no blue circle.

For Ireland, the map on the photo page is Open Street Map, with a layers icon including Historic OS - Ireland, e.g. see R5857 : Horses on King's Island, Limerick by David Hawgood .

Layer icon top right, maps available:
Modern OS - GB
OpenStreetMap
OpenTopoMap
MapBox Imagery [aerial photo]
Historic OS - GB 1920s
Historic OS - Ireland

Layer icon overlays:
All Dots Layer [Not available if map is Modern OS]
OSGB Grid
Irish Grid


Coverage

There are various maps showing the coverage of Geograph in an area, showing thumbnails, numbers of photos, or location dots, For example in grid square page for SU7299, the menu has "Show on coverage map", giving:
Coverage map from SU7299 square
This shows initially about 3x3 squares, number of images per centisquare, can zoom, can drag, can show other layers including grouped thumbnails. Web link includes word "mapper".

To show an area with no coverage, NC7235, one photo, none in some nearby squares
Coverage NC7235
Zoom out, some squares have no number. Zoom out more, some squares are green, showing there are no Geographs.

Geograph Coverage map V4, mapping available from layer icon:
OpenStreetMap
OpenTopoMap
MapBox Grayscale [The mapping is Open Street Map. Mapbox Studio is like Photoshop, for maps. Here roads and names]
MapBox Imagery [here aerial photo with names]
Watercolour [seems to be outline map, woods green, water blue]
ESRI Imagery [aerial photo no names]
Geograph PhotoMap [no map, just grid lines, shows all thumbnails, some overlap]
OS Outdoor [Does not show rights of way]
Historic OS - GB 1920s
Historic OS - Ireland

Layers icon, choose what to display
OS National Grid
Extra Dense Grid
BGS Bedrock Geology [zoom out to display about 15km on screen, geology colours show up - they don't at larger scales]
Photo Subjects [dot at location of each Geograph photo]
Photo Viewpoints [dot at each photo viewpoint, arrow shows direction ]
Coverage - Standard [shows number of Geograph photos in each 1km grid square, applies up to map about 10km squsre, zooming out further shows a dot for each square with photos]
Coverage - Large Squares [seems to be same as small squares with some different colours]
Coverage - Opportunities [clickable when zoomed out]
Personalize Coverage - [clickable when zoomed out]
Photo Thumbnails [thumbnails grouped with number adjacent, zoom out, thumbnails get separated]
Collections [dots for places in collections e.g. shared descriptions]
PhotoMap Overlay [adds more names]
Recent Uploads

There is more guidance under the map.

There are many other maps available from the grid square page from "More links for . . ".

Browser

The Geograph browser initially shows a selection of thumbnails for photos satisfying search terms on the browser page including grid square, place name, date, contributor, context, tags, etc. At the top of the page, the "mode" selection includes "map thumbnails" and "map dots". Some selections, e.g. with placename and grid reference, give a link broken apart by some browsers; use "Grab short link" at top of screen, it gives a tiny url for the link.

Example, choose browser from left hand menu, choose grid square SU7990.
Browser with thumbnails
Grab short link Tiny url for SU7990External link
Mode Map thumbnails
Map thumbnails SU7990
Mode Map dots
Map dots SU7990

mapping layer choice, same as coverage map above
OpenStreetMap
OpenTopoMap
MapBox Grayscale
MapBox Imagery
Watercolour
ESRI Imagery
Geograph PhotoMap
Historic OS - GB 1920s
Historic OS - Ireland

choose layer of items to display:
OS National Grid
Extra Dense Grid
BGS Bedrock Geology
Photo Subjects [dot at selected photo positions]
Photo Viewpoints [currently ignores selection, dots at every Geograph photo viewpoint, this may change]
PhotoMap Overlay [just adds names]
Photos [gives thumbnails]


Shared description

Click on shared description in a photo page description.
Shows "Images used in this description" e.g.
Permissive and public paths near Burnham Beeches
Below thumbnails is "View all images using this description in the Browser | On a Map"
Click "On a map", opens map in browser:
Link
That link does display a map, initially as groups of thumbnails on Open Map, can then choose layers.
The browser uses the Geograph snippet number to choose map display.

Gallery - browser map display

Use of articles is preferred to the earlier gallery facility, but many are still available to view. A gallery starts with display of images in dicussion forum format. Map display is in browser format.
St Marychurch Torbay shops - Gallery
St Marychurch shops, gallery mapped shows thumbnails
St Marychurch shops, gallery mapped shows map dots


Creative Commons Licence [Some Rights Reserved]   Text © Copyright March 2022, David Hawgood; licensed for reuse under a Creative Commons Licence.
KML
You are not logged in login | register