Files
aladin-lite/website/doc/API/examples/configs/cat-custom-shape.json
tboch 688ebcfd1f
2015-04-17 08:45:31 +00:00

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": ""
}