Using the BRC Atlas Library

Show an Irish distribution map from a CSV file

This example demonstrates creation of an atlas map for a region of the British Ilse for which boundary, grid and transformation information does not exists as a standard asset in the library. In this case, we are displaying a hectad map for Ireland and the map is shown on the Irish projection.

For an explanation of the code that instantiates a standard map and displays, see example-1.html. This example builds on that one.

Create the map in the div element with the id 'map' with the necessary configuration options. See text below for an explanation of them.

var map = brcatlas.svgMap({
  id: "map",
  mapTypesKey: 'Standard hectad',
  transOptsKey: 'Ire1',
  transOptsSel: {
    Ire1: {
      id: 'Ire1',
      caption: 'Island of Ireland',
      bounds: {
        xmin: 18000,
        ymin: 12000,
        xmax: 380000,
        ymax: 470000
      },
    },
  },
  boundaryGjson: './ireland-29903.geojson',
  gridGjson: './ireland-grid-29903.geojson',
  proj: "ir",
})
map.setIdentfier('./example-irish-hectads-1.csv')
map.redrawMap()

We use map.setIdentfier to identify some data from a CSV file that contains Irish hectad grid references. We are using the standard hectad data accessor function Standard hectad. Finally we draw the map with map.redrawMap.