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
// set the data
10
var data = [
11
{id: "AU.CT", value: 15},
12
{id: "AU.VI", value: 23},
13
{id: "AU.WA", value: 86},
14
{id: "AU.QL", value: 16},
15
{id: "AU.NS", value: 32},
16
{id: "AU.NT", value: 64},
17
{id: "AU.TS", value: 28},
18
{id: "AU.SA", value: 45}
19
];
20
21
// create the map
22
var map = anychart.map();
23
map.geoData(anychart.maps.australia);
24
// set the map title
25
map.title("Disable Navigational Interactivity");
26
27
// set the series of choropleth type
28
map.choropleth(data);
29
30
// create a variable for the interactivity
31
var currentInteractivity = map.interactivity();
32
33
// Disables zoom On Mouse Wheel
34
map.interactivity().zoomOnMouseWheel(false);
35
// Disables zoom on double click
36
map.interactivity().keyboardZoomAndMove(false);
37
// Disables zoom on double click
38
map.interactivity().zoomOnDoubleClick(false);
39
40
map.container("container");
41
map.draw();
42
});