Skip to main content

Configuration options

Each installation of Routegadget is configured by the rg2-config.php file in the root directory.

The configurable options are described below. For installations a standard set of configuration options is used. You would require FTP access in order to be able to change any of these settings.

File locations

  // Location of directory where Routegadget is installed.
// This should have /kartat and /rg2 sub-directories.
define('RG_BASE_DIRECTORY', '');
// allow js and css to be loaded from a separate location if needed
// probably only relevant for to avoid 100 copies of source files
// allow relocating kartat directory: only really relevant for development environment
// path is relative to RG_BASE_DIRECTORY
define('OVERRIDE_KARTAT_DIRECTORY', '../rg2-test-data/hh/kartat/');

User interface

  // User interface colour theme: see gallery at
define('UI_THEME', 'start');
// set these to an RGB colour definition to override default configuration of white text on blue
// background for the header. If you change them make sure the text shows up on the background
define('HEADER_COLOUR', '#002bd9');
define('HEADER_TEXT_COLOUR', '#ffffff');

Splitsbrowser integration

  // location of Splitsbrowser files if required: see Wiki for details of how to install Splitsbrowser

Start-up language

  // default language if not English: this is overridden if the query includes a language (e.g. ?lang=fi)
// requires a dictionary file xx.js in the lang directory
define('START_LANGUAGE', 'de');

Character encoding

  // Set encoding for input data default UTF-8. Only needed for compatibility with earlier versions of Routegadget
define('RG_INPUT_ENCODING', 'UTF-8');

Additional text

  // text displayed at bottom of info dialog. Use '' to leave blank.
// OS licence text below is needed for installations on site.
define('ADDITIONAL_INFO_TEXT', 'Maps published on this web site that contain OS data by permission of Ordnance Survey® Licence Number 100046745.');


  // proj4 co-ordinate reference system for new maps
// see for master list
// see for example of UK National Grid
// select "proj4" in the list see for example parameter string
// Note: EPSG:27700 is built in to RG2 as default so you do NOT need to declare it here: this is just an example
// EPSG:900913 (Google) is also built in
define('EPSG_CODE', "EPSG:32722");
define('EPSG_PARAMS', "+proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ");
define('EPSG_CODE', "EPSG:32722|EPSG:12345");
define('EPSG_PARAMS', "+proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs|+proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs");