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.0Reference magnitude limit (for scaling symbols).
-
magIndex
number
<optional>
0Index 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>
falseCatalog requires authentication?
-
nmax
number
<optional>
10000Maximum 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.
-
name
Returns
-
Catalog
Instance of a catalog.
Source
Methods
_csvToGeoJSON(str) → {object}
Convert CSV data to GeoJSON.
Parameters
-
str
string
CSV data.
Returns
-
object
GeoJSON object.
Source
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
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
popup(feature) → {string}
Generate HTML content for popups.
Parameters
-
feature
object
Feature property of the source.
Returns
-
string
HTML content.
Source
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
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
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.