VEMap.ShowMessage Method

You are not viewing the latest version of the AJAX control. Bing Maps AJAX V7 is the recommended JavaScript control for Bing Maps. If you need this documentation, it is available in as a CHM or PDF download.

Displays the specified message in a dialog box on the map.



Parameter Description


The message you want to display on the map

Caution The message box is an HTML element that can have JavaScript embedded in it. Verify the input value before executing it on your web page.

The message dialog box appears for 10 seconds, and then disappears automatically.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

      <script type="text/javascript" src=""></script>

      <script type="text/javascript">
         var map = null;
         function GetMap()
            map = new VEMap('myMap');
         function ClearMsg()
            document.getElementById('txtMsg').innerText = "";
         function ShowMessage()
   <body onload="GetMap();">
      <div id='myMap' style="position:relative; width:400px; height:400px;"></div>
      <textarea id="txtMsg" style="width:400px; height:75px" onactivate="ClearMsg()">Enter a message.</textarea><br />
      <input id="btnShowMsg" type="button" value="Show Message" onclick="ShowMessage()">