News:

MyKidsDiary.in :: Capture your kids magical moment and create your Online Private Diary for your kids

Main Menu

Working with Shape Layers

Started by thiruvasagamani, Jan 23, 2009, 06:19 PM

Previous topic - Next topic

thiruvasagamani

Working with Shape Layers

One of the challenges in working with shapes on a map is that you often want to control and manage the shapes in a collection. In Virtual Earth, you can group shapes in shape layers. Each layer provides a mechanism for adding shapes, removing shapes and accessing the shapes stored within the layer. Each layer also provides controls for showing and hiding the entire layer. The best part is that the shape layer is a container for all kinds of shapes. You can group any combination of pushpins, polygons and polylines in the same layer and work with it as a single collection.
Getting Started

Before we start working with shape layers, let's start with a basic Virtual Earth map:
Copy Code

<html>
<head>
<script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>
<script>
  var map;

function OnPageLoad()
  {
    map = new VEMap('myMap');
    map.LoadMap();
  }
</script>
<body onload="OnPageLoad();">
  <div id="myMap" style="position:relative;width:600px;height:400px;"></div>
</body>
</html>


Source : MSDN
Thiruvasakamani Karnan