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
3
// This sample uses 3rd party proj4 component
4
// that makes it possible to set coordinates
5
// for the points and labels on the map and
6
// required for custom projections and grid labels formatting.
7
// See https://docs.anychart.com/Maps/Map_Projections
8
9
// create the dataset of points that are defined by latitude and longtitude values
10
var dataSet_lat_long = [
11
{lat: -25.75, long: 122.18},
12
{lat: -18.50, long: 135.24},
13
{lat: -23.12, long: 148.62},
14
{lat: -17.89, long: 145.09},
15
{lat: -33.28, long: 135.58},
16
{lat: -31.21, long: 116.44},
17
{lat: -32.26, long: 151.44},
18
{lat: -25.63, long: 152.37}
19
];
20
21
var map = anychart.map();
22
map.geoData(anychart.maps.australia);
23
24
// Creates the marker series
25
var series_lat_long = map.marker(dataSet_lat_long);
26
series_lat_long.tooltip({title: false, separator: false});
27
28
map.title("Marker series on a map");
29
30
map.container("container");
31
map.draw();
32
});