You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.7 KiB
57 lines
1.7 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
<html> |
|
|
|
<head> |
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
<title>amMap example</title> |
|
|
|
<link rel="stylesheet" href="../ammap/ammap.css" type="text/css"> |
|
<script src="../ammap/ammap.js" type="text/javascript"></script> |
|
<!-- map file should be included after ammap.js --> |
|
<script src="../ammap/maps/js/worldLow.js" type="text/javascript"></script> |
|
<script src="../ammap/lang/de.js" type="text/javascript"></script> |
|
<script src="../ammap/lang/fr.js" type="text/javascript"></script> |
|
<script src="../ammap/lang/es.js" type="text/javascript"></script> |
|
|
|
<script> |
|
var map = AmCharts.makeChart("mapdiv", { |
|
|
|
// let's set initial language to German |
|
language: "de", |
|
|
|
type: "map", |
|
projection:"miller", |
|
|
|
dataProvider: { |
|
map: "worldLow", |
|
getAreasFromMap: true |
|
}, |
|
|
|
areasSettings: { |
|
autoZoom: true, |
|
selectedColor: "#CC0000" |
|
} |
|
}); |
|
|
|
|
|
function setLanguage(lang) { |
|
if ('en' == lang) |
|
map.language = null; |
|
else |
|
map.language = lang; |
|
map.validateData(); |
|
} |
|
</script> |
|
</head> |
|
|
|
<body> |
|
<div id="mapdiv" style="width: 100%; background-color:#EEEEEE; height: 500px;"></div> |
|
<select onchange="setLanguage(this.options[this.selectedIndex].value);" style="position: absolute; top: 30px; right: 30px; font-size: 15px; padding: 10px;"> |
|
<option value="en">English (default)</option> |
|
<option value="de" selected="selected">German</option> |
|
<option value="fr">French</option> |
|
<option value="es">Spanish</option> |
|
</select> |
|
</body> |
|
|
|
</html> |