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/7.14.3/Maps/Map_Projections
8
9
// create the dataset of points that are defined by latitude and longtitude values
10
var dataSet_lat_long = anychart.data.set([
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 australiaMap = anychart.map();
22
australiaMap.geoData(anychart.maps.australia);
23
24
// Creates the marker series
25
var series_lat_long = australiaMap.marker(dataSet_lat_long);
26
27
series_lat_long.tooltip({title: false, separator: false});
28
29
australiaMap.title("Marker series on a map");
30
australiaMap.interactivity().zoomOnMouseWheel(false);
31
australiaMap.container("container");
32
australiaMap.draw();
33
});