| 23 |
liveuser |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
|
2 |
<html>
|
|
|
3 |
|
|
|
4 |
<head>
|
|
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
6 |
<title>amMap example</title>
|
|
|
7 |
|
|
|
8 |
<link rel="stylesheet" href="../ammap/ammap.css" type="text/css">
|
|
|
9 |
<script src="../ammap/ammap.js" type="text/javascript"></script>
|
|
|
10 |
<!-- map file should be included after ammap.js -->
|
|
|
11 |
<script src="../ammap/maps/js/worldLow.js" type="text/javascript"></script>
|
|
|
12 |
<script src="../ammap/lang/de.js" type="text/javascript"></script>
|
|
|
13 |
<script src="../ammap/lang/fr.js" type="text/javascript"></script>
|
|
|
14 |
<script src="../ammap/lang/es.js" type="text/javascript"></script>
|
|
|
15 |
|
|
|
16 |
<script>
|
|
|
17 |
var map = AmCharts.makeChart("mapdiv", {
|
|
|
18 |
|
|
|
19 |
// let's set initial language to German
|
|
|
20 |
language: "de",
|
|
|
21 |
|
|
|
22 |
type: "map",
|
|
|
23 |
projection:"miller",
|
|
|
24 |
|
|
|
25 |
dataProvider: {
|
|
|
26 |
map: "worldLow",
|
|
|
27 |
getAreasFromMap: true
|
|
|
28 |
},
|
|
|
29 |
|
|
|
30 |
areasSettings: {
|
|
|
31 |
autoZoom: true,
|
|
|
32 |
selectedColor: "#CC0000"
|
|
|
33 |
}
|
|
|
34 |
});
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
function setLanguage(lang) {
|
|
|
38 |
if ('en' == lang)
|
|
|
39 |
map.language = null;
|
|
|
40 |
else
|
|
|
41 |
map.language = lang;
|
|
|
42 |
map.validateData();
|
|
|
43 |
}
|
|
|
44 |
</script>
|
|
|
45 |
</head>
|
|
|
46 |
|
|
|
47 |
<body>
|
|
|
48 |
<div id="mapdiv" style="width: 100%; background-color:#EEEEEE; height: 500px;"></div>
|
|
|
49 |
<select onchange="setLanguage(this.options[this.selectedIndex].value);" style="position: absolute; top: 30px; right: 30px; font-size: 15px; padding: 10px;">
|
|
|
50 |
<option value="en">English (default)</option>
|
|
|
51 |
<option value="de" selected="selected">German</option>
|
|
|
52 |
<option value="fr">French</option>
|
|
|
53 |
<option value="es">Spanish</option>
|
|
|
54 |
</select>
|
|
|
55 |
</body>
|
|
|
56 |
|
|
|
57 |
</html>
|