VisiOmatic web client

Class

Catalog

Extends
  • leaflet.Class

new Catalog(optionsopt) → {Catalog}

Create a catalog.

Parameters

  • options object <optional>

    Options.

    Properties

    • name string <optional>
      'A catalog'

      Catalog name.

    • attribution string <optional>
      ''

      Reference or copyright.

    • color RGB <optional>
      'yellow'

      Default display color. Currently unused.

    • properties Array.<string> <optional>
      ['mag']

      Names of catalog object properties.

    • propertyMask Array.<string> <optional>

      Property display mask: only properties with propertyMask element set to true are displayed. Defaults to all properties being displayed.

    • units Array.<string> <optional>
      ['']

      Property units.

    • magLim number <optional>
      20.0

      Reference magnitude limit (for scaling symbols).

    • magIndex number <optional>
      0

      Index of the property member that stores the reference magnitude.

    • magScaleType 'mag' | 'log' | 'linear' <optional>
      'mag'

      Scale type for the reference "magnitude".

    • regionType 'box' | 'cone' <optional>
      'box'

      Geometry of the query region.

    • service string <optional>
      'Vizier@CDS'

      Name of the catalog web service.

    • className string <optional>
      'logo-catalog-vizier'

      Class name for the catalog or service logo.

    • serviceURL string <optional>
      'https://vizier.unistra.fr/viz-bin'

      Root web service query URL.

    • catalogURL string <optional>
      '/'

      Relative catalog query URL.

    • objectURL string <optional>
      '/'

      Relative object query URL.

    • authenticate boolean <optional>
      false

      Catalog requires authentication?

    • nmax number <optional>
      10000

      Maximum number of sources per query.

    • format string <optional>
      'csv'

      Data format ('csv' or 'json')

    • draw Catalog~drawCallback <optional>

      Callback function called for drawing object. Defaults to a circle marker.

Returns

  • Catalog

    Instance of a catalog.

Source

Methods

privatestatic

_csvToGeoJSON(str) → {object}

Convert CSV data to GeoJSON.

Parameters

  • str string

    CSV data.

Returns

  • object

    GeoJSON object.

Source

static

draw(feature, latlng) → {leaflet.circleMarker}

Draw a circle at the current catalog source world coordinates.

Parameters

  • feature object

    Feature property of the source.

  • latlng leaflet.LatLng

    World coordinates of the source.

Returns

  • leaflet.circleMarker

    Circle marker.

Source

static

filter(feature) → {boolean}

Filter out a source based on its feature property.

Parameters

  • feature object

    Feature property of the source.

Returns

  • boolean

    false if filtered out, true otherwise.

Source

static

popup(feature) → {string}

Generate HTML content for popups.

Parameters

  • feature object

    Feature property of the source.

Returns

  • string

    HTML content.

Source

static

readProperty(item) → {number}

Read number in a cell from a Vizier ASCII output.

Parameters

  • item string

    Cell content.

Returns

  • number

    Value in the cell.

Source

static

style(feature) → {leaflet.Path.options}

Return drawing style for sources.

Parameters

  • feature object

    Feature property of the source.

Returns

  • leaflet.Path.options

    Drawing style options.

Source

static

toGeoJSON(data) → {object}

Summary

Convert catalog data to GeoJSON.

Description

Defaults to a wrapper around private method _csvToGeoJSON.

Parameters

  • data string | object

    catalog data.

Returns

  • object

    GeoJSON object.

Source

Type Definitions

drawCallback(feature, latlng) → {leaflet.Path}

Callback for drawing catalog objects.

Parameters

  • feature object

    Feature property of the source.

  • latlng leaflet.LatLng

    World coordinates of the source.

Returns

  • leaflet.Path

    Path.

Source