mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2026-01-11 04:36:13 -08:00
7 lines
1010 B
JSON
7 lines
1010 B
JSON
{
|
|
"title": "Create sources with a custom shape",
|
|
"html": "<link rel='stylesheet' href='http://aladin.u-strasbg.fr/AladinLite/api/v2/latest/aladin.min.css' />\n<script type='text/javascript' src='http://code.jquery.com/jquery-1.9.1.min.js' charset='utf-8'></script>\n\n<div id='aladin-lite-div' style='width: 500px;height: 500px;'></div>\n<script type='text/javascript' src='http://aladin.u-strasbg.fr/AladinLite/api/v2/latest/aladin.min.js' charset='utf-8'></script>\n",
|
|
"js": "var aladin = A.aladin('#aladin-lite-div', {survey: 'P/DSS2/red', target: 'M50', fov: 0.3});\n\nvar customImg = new Image();\ncustomImg.onload = function() {\n var cat = A.catalog({shape: customImg});\n aladin.addCatalog(cat);\n cat.addSources(A.source(105.69239256, -8.45235969));\n cat.addSources(A.source(105.70779763, -8.31350997));\n cat.addSources(A.source(105.74242906, -8.34776709));\n};\ncustomImg.src = 'http://aladin.u-strasbg.fr/AladinLite/doc/API/examples/img/star.png';",
|
|
"explain": ""
|
|
}
|