HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
// This sample uses 3rd party Proj4js JavaScript library to transform coordinates
3
// See https://docs.anychart.com/Maps/Map_Projections to learn more.
4
5
var dataSet = anychart.data.set([
6
{points: [-13.03, 131.54, -27.50, 152.85], curvature: -0.3},
7
{points: [-27.50, 152.85, -34.23, 150.88], curvature: -0.3},
8
{points: [-27.50, 152.85, -19.85, 147.60], curvature: -0.3},
9
{points: [-19.85, 147.60, -22.37, 150.15]},
10
{points: [-22.37, 150.15, -27.50, 152.85]},
11
{points: [-27.50, 152.85, -35.87, 144.00]},
12
{points: [-35.87, 144.00, -31.35, 137.6]},
13
{points: [-31.35, 137.6, -30.53, 115.70]},
14
{points: [-30.53, 115.70, -27.03, 113.96]},
15
{points: [-27.03, 113.96, -23.93, 116.26], curvature: -0.3}
16
]);
17
18
var map = anychart.map();
19
map.geoData(anychart.maps.australia);
20
21
var series = map.connector(dataSet);
22
23
// Get curvature.
24
var curvature = series.curvature();
25
26
map.title("Curvature value is " + curvature);
27
map.container("container");
28
map.draw();
29
});