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
trueare 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
-
CatalogInstance of a catalog.
Source
Methods
_csvToGeoJSON(str) → {object}
Convert CSV data to GeoJSON.
Parameters
-
str
stringCSV data.
Returns
-
objectGeoJSON object.
Source
draw(feature, latlng) → {leaflet.circleMarker}
Draw a circle at the current catalog source world coordinates.
Parameters
-
feature
objectFeature property of the source.
-
latlng
leaflet.LatLngWorld coordinates of the source.
Returns
-
leaflet.circleMarkerCircle marker.
Source
filter(feature) → {boolean}
Filter out a source based on its feature property.
Parameters
-
feature
objectFeature property of the source.
Returns
-
booleanfalseif filtered out,trueotherwise.
Source
popup(feature) → {string}
Generate HTML content for popups.
Parameters
-
feature
objectFeature property of the source.
Returns
-
stringHTML content.
Source
readProperty(item) → {number}
Read number in a cell from a Vizier ASCII output.
Parameters
-
item
stringCell content.
Returns
-
numberValue in the cell.
Source
style(feature) → {leaflet.Path.options}
Return drawing style for sources.
Parameters
-
feature
objectFeature property of the source.
Returns
-
leaflet.Path.optionsDrawing style options.
Source
toGeoJSON(data) → {object}
Summary
Convert catalog data to GeoJSON.
Description
Defaults to a wrapper around private method
_csvToGeoJSON.
Parameters
-
data
string|objectcatalog data.
Returns
-
objectGeoJSON object.
Source
Type Definitions
drawCallback(feature, latlng) → {leaflet.Path}
Callback for drawing catalog objects.
Parameters
-
feature
objectFeature property of the source.
-
latlng
leaflet.LatLngWorld coordinates of the source.
Returns
-
leaflet.PathPath.