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
var map = anychart.map();
10
map.geoData(anychart.maps.australia);
11
12
// enable crosshair
13
map.crosshair(true);
14
15
map.axes(true);
16
map.grids(true);
17
18
map.title("Enable Map Crosshair");
19
map.container("container");
20
map.draw();
21
});