mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2026-01-11 04:36:13 -08:00
38 lines
998 B
HTML
38 lines
998 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
|
|
<link rel="stylesheet" href="../distrib/latest/aladin.min.css" />
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
|
|
|
|
|
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
|
<div id='aladin-statsDiv'></div>
|
|
<script type="text/javascript" src="../distrib/latest/aladin.js" charset="utf-8"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
var aladin = A.aladin('#aladin-lite-div', {target: 'M51', fov: 0.3, survey: 'P/DSS2/red'});
|
|
|
|
// 1. previous method signature should still work
|
|
//aladin.gotoObject('unknown', function() {alert('object not known by AL');});
|
|
|
|
// 2. calling without callbackOptions param should work
|
|
aladin.gotoObject('M1');
|
|
|
|
// 3. calling with a success callback
|
|
aladin.gotoObject('M51', {success: function(pos) {console.log('position', pos);},
|
|
error: function() {console.log('pas connu');}});
|
|
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|