diff --git a/website/doc/API/examples/all-examples.json b/website/doc/API/examples/all-examples.json index 84c202f1..797109ec 100644 --- a/website/doc/API/examples/all-examples.json +++ b/website/doc/API/examples/all-examples.json @@ -7,6 +7,8 @@ {"title": "Create a catalogue with a custom shape", "url": "cat-custom-shape/"}, {"title": "Display objectnames", "url": "onames-labels/"}, {"title": "Load a table from a VOTable URL", "url": "load-votable/"}, + {"title": "Easy access to SIMBAD and NED data", "url": "easy-access-simbad-ned/"}, + {"title": "Easy access to VizieR data", "url": "easy-access-vizier/"}, {"title": "Create markers", "url": "marker-creation/"}, {"title": "Add some footprints overlays", "url": "footprints/"}, {"title": "Add a polyline overlay", "url": "polyline/"}, diff --git a/website/doc/API/examples/configs/easy-access-simbad-ned.json b/website/doc/API/examples/configs/easy-access-simbad-ned.json new file mode 100644 index 00000000..f709c7f1 --- /dev/null +++ b/website/doc/API/examples/configs/easy-access-simbad-ned.json @@ -0,0 +1,6 @@ +{ + "title": "Using A.catalogFromSimbad and A.catalogFromNED API methods", + "html": "\n\n\n
\n\n", + "js": "var aladin = A.aladin('#aladin-lite-div', {target: 'M 82', fov: 0.25});\n\naladin.addCatalog(A.catalogFromSimbad('M 82', 0.1, {onClick: 'showTable'}));\naladin.addCatalog(A.catalogFromNED('09 55 52.4 +69 40 47', 0.1, {onClick: 'showPopup', shape: 'plus'}));", + "explain": "Click on one source to get associated measurements" +} diff --git a/website/doc/API/examples/configs/easy-access-vizier.json b/website/doc/API/examples/configs/easy-access-vizier.json new file mode 100644 index 00000000..c7d3c732 --- /dev/null +++ b/website/doc/API/examples/configs/easy-access-vizier.json @@ -0,0 +1,6 @@ +{ + "title": "Using A.catalogFromVizieR", + "html": "\n\n\n
\n\n", + "js": "var aladin = A.aladin('#aladin-lite-div', {target: 'M 45', fov: 5});\n\naladin.addCatalog(A.catalogFromVizieR('I/311/hip2', 'M 45', 5, {onClick: 'showTable'}));", + "explain": "Click on one source to get associated measurements" +} diff --git a/website/doc/API/index.gml b/website/doc/API/index.gml index 15819c6c..b91cd39a 100644 --- a/website/doc/API/index.gml +++ b/website/doc/API/index.gml @@ -155,6 +155,8 @@ labelColumnA label can be displayed next to the source shape. The value of labelColumn is the name of the column to be used for this purpose.
If this option is used, color and font of the label can be given with labelColor and labelFont. labelColorColor of the label labelFontFont of the label, eg 12px sans-serif + onClickDescribes the action to be executed when a source is clicked. By default, nothing happens. Available values are showTable (displays measurements associated to the clicked source in a table at the bottom of the GUI), showPopup (display measurements in a popup)
See this property in action in this example. + limitLimit the number of sources (default value: undefined) @@ -170,6 +172,20 @@ Using labels to display object names

+

Easy access to SIMBAD, NED and VizieR data

+

We provide with helper functions to easily load SIMBAD, NED or VizieR data for a given region of the sky: +

+

+ +

Examples:
+ Visualizing SIMBAD and NED data around M 82
+ Visualizing Hipparcos data in the Pleiades
+

+

Creating a marker

A marker displays a position on the sky. Clicking on a marker will open a popup with a title and text set upon creation.

Use A.marker(ra, dec, {popupTitle: <title of the popup>, popupDesc: <text (possibly HTML) for the popup>}) to create a new marker. You can then add it to an existing Catalog.