CodeAve.com CodeAve.com - Maps - Bing Maps
ASP
JavaScript
CSS
HTML
Maps
·Map Script Writers
·Bing Maps
·Google Maps
·Contents
Links
Mail List
Search
Sitemap


 


Bing Map Simple Polygon
Polygons are a useful way to highlight portions of a map. By specifying a series of coordinates the polygon will form a closed loop and define a filled region within your map. In this example the coordinates of the four corners of the state of Colorado are represented. The area in-between is filled in based on parameters as well as the color of the border area.
View the Output
Text View
Print View
Mail this Link

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Map of Colorado</title>
<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>
<script type="text/javascript">
var map = null;
function GetMap()
{
map = new VEMap('myMap');
map.SetDashboardSize(VEDashboardSize.Normal);
map.LoadMap(new VELatLong(39.554883,-105.776367),6,'r',false,VEMapMode.Mode2D);
map.SetScaleBarDistanceUnit(VEDistanceUnit.Miles);
map.ShowMiniMap(0,390);
var Colorado_layer = new VEShapeLayer();
var Colorado_coordinates = new VEShape(VEShapeType.Polygon,
[
new VELatLong(40.963308,-109.050293),
new VELatLong(36.993778,-109.039307),
new VELatLong(37.002553,-102.052002),
new VELatLong(40.996484,-102.073975)
]);
Colorado_coordinates.HideIcon();
// hides the default icon for the polygon
Colorado_coordinates.SetLineColor(new VEColor(0,0,0,1));
// sets the linecolor for the border of the polygon
Colorado_coordinates.SetLineWidth(2);
// sets the width of the border for the polygon
Colorado_coordinates.SetFillColor(new VEColor(255,0,0,.2));
// sets the fill color and the transparency of the fill color
Colorado_layer.AddShape(Colorado_coordinates);
map.AddShapeLayer(Colorado_layer);
// add the polygon shape layer to the map
}
</script>
</head>
<body bgcolor=#FFFFFF onload="GetMap();">
<table align=center border=0>
<tr>
<td>
<div id="myMap" style="position:relative; width:800px; height:600px;"></div>
</td>
</tr>
</table>
</body>
</html>

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved