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 @@12px sans-serifshowTable (displays measurements associated to the clicked source in a table at the bottom of the GUI), showPopup (display measurements in a popup)We provide with helper functions to easily load SIMBAD, NED or VizieR data for a given region of the sky: +
A.catalogFromSimbad(<target>, <radius-in-degrees>?, <catalog-options>?, <successCallback>?) will return a Catalog instance with Simbad data of the requested region around the target. Target can be an object name, a position or an object {ra: <ra-value>, dec: <dec-value>}.A.catalogFromNED(<target>, <radius-in-degrees>?, <catalog-options>?, <successCallback>?) will return a Catalog instance with NED data of the requested region.A.catalogFromVizieR(<vizier-cat-id>, <target>, <radius-in-deg>?, <cat-options>?, <successCallback>?) will return a Catalog instance with data of the requested VizieR catalogue.Examples:
+ Visualizing SIMBAD and NED data around M 82
+ Visualizing Hipparcos data in the Pleiades
+
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.