VEMap.HideTrafficLegend メソッド
交通情報の凡例を非表示にします。
構文
VEMap.HideTrafficLegend()
例
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1"></script>
<script type="text/javascript">
var map = null;
var Location = new VELatLong(47.64, -122.23);
function GetMap()
{
map = new VEMap('myMap');
map.LoadMap(Location, 9);
}
function ShowTraffic()
{
map.LoadTraffic(true);
map.ShowTrafficLegend(50,50);
map.SetTrafficLegendText("交通情報の凡例");
}
function ClearTraffic()
{
map.ClearTraffic();
}
</script>
</head>
<body onload="GetMap();" style="font-family:MS PGothic">
<h3>交通情報</h3>
<p> </p>
<div id='myMap' style="position:relative; width:600px; height:400px;"></div>
<input id="showtraffic" type="button" value="交通情報の表示" onclick="ShowTraffic();"/>
<input id="cleartraffic" type="button" value="交通情報の消去" onclick="ClearTraffic();"/>
</body>
</html>