diff --git a/website/doc/API/examples/all-examples.json b/website/doc/API/examples/all-examples.json index 838c80e7..84c202f1 100644 --- a/website/doc/API/examples/all-examples.json +++ b/website/doc/API/examples/all-examples.json @@ -4,9 +4,12 @@ {"title": "Set an image layer by name", "url": "image-layer-by-name/"}, {"title": "Overlay an image layer on a base image layer", "url": "overlay-image-layer/"}, {"title": "Set the color map of an image layer", "url": "color-map/"}, + {"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": "Create markers", "url": "marker-creation/"}, {"title": "Add some footprints overlays", "url": "footprints/"}, + {"title": "Add a polyline overlay", "url": "polyline/"}, {"title": "Animate to a given position", "url": "animation/"}, {"title": "Demo page for AAS 225", "url": "AAS225/"} ] diff --git a/website/doc/API/index.gml b/website/doc/API/index.gml index f867aaf2..df9a016a 100644 --- a/website/doc/API/index.gml +++ b/website/doc/API/index.gml @@ -141,10 +141,34 @@
Calling A.catalogFromURL(<votable-URL>, <options>?) will return a Catalog object which can then be added to the Aladin Lite instance.
Catalogue layers are meant to hold list of astronomical sources. They are created using A.catalog(<options>?) and added to Aladin Lite with aladin.addCatalog(catalogInstance)
Possible options are:
+| Key name | Description |
|---|---|
| shape | The shape used for each source in the catalog. Possible values are: plus, rhomb, cross, triangle and square (default value).An Image object can also be passed (JPEG, PNG formats are supported, even SVG in most modern browsers). |
| color | The color of the shape for each source. |
| sourceSize | The size of the source in pixels. |
| labelColumn | A 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. |
| labelColor | Color of the label |
| labelFont | Font of the label, eg 12px sans-serif |
Example: loading a VOTable from VizieR
+Sources can be created manually using A.source(ra, dec, option) and added to an existing catalog layer
Example: Creating a catalog with a custom shape
Catalogue layers can also be created from a VOTable URL: calling A.catalogFromURL(<votable-URL>, <options>?) will return a Catalog object which can then be added to the Aladin Lite instance.
Examples:
+ Loading a VOTable from VizieR
+ Using labels to display object names
+
A marker displays a position on the sky. Clicking on a marker will open a popup with a title and text set upon creation.
@@ -157,6 +181,21 @@Overlay layers typically contain polygons, polylines,circles, etc. They are created and added to Aladin Lite with the following code snippet:
+
+var aladin = A.aladin('#aladin-lite-div');
+
+var overlay = A.graphicOverlay({color: 'cyan'});
+aladin.addOverlay(overlay);
+ A.graphicOverly takes as an optional parameter an object allowing one to set the color and the lineWidth: A.graphicOverlay({color: '#df4', lineWidth: 3});
Circles are created with A.circle(<centerRa>, <centerDec> <radiusInDegrees> <options>?); and must be added to an overlay layer to be visible.
Example: circle and polygons
+ +Polylines are created with A.polyline(<array-of-ra-dec>, <options>?);
Example: drawing a constellation outline
Aladin Lite source code will be available in the coming weeks under GPL3 licence. +
Aladin Lite source code is available under GPL3 licence (Download Aladin Lite source code).