Module: dataAccess

Members

(static, constant) dataAccessors :object

This object has properties corresponding to a number of data access functions that can be used to load data provided in standard formats. There are four functions accessed through the keys listed below.
  • Standard monad expects the grid references to be monads (1 km resolution).
  • Standard tetrad expects the grid references to be tetrads (2 km resolution).
  • Standard quadrant expects the grid references to be quadrants (5 km resolution).
  • Standard hectad expects the grid references to be hectads (10 km resolution).
Each of the data accessor functions referenced by these keys takes a single argument which is the path (or URL) of a CSV that contains data in a standard format. The columns which must be present in the CSV are described below (the order is not important).
  • gr - the grid referece which must be of the correct precision for the function.
  • shape - describes the shape that will be displayed at that location, valid values are: circle, square, diamond, triangle-up, triangle-down.
  • size - a number between 0 and 1 which will be used as a factor to resize the dot symbol displayed on the map.
  • colour - a colour for the symbol which can be hex format, e.g. #FFA500, RGB format, e.g. rgb(100, 255, 0) or a named colour, e.g. red.
  • opacity - a number between 0 and 1 used to set the opacity of the symbol (0 is fully transparent and 1 fully opaque).
  • caption - an html string that will be used to update an element identified by the captionId option of an svg or leaflet map when the mouse cursor moves over the element representing this gr on the map.
  • noCaption - an html string that will be used to update an element identified by the captionId option of an svg or leaflet map when the mouse cursor moves out of the element representing this gr on the map.
The following columns are optional:
  • stroke a colour specifying an outline for the symbol which can be hex format, e.g. #FFA500, RGB format, e.g. rgb(100, 255, 0) or a named colour, e.g. red. If not present, no outline will be drawn.
  • Type:
    • object
    Source:

    Documentation generated by JSDoc 3.6.7 on Wed Aug 23 2023 04:10:13 GMT-0700 (Pacific Daylight Time)