Customising the Cyclescape Issue Map
for your own website

You are welcome to install a customised version of the Cyclescape Issue Map on your own site. The details here should enable you to customise it for any location and with a set of layers appropriate to your use of Cyclescape.

URL Parameters

The map code is hosted at https://issuemap.cyclescape.org/ and can be accessed using a URL with various parameters to specialise the map as below.

Here is an example:

https://issuemap.cyclescape.org/index.html?
title=LCC-related consultations on Cyclescape&
center=51.53,-0.14&
zoom=13&
bbox=-0.5534,51.2702,0.2565,51.6936&
info=docs/info.html&
mainmenu=TfL:tfl/camden,grid*/hackney/islington/Richmond:rcc/wandsworth/westminster/ALL

URL parameter lists begin with a '?' and the parameters are separated by '&'s. Important: There must not be any spaces except where needed in parameter values (as they are in the 'Title' parameter above).

To embed the Issue Map as a page on your own website, use an <iframe> with a URL constructed as described in this note. For example, here is an embedded version on the Greater Manchester Cycling Campaign website and here is the relevant HTML code used on that page:

<iframe src="https://issuemap.cyclescape.org/index.html?title=GMCC Cyclescape
¢er=53.51,-2.28&zoom=10&bbox=-2.75,53.3,-1.9,53.7&info=http://www.gmcc.org.uk/cyclescape/info.html
&secondmenu=none&mainmenu=CCAG:ccag/GMCC:gmcc*/LSTF:lstf/20mph:20mph/ALL*"
width="100%" height="500" scrolling="yes" class="iframe-class" frameborder="0"></iframe>

The available parameters are as below. All of them are optional with defaults as shown in the last column.

Parameter Function Default
title Map title to go in box at top right of map LCC – related consultations on Cyclescape
centre or center Lat/Long of desired centre point 51.51,-0.12 (a point near the centre of London)
zoom Zoom level, higher -> larger scale 13
bbox A comma-separated list of 4 numbers constituting two long/lat points that define the main diagonal of a bounding rectangle (Issues outside the bbox will be ignored so it's best to be generous when defining it). -0.5534,51.2702,0.2565,51.6936 (a rectangle enclosing Greater London)
baselayer The initial base map. One of (OSM, Greyscale, MapBox, OpenCycleMap), other names will be ignored. MapBox
info URL of an html file containing some notes for user of the map https://issuemap.cyclescape.org/docs/info.html (If you want to provide your own document just give a URL for any html page).
showexpired Issues with deadlines expired > expiredmargin days ago are shown at start when showexpired=true true
expiredmargin See above. 15
showstale Issues with no activity for > stalemargin days are shown at start when showstale=true false
stalemargin See above. 365
mainmenu A string defining the selectable layers to be shown in the main menu on the right of the map. (See below for an explanation). See the main menu at http://lcc.org.uk/pages/consultation-map
secondmenu Controls the presence or absence of a secondary, popup menu immediately below the menu specified in the mainmenu parameter. When a secondmenu parameter is absent, a popup menu labelled Boroughs is included showing the names of London boroughs. Other contents for the popup menu can be spedified using the same notation used to specify the main menu in the mainmenu parameter. The parameter can be prefixed with a name for the secondary menu terminated by a ':'. secondmenu=none suppresses the secondary menu. NB. On mobile devices the secondary menu is always supressed. See the secondary Boroughs menu at http://lcc.org.uk/pages/consultation-map
filtertag1 Specifies a filtering tag and section names for the main menu. See below for an explanation of the encoding of this parameter. filtertag1=none suppresses the sub-division of the menu. filtertag1=consultation:Consultations*:Other Issues
See the main menu at http://lcc.org.uk/pages/consultation-map
filtertag2 Specifies a filtering tag and section names for the second menu. See below for an explanation of the encoding of this parameter. filtertag2=none suppresses the sub-division of the menu. filtertag2=consultation:Consultations*:Other Issues
See the secondary menu at http://lcc.org.uk/pages/consultation-map


Construction of the mainmenu and secondmenu parameters

The menu item definitions are separated by a ‘/‘

Each item has 3 parts, two of which can be omitted. We can define an item thus in EBNF notation:

[<menu name>:]<tags>[*]

- if <menu name>: is absent a menu name is constructed from the <tags>.

- If the final character of an item is ‘*’ the map opens with the item selected. 

Example:

TfL:tfl produces a menu item labelled ’TfL’ that selects all Cyclescape issues tagged with ‘tfl’ 

hackney produces a a menu item ‘Hackney’ that selects issues tagged ‘hackney’ 

camden,grid* produces a menu item ‘Camden, Grid’ that selects issues tagged with both ‘camden’ and ‘grid’. The menu item will be selected when the map is launched.

ALL this is a special menu item name that selects all Cyclescape issues within the bounding box

Construction of the filtertag1 and filtertag2 parameters

<tag>:<special section label>[*]:<other section label>[*]

Example: filtertag2=consultation:Consultations*:Other Issues


—————

GC 24-2-16