This page is intended to help developers and integrators embedding Aladin Lite into their web pages and portals to switch from version 2 to version 3.
We tried as much as possible to be back-compatible with the v2 API. Should you find an issue in v3 with a code working in v2, please let us know.
The main change is in the embedding code and in the initialization sequence. In Aladin Lite version 3, here is the typical code to embed in a web page:
<script type="text/javascript" src="https://aladin.u-strasbg.fr/AladinLite/api/v3/latest/aladin.js" charset="utf-8"></script> <div id="aladin-lite-div" style="width: 500px; height: 400px"></div> <script type="text/javascript"> let aladin; A.init.then(() => { aladin = A.aladin('#aladin-lite-div', {survey: '2MASS/J', fov: 360, projection: 'AIT', fullScreen: true, cooFrame: 'galactic'}); }); </script>Look at this page for a live example.
The Aladin Lite CSS file is no longer loaded explicitely, it is embedded in the JS file.
Alternatively, jQuery is not needed anymore as it is now packaged into Aladin Lite js file. Of course, you still can include jQuery if you need it for your own webpage.
Submit your feedback by e-mail to thomas.boch at astro.unistra.fr and matthieu.baumann at astro.unistra.fr with a subject starting with [Aladin Lite v3].