/brc-atlas

Javascript library for web-based biological records atlas mapping in the British Isles

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

BRC Atlas library

The BRC Atlas library is a Javascript library for providing both easy and flexible APIs for creating static and slippy maps for atlas projects.

Installing

You can get the javscript amd css builds from the GitHub repo or include them in code directly from a CDN, e.g:

<script src="https://cdn.jsdelivr.net/gh/biologicalrecordscentre/brc-atlas/dist/brcatlas.umd.js"></script>

or a minified version generated by the CDN:

<script src="https://cdn.jsdelivr.net/gh/biologicalrecordscentre/brc-atlas/dist/brcatlas.umd.min.js"></script>

You will also need to inlcude the associated CSS, e.g.:

<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/biologicalrecordscentre/brc-atlas/dist/brcatlas.umd.css">

or a minified version generated by the CDN:

<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/biologicalrecordscentre/brc-atlas/dist/brcatlas.umd.min.css">

The CDN also exposes some geojson assets. These are used internally by the mapping libraries, but can be used independently. They include:

  • An outline map of Britain, Ireland and the Channel islands. These polygons are at a coarse scale - suitable for using with the static map. (https://cdn.jsdelivr.net/gh/biologicalrecordscentre/brc-atlas/assets/GB-I-CI-27700-reduced.geojson).
  • British & Irish 100 km grid lines. These lines are at a coarse scale - suitable for using with the static map. (https://cdn.jsdelivr.net/gh/biologicalrecordscentre/brc-atlas/assets/GB-I-grid-27700-reduced.geojson).
  • Brtish & Irish country boudaries. These lines are at a coarse scale - suitable for using with the static map. (https://cdn.jsdelivr.net/gh/biologicalrecordscentre/brc-atlas/assets/GB-I-countries-27700-reduced.geojson).
  • Brtish & Irish vice county boundaries. These polygons are at a coarse scale - suitable for using with the static map. (https://cdn.jsdelivr.net/gh/biologicalrecordscentre/brc-atlas/assets/GB-I-vcs-27700-reduced.geojson).
  • A range of geojson country and vice county boundary outlines in the folders https://cdn.jsdelivr.net/gh/biologicalrecordscentre/brc-atlas/assets/country and https://cdn.jsdelivr.net/gh/biologicalrecordscentre/brc-atlas/assets/vc. These are defined at a number of scales suitable for different zoom levels on the slippy map. For more information, see README for country assets and README for vice county assets.

API documentation and code examples

For details of the API, view the JSDoc API documentation.

There are also a number of working examples.