var map; function initMap() { map = new google.maps.Map(document.getElementById('map'), { center: {lat: 33.113189, lng: 132.439727}, zoom: 9 }); var misaki_points = [ {lat: 33.374016, lng: 131.973558}, {lat: 33.312368, lng: 132.019052}, {lat: 33.445573, lng: 132.328883}, {lat: 33.513608, lng: 132.290809} ]; //図形の作成及び表示 //名前_onが中に色づいているもので //名前_offが中に色がないものになります var misaki_on = new google.maps.Polygon({ paths: misaki_points, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FF0000', fillOpacity: 0.20, map: map }); var yawatahama_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.20, map: map, bounds: { north: 33.487369, south: 33.321902, east: 132.439017, west: 132.301268 } }); var akehama_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FFA500', fillOpacity: 0.20, map: map, bounds: { north: 33.355651, south: 33.282428, east: 132.541266, west: 132.361644 } }); var yoshida_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#008000', fillOpacity: 0.20, map: map, bounds: { north: 33.326755, south: 33.229928, east: 132.56318, west: 132.416667 } }); var uwajima_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#B365FD', fillOpacity: 0.20, map: map, bounds: { north: 33.320449, south: 33.193827, east: 132.562533, west: 132.371638 } }); var hiburi_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FF0000', fillOpacity: 0.20, map: map, bounds: { north: 33.245488, south: 33.134835, east: 132.406557, west: 132.238534 } }); var yusu_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.20, map: map, bounds: { north: 33.227136, south: 33.172057, east: 132.498363, west: 132.393854 } }); var shitaba_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FFA500', fillOpacity: 0.20, map: map, bounds: { north: 33.218925, south: 33.15369, east: 132.464296, west: 132.378264 } }); var miura_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#008000', fillOpacity: 0.20, map: map, bounds: { north: 33.218925, south: 33.167224, east: 132.520304, west: 132.449861 } }); var kitanada_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#B365FD', fillOpacity: 0.20, map: map, bounds: { north: 33.172057, south: 33.109585, east: 132.529651, west: 132.395009 } }); var shimonada_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FF0000', fillOpacity: 0.20, map: map, bounds: { north: 33.121662, south: 33.046295, east: 132.490513, west: 132.395009 } }); var nagamiyama_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.20, map: map, bounds: { north: 33.05744, south: 33.03808, east: 132.442213, west: 132.404105 } }); var iekushi_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FFA500', fillOpacity: 0.20, map: map, bounds: { north: 33.052116, south: 33.017748, east: 132.490714, west: 132.433552 } }); var kashiwazaki_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#008000', fillOpacity: 0.20, map: map, bounds: { north: 33.021621, south: 32.991116, east: 132.515542, west: 132.474547 } }); var misho_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#B365FD', fillOpacity: 0.20, map: map, bounds: { north: 32.990147, south: 32.956317, east: 132.559149, west: 132.494179 } }); var nishiura_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FF0000', fillOpacity: 0.20, map: map, bounds: { north: 32.961002, south: 32.938593, east: 132.503798, west: 132.473938 } }); var funakoshi_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.20, map: map, bounds: { north: 32.950817, south: 32.934722, east: 132.543855, west: 132.503798 } }); var fukuura_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FFA500', fillOpacity: 0.20, map: map, bounds: { north: 32.933092, south: 32.897405, east: 132.543855, west: 132.493845 } }); var hisayoshi_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#008000', fillOpacity: 0.20, map: map, bounds: { north: 32.933092, south: 32.897405, east: 132.582744, west: 132.540594 } }); var fukaura_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FFA500', fillOpacity: 0.20, map: map, bounds: { north: 32.933092, south: 32.902181, east: 132.662283, west: 132.571485 } }); var uchiumi_on = new google.maps.Rectangle({ strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FF0000', fillOpacity: 0.20, map: map, bounds: { north: 33.06041, south: 32.891897, east: 132.520201, west: 132.356072 } }); var misaki_off = new google.maps.Polygon({ paths: misaki_points, visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FF0000', fillOpacity: 0.00, map: map }); var yawatahama_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FF0000', fillOpacity: 0.0, map: map, bounds: { north: 33.487369, south: 33.321902, east: 132.439017, west: 132.301268 } }); var akehama_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FF0000', fillOpacity: 0.0, map: map, bounds: { north: 33.355651, south: 33.282428, east: 132.541266, west: 132.361644 } }); var yoshida_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FF0000', fillOpacity: 0.0, map: map, bounds: { north: 33.326755, south: 33.229928, east: 132.56318, west: 132.416667 } }); var uwajima_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 33.320449, south: 33.193827, east: 132.562533, west: 132.371638 } }); var hiburi_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 33.245488, south: 33.134835, east: 132.406557, west: 132.238534 } }); var yusu_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 33.227136, south: 33.172057, east: 132.498363, west: 132.393854 } }); var shitaba_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 33.218925, south: 33.15369, east: 132.464296, west: 132.378264 } }); var miura_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 33.218925, south: 33.167224, east: 132.520304, west: 132.449861 } }); var kitanada_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 33.172057, south: 33.109585, east: 132.529651, west: 132.395009 } }); var shimonada_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 33.121662, south: 33.046295, east: 132.490513, west: 132.395009 } }); var nagamiyama_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 33.05744, south: 33.03808, east: 132.442213, west: 132.404105 } }); var iekushi_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 33.052116, south: 33.017748, east: 132.490714, west: 132.433552 } }); var kashiwazaki_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 33.021621, south: 32.991116, east: 132.515542, west: 132.474547 } }); var misho_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 32.990147, south: 32.956317, east: 132.559149, west: 132.494179 } }); var nishiura_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 32.961002, south: 32.938593, east: 132.503798, west: 132.473938 } }); var funakoshi_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.0, map: map, bounds: { north: 32.950817, south: 32.934722, east: 132.543855, west: 132.503798 } }); var fukuura_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#008000', fillOpacity: 0.0, map: map, bounds: { north: 32.933092, south: 32.897405, east: 132.543855, west: 132.493845 } }); var hisayoshi_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FFA500', fillOpacity: 0.0, map: map, bounds: { north: 32.933092, south: 32.897405, east: 132.582744, west: 132.540594 } }); var fukaura_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FFA500', fillOpacity: 0.0, map: map, bounds: { north: 32.933092, south: 32.902181, east: 132.662283, west: 132.571485 } }); var uchiumi_off = new google.maps.Rectangle({ visible: false, strokeColor: '#000000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FFA500', fillOpacity: 0.0, map: map, bounds: { north: 33.06041, south: 32.891897, east: 132.520201, west: 132.356072 } }); // チェックボックスのオンオフをきっかけに // マップに表示されてある四角形に表示するオブジェクトを変更 var misaki_change = document.getElementById('misaki'); misaki_change.addEventListener('click', function() { if(misaki_on.getVisible() == true){ //色づいてあるオブジェクトを非表示 misaki_on.setVisible(false); //色づいていないオブジェクトを表示 misaki_off.setVisible(true); }else if(misaki_on.getVisible() == false){ //色づいていないオブジェクトを非表示 misaki_on.setVisible(true); //色づいてあるオブジェクトを表示 misaki_off.setVisible(false); } }); var yawatahama_change = document.getElementById('yawatahama'); yawatahama_change.addEventListener('click', function() { if(yawatahama_on.getVisible() == true){ yawatahama_on.setVisible(false); yawatahama_off.setVisible(true); }else if(yawatahama_on.getVisible() == false){ yawatahama_on.setVisible(true); yawatahama_off.setVisible(false); } }); var akehama_change = document.getElementById('akehama'); akehama_change.addEventListener('click', function() { if(akehama_on.getVisible() == true){ akehama_on.setVisible(false); akehama_off.setVisible(true); }else if(akehama_on.getVisible() == false){ akehama_on.setVisible(true); akehama_off.setVisible(false); } }); var yoshida_change = document.getElementById('yoshida'); yoshida_change.addEventListener('click', function() { if(yoshida_on.getVisible() == true){ yoshida_on.setVisible(false); yoshida_off.setVisible(true); }else if(yoshida_on.getVisible() == false){ yoshida_on.setVisible(true); yoshida_off.setVisible(false); } }); var uwajima_change = document.getElementById('uwajima'); uwajima_change.addEventListener('click', function() { if(uwajima_on.getVisible() == true){ uwajima_on.setVisible(false); uwajima_off.setVisible(true); }else if(uwajima_on.getVisible() == false){ uwajima_on.setVisible(true); uwajima_off.setVisible(false); } }); var hiburi_change = document.getElementById('hiburi'); hiburi_change.addEventListener('click', function() { if(hiburi_on.getVisible() == true){ hiburi_on.setVisible(false); hiburi_off.setVisible(true); }else if(hiburi_on.getVisible() == false){ hiburi_on.setVisible(true); hiburi_off.setVisible(false); } }); var yusu_change = document.getElementById('yusu'); yusu_change.addEventListener('click', function() { if(yusu_on.getVisible() == true){ yusu_on.setVisible(false); yusu_off.setVisible(true); }else if(yusu_on.getVisible() == false){ yusu_on.setVisible(true); yusu_off.setVisible(false); } }); var shitaba_change = document.getElementById('shitaba'); shitaba_change.addEventListener('click', function() { if(shitaba_on.getVisible() == true){ shitaba_on.setVisible(false); shitaba_off.setVisible(true); }else if(shitaba_on.getVisible() == false){ shitaba_on.setVisible(true); shitaba_off.setVisible(false); } }); var miura_change = document.getElementById('miura'); miura_change.addEventListener('click', function() { if(miura_on.getVisible() == true){ miura_on.setVisible(false); miura_off.setVisible(true); }else if(miura_on.getVisible() == false){ miura_on.setVisible(true); miura_off.setVisible(false); } }); var kitanada_change = document.getElementById('kitanada'); kitanada_change.addEventListener('click', function() { if(kitanada_on.getVisible() == true){ kitanada_on.setVisible(false); kitanada_off.setVisible(true); }else if(kitanada_on.getVisible() == false){ kitanada_on.setVisible(true); kitanada_off.setVisible(false); } }); var shimonada_change = document.getElementById('shimonada'); shimonada_change.addEventListener('click', function() { if(shimonada_on.getVisible() == true){ shimonada_on.setVisible(false); shimonada_off.setVisible(true); }else if(shimonada_on.getVisible() == false){ shimonada_on.setVisible(true); shimonada_off.setVisible(false); } }); var nagamiyama_change = document.getElementById('nagamiyama'); nagamiyama_change.addEventListener('click', function() { if(nagamiyama_on.getVisible() == true){ nagamiyama_on.setVisible(false); nagamiyama_off.setVisible(true); }else if(nagamiyama_on.getVisible() == false){ nagamiyama_on.setVisible(true); nagamiyama_off.setVisible(false); } }); var iekushi_change = document.getElementById('iekushi'); iekushi_change.addEventListener('click', function() { if(iekushi_on.getVisible() == true){ iekushi_on.setVisible(false); iekushi_off.setVisible(true); }else if(iekushi_on.getVisible() == false){ iekushi_on.setVisible(true); iekushi_off.setVisible(false); } }); var kashiwazaki_change = document.getElementById('kashiwazaki'); kashiwazaki_change.addEventListener('click', function() { if(kashiwazaki_on.getVisible() == true){ kashiwazaki_on.setVisible(false); kashiwazaki_off.setVisible(true); }else if(kashiwazaki_on.getVisible() == false){ kashiwazaki_on.setVisible(true); kashiwazaki_off.setVisible(false); } }); var misho_change = document.getElementById('misho'); misho_change.addEventListener('click', function() { if(misho_on.getVisible() == true){ misho_on.setVisible(false); misho_off.setVisible(true); }else if(misho_on.getVisible() == false){ misho_on.setVisible(true); misho_off.setVisible(false); } }); var nishiura_change = document.getElementById('nishiura'); nishiura_change.addEventListener('click', function() { if(nishiura_on.getVisible() == true){ nishiura_on.setVisible(false); nishiura_off.setVisible(true); }else if(nishiura_on.getVisible() == false){ nishiura_on.setVisible(true); nishiura_off.setVisible(false); } }); var funakoshi_change = document.getElementById('funakoshi'); funakoshi_change.addEventListener('click', function() { if(funakoshi_on.getVisible() == true){ funakoshi_on.setVisible(false); funakoshi_off.setVisible(true); }else if(funakoshi_on.getVisible() == false){ funakoshi_on.setVisible(true); funakoshi_off.setVisible(false); } }); var fukuura_change = document.getElementById('fukuura'); fukuura_change.addEventListener('click', function() { if(fukuura_on.getVisible() == true){ fukuura_on.setVisible(false); fukuura_off.setVisible(true); }else if(fukuura_on.getVisible() == false){ fukuura_on.setVisible(true); fukuura_off.setVisible(false); } }); var hisayoshi_change = document.getElementById('hisayoshi'); hisayoshi_change.addEventListener('click', function() { if(hisayoshi_on.getVisible() == true){ hisayoshi_on.setVisible(false); hisayoshi_off.setVisible(true); }else if(hisayoshi_on.getVisible() == false){ hisayoshi_on.setVisible(true); hisayoshi_off.setVisible(false); } }); var fukaura_change = document.getElementById('fukaura'); fukaura_change.addEventListener('click', function() { if(fukaura_on.getVisible() == true){ fukaura_on.setVisible(false); fukaura_off.setVisible(true); }else if(fukaura_on.getVisible() == false){ fukaura_on.setVisible(true); fukaura_off.setVisible(false); } }); var uchiumi_change = document.getElementById('uchiumi'); uchiumi_change.addEventListener('click', function() { if(uchiumi_on.getVisible() == true){ uchiumi_on.setVisible(false); uchiumi_off.setVisible(true); }else if(uchiumi_on.getVisible() == false){ uchiumi_on.setVisible(true); uchiumi_off.setVisible(false); } }); //地区選択の全選択・全解除を押したときの処理 var allmove_change = document.getElementById('allmove'); allmove_change.addEventListener('click', function() { if(misaki_on.getVisible() == true){ misaki_on.setVisible(false); misaki_off.setVisible(true); } if(yawatahama_on.getVisible() == true){ yawatahama_on.setVisible(false); yawatahama_off.setVisible(true); } if(akehama_on.getVisible() == true){ akehama_on.setVisible(false); akehama_off.setVisible(true); } if(yoshida_on.getVisible() == true){ yoshida_on.setVisible(false); yoshida_off.setVisible(true); } if(uwajima_on.getVisible() == true){ uwajima_on.setVisible(false); uwajima_off.setVisible(true); } if(hiburi_on.getVisible() == true){ hiburi_on.setVisible(false); hiburi_off.setVisible(true); } if(yusu_on.getVisible() == true){ yusu_on.setVisible(false); yusu_off.setVisible(true); } if(shitaba_on.getVisible() == true){ shitaba_on.setVisible(false); shitaba_off.setVisible(true); } if(miura_on.getVisible() == true){ miura_on.setVisible(false); miura_off.setVisible(true); } if(kitanada_on.getVisible() == true){ kitanada_on.setVisible(false); kitanada_off.setVisible(true); } if(shimonada_on.getVisible() == true){ shimonada_on.setVisible(false); shimonada_off.setVisible(true); } if(nagamiyama_on.getVisible() == true){ nagamiyama_on.setVisible(false); nagamiyama_off.setVisible(true); } if(iekushi_on.getVisible() == true){ iekushi_on.setVisible(false); iekushi_off.setVisible(true); } if(kashiwazaki_on.getVisible() == true){ kashiwazaki_on.setVisible(false); kashiwazaki_off.setVisible(true); } if(misho_on.getVisible() == true){ misho_on.setVisible(false); misho_off.setVisible(true); } if(nishiura_on.getVisible() == true){ nishiura_on.setVisible(false); nishiura_off.setVisible(true); } if(funakoshi_on.getVisible() == true){ funakoshi_on.setVisible(false); funakoshi_off.setVisible(true); } if(fukuura_on.getVisible() == true){ fukuura_on.setVisible(false); fukuura_off.setVisible(true); } if(hisayoshi_on.getVisible() == true){ hisayoshi_on.setVisible(false); hisayoshi_off.setVisible(true); } if(fukaura_on.getVisible() == true){ fukaura_on.setVisible(false); fukaura_off.setVisible(true); } if(uchiumi_on.getVisible() == true){ uchiumi_on.setVisible(false); uchiumi_off.setVisible(true); } }); var allcheck_change = document.getElementById('allcheck'); allcheck_change.addEventListener('click', function() { if(misaki_on.getVisible() == false){ misaki_on.setVisible(true); misaki_off.setVisible(false); } if(yawatahama_on.getVisible() == false){ yawatahama_on.setVisible(true); yawatahama_off.setVisible(false); } if(akehama_on.getVisible() == false){ akehama_on.setVisible(true); akehama_off.setVisible(false); } if(yoshida_on.getVisible() == false){ yoshida_on.setVisible(true); yoshida_off.setVisible(false); } if(uwajima_on.getVisible() == false){ uwajima_on.setVisible(true); uwajima_off.setVisible(false); } if(hiburi_on.getVisible() == false){ hiburi_on.setVisible(true); hiburi_off.setVisible(false); } if(yusu_on.getVisible() == false){ yusu_on.setVisible(true); yusu_off.setVisible(false); } if(shitaba_on.getVisible() == false){ shitaba_on.setVisible(true); shitaba_off.setVisible(false); } if(miura_on.getVisible() == false){ miura_on.setVisible(true); miura_off.setVisible(false); } if(kitanada_on.getVisible() == false){ kitanada_on.setVisible(true); kitanada_off.setVisible(false); } if(shimonada_on.getVisible() == false){ shimonada_on.setVisible(true); shimonada_off.setVisible(false); } if(nagamiyama_on.getVisible() == false){ nagamiyama_on.setVisible(true); nagamiyama_off.setVisible(false); } if(iekushi_on.getVisible() == false){ iekushi_on.setVisible(true); iekushi_off.setVisible(false); } if(kashiwazaki_on.getVisible() == false){ kashiwazaki_on.setVisible(true); kashiwazaki_off.setVisible(false); } if(misho_on.getVisible() == false){ misho_on.setVisible(true); misho_off.setVisible(false); } if(nishiura_on.getVisible() == false){ nishiura_on.setVisible(true); nishiura_off.setVisible(false); } if(funakoshi_on.getVisible() == false){ funakoshi_on.setVisible(true); funakoshi_off.setVisible(false); } if(fukuura_on.getVisible() == false){ fukuura_on.setVisible(true); fukuura_off.setVisible(false); } if(hisayoshi_on.getVisible() == false){ hisayoshi_on.setVisible(true); hisayoshi_off.setVisible(false); } if(fukaura_on.getVisible() == false){ fukaura_on.setVisible(true); fukaura_off.setVisible(false); } if(uchiumi_on.getVisible() == false){ uchiumi_on.setVisible(true); uchiumi_off.setVisible(false); } }); //マップの図形をクリックしたときの処理 //チェックボックスを外すのと図形のオンオフ切り替え //このプログラムはたぶん冗長で,もっといい書き方があると思います… misaki_on.addListener( "click", function ( argument ) { //チェックボックスの数(エリア数)を増やしたら,それに対応して配列の数字も変えてください document.form.elements['Location[]'][0].checked = false; misaki_on.setVisible(false); misaki_off.setVisible(true); } ) ; misaki_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][0].checked = true; misaki_off.setVisible(false); misaki_on.setVisible(true); } ) ; yawatahama_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][1].checked = false; yawatahama_on.setVisible(false); yawatahama_off.setVisible(true); } ) ; yawatahama_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][1].checked = true; yawatahama_off.setVisible(false); yawatahama_on.setVisible(true); } ) ; akehama_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][2].checked = false; akehama_on.setVisible(false); akehama_off.setVisible(true); } ) ; akehama_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][2].checked = true; akehama_off.setVisible(false); akehama_on.setVisible(true); } ) ; yoshida_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][3].checked = false; yoshida_on.setVisible(false); yoshida_off.setVisible(true); } ) ; yoshida_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][3].checked = true; yoshida_off.setVisible(false); yoshida_on.setVisible(true); } ) ; uwajima_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][4].checked = false; uwajima_on.setVisible(false); uwajima_off.setVisible(true); } ) ; uwajima_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][4].checked = true; uwajima_off.setVisible(false); uwajima_on.setVisible(true); } ) ; hiburi_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][5].checked = false; hiburi_on.setVisible(false); hiburi_off.setVisible(true); } ) ; hiburi_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][5].checked = true; hiburi_off.setVisible(false); hiburi_on.setVisible(true); } ) ; yusu_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][6].checked = false; yusu_on.setVisible(false); yusu_off.setVisible(true); } ) ; yusu_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][6].checked = true; yusu_off.setVisible(false); yusu_on.setVisible(true); } ) ; shitaba_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][7].checked = false; shitaba_on.setVisible(false); shitaba_off.setVisible(true); } ) ; shitaba_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][7].checked = true; shitaba_off.setVisible(false); shitaba_on.setVisible(true); } ) ; miura_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][8].checked = false; miura_on.setVisible(false); miura_off.setVisible(true); } ) ; miura_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][8].checked = true; miura_off.setVisible(false); miura_on.setVisible(true); } ) ; kitanada_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][9].checked = false; kitanada_on.setVisible(false); kitanada_off.setVisible(true); } ) ; kitanada_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][9].checked = true; kitanada_off.setVisible(false); kitanada_on.setVisible(true); } ) ; shimonada_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][10].checked = false; shimonada_on.setVisible(false); shimonada_off.setVisible(true); } ) ; shimonada_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][10].checked = true; shimonada_off.setVisible(false); shimonada_on.setVisible(true); } ) ; nagamiyama_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][11].checked = false; nagamiyama_on.setVisible(false); nagamiyama_off.setVisible(true); } ) ; nagamiyama_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][11].checked = true; nagamiyama_off.setVisible(false); nagamiyama_on.setVisible(true); } ) ; iekushi_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][12].checked = false; iekushi_on.setVisible(false); iekushi_off.setVisible(true); } ) ; iekushi_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][12].checked = true; iekushi_off.setVisible(false); iekushi_on.setVisible(true); } ) ; kashiwazaki_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][13].checked = false; kashiwazaki_on.setVisible(false); kashiwazaki_off.setVisible(true); } ) ; kashiwazaki_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][13].checked = true; kashiwazaki_off.setVisible(false); kashiwazaki_on.setVisible(true); } ) ; misho_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][14].checked = false; misho_on.setVisible(false); misho_off.setVisible(true); } ) ; misho_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][14].checked = true; misho_off.setVisible(false); misho_on.setVisible(true); } ) ; nishiura_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][15].checked = false; nishiura_on.setVisible(false); nishiura_off.setVisible(true); } ) ; nishiura_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][15].checked = true; nishiura_off.setVisible(false); nishiura_on.setVisible(true); } ) ; funakoshi_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][16].checked = false; funakoshi_on.setVisible(false); funakoshi_off.setVisible(true); } ) ; funakoshi_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][16].checked = true; funakoshi_off.setVisible(false); funakoshi_on.setVisible(true); } ) ; fukuura_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][17].checked = false; fukuura_on.setVisible(false); fukuura_off.setVisible(true); } ) ; fukuura_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][17].checked = true; fukuura_off.setVisible(false); fukuura_on.setVisible(true); } ) ; hisayoshi_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][18].checked = false; hisayoshi_on.setVisible(false); hisayoshi_off.setVisible(true); } ) ; hisayoshi_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][18].checked = true; hisayoshi_off.setVisible(false); hisayoshi_on.setVisible(true); } ) ; fukaura_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][19].checked = false; fukaura_on.setVisible(false); fukaura_off.setVisible(true); } ) ; fukaura_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][19].checked = true; fukaura_off.setVisible(false); fukaura_on.setVisible(true); } ) ; uchiumi_on.addListener( "click", function ( argument ) { document.form.elements['Location[]'][20].checked = false; uchiumi_on.setVisible(false); uchiumi_off.setVisible(true); } ) ; uchiumi_off.addListener( "click", function ( argument ) { document.form.elements['Location[]'][20].checked = true; uchiumi_off.setVisible(false); uchiumi_on.setVisible(true); } ) ; }