mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2026-01-20 00:31:39 -08:00
48 lines
1.0 KiB
HTML
48 lines
1.0 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
|
|
<link rel="stylesheet" href="../distrib/latest/aladin.min.css" />
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<script src="http://code.jquery.com/jquery-1.12.1.min.js"></script>
|
|
|
|
<div id='time'></div>
|
|
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
|
<div id='aladin-statsDiv'></div>
|
|
<button id="go">Go</go>
|
|
<script type="text/javascript" src="../distrib/latest/aladin.js" charset="utf-8"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$('#go').on('click', function() {
|
|
// Start up Aladin Lite
|
|
var aladin = A.aladin('#aladin-lite-div', {fov: 70});
|
|
aladin.gotoRaDec('45', '20');
|
|
var order = 6;
|
|
var npixels = 1200;
|
|
console.time();
|
|
for (var i = 0; i<npixels; i++) {
|
|
var pixel = [];
|
|
var json ={};
|
|
var healpix = i;
|
|
pixel.push(healpix);
|
|
json[order] = pixel;
|
|
var opacity = i/npixels;
|
|
var moc = A.MOCFromJSON(json, {opacity: opacity, color: 'blue', lineWidth: opacity, name: 'MOC_' + i});
|
|
aladin.addMOC(moc);
|
|
}
|
|
console.timeEnd();
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|