ネパールの地図は 2 種類あります (ネパールの地区地図とネパールの生態地図)。上記のタイプごとに 2 つのデータ セットがあります。ユーザーが最初に必要なマップの種類を選択し、後で視覚化するデータを選択できる視覚化を作成しようとしています。(ドロップダウンを使用)。
これらはドロップダウンのコードです。
<select id="changeMap">
<option>Change Map</option>
<option value="ecoMap">Ecological Region</option>
<option value="world_mill_en">Districts</option>
</select>
<select id="changedata">
<option>Change Data</option>
<option value="Caste 1">CASTE 1</option>
<option value="Caste 2">CASTE 2</option>
</select>
これは jvector Map 関数です。
<div id="container"></div>
<script>
var vmap = '<div id="vmap" style="width: 600px; height: 400px;"></div>';
$('#changeMap').on('change', function () {
var _map = $(this).val();
$('#vmap').remove();
$('#container').append(vmap);
$('#vmap').vectorMap({
map: _map,
backgroundColor: '#000000',
enableZoom: true,
regionsSelectable : false,
series: {
regions: [{
values: data,
scale: ['#fffad6', '#d05300'],
normalizeFunction: 'polynomial'
}]
}});
});
</script>
では、このドロップダウンの組み合わせを視覚化するにはどうすればよいでしょうか? ありがとう!