Region Editor

Drawing a Polygon

Modifying a Polygon


Using an Edition Frame

Predefined Polygons:

Predefined Edition Frames:

The following links must be prepended to the HTML page hosting the tool.
There no minified version right now.
The JS code is based on JQuery.
			<link rel="stylesheet" href="" />

<script type="text/javascript" src="" charset="utf-8"></script>
<script type="text/javascript" src="" charset="utf-8"></script>
<script type="text/javascript" src="saadajsbasics/javascript/Segment.js" charset="utf-8"></script>
<script type="text/javascript" src="saadajsbasics/javascript/AstroCoo.js" charset="utf-8"></script>
<script type="text/javascript" src="saadajsbasics/javascript/RegionEditor_m.js" charset="utf-8"></script>
<script type="text/javascript" src="saadajsbasics/javascript/RegionEditor_v.js" charset="utf-8"></script>
<script type="text/javascript" src="saadajsbasics/javascript/RegionEditor_c.js" charset="utf-8"></script>
The region editor must be initialized in the $.ready() JQuery handler.
			$.ready = function() {
    regionEditor = new RegionEditor_mVc("aladin-lite-div"
            , function(data) {
               if (data.userAction)
The JSON below show the way polygons are described.
Sometime, the user handler can be called automatically. These possibly spurious events can be filtered by the userAction flag. The size given here is just a indication; the real size is computed by the tool each time it needs it.
			{ "isReady":true,
A polygon can be drawn by the API:
where points has the following form:
type : "array",
value : [ 0, 89, 120, 89, 240, 89 ]
Edition frames can also be drawn by the API:
where points can either have the previous form or the following one:
type : "soda",
value : "POLYGON 0 89 120, 89 240 89"

Copyright (c) 2017 Laurent Michel
laurent.michel at - Observatoire Astronomique de Strasbourg (FR)