<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Keith Kinnan's Blog : VEShape</title><link>http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx</link><description>Tags: VEShape</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Clustering Pushpins with the Virtual Earth Map Control API</title><link>http://blogs.msdn.com/keithkin/archive/2008/10/12/clustering-pushpins-with-the-virtual-earth-map-control-api.aspx</link><pubDate>Sun, 12 Oct 2008 19:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8996680</guid><dc:creator>keithkin</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/keithkin/comments/8996680.aspx</comments><wfw:commentRss>http://blogs.msdn.com/keithkin/commentrss.aspx?PostID=8996680</wfw:commentRss><description>&lt;P&gt;One of the new features introduced in the Virtual Earth Map Control API is Pushpin Clustering.&amp;nbsp; When there are hundreds of pushpin shapes on the map in a dense area, the map can become very cluttered. The pushpins can overlap each other and obscure the map view and make the map difficult to use.&amp;nbsp; Previously, to solve this problem, developers using the Virtual Earth map control would have to either divide groups of pushpins into VEShapeLayers and manually control which layers to show and hide at different zoom levels, or just not show Pushpins at zoom levels if there were too many on the screen.&amp;nbsp; With the v6.2 Virtual Earth Map Control API, this situation has gotten a lot easier to manage with the addition of the pushpin clustering feature.&lt;/P&gt;
&lt;P&gt;In the v6.2 Virtual Earth Map Control API, we introduced two new methods on the VEShapeLayer to support pushpin clustering.&amp;nbsp; In a &lt;A href="http://blogs.msdn.com/keithkin/archive/2007/04/28/virtual-earth-api-simple-veshapelayer-example.aspx" mce_href="http://blogs.msdn.com/keithkin/archive/2007/04/28/virtual-earth-api-simple-veshapelayer-example.aspx"&gt;previous blog post&lt;/A&gt; awhile back, I talked about the VEShapeLayer class which is designed to group a set of VEShapes so they can be managed as a collective group.&amp;nbsp; The two new methods for pushpin clustering are &lt;STRONG&gt;VEShapeLayer.SetClusteringConfiguration &lt;/STRONG&gt;and &lt;STRONG&gt;VEShapeLayer.GetClusteredShapes.&amp;nbsp; &lt;/STRONG&gt;The v6.2 Virtual Earth Map Control API is reverse compatible with the previous v6.1 and v6 APIs and does not cluster pushpins by default.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The SetClusteringConfiguration &lt;/STRONG&gt;method allows you to specify how you want to cluster shapes in a shape layer.&amp;nbsp; The first parameter is either a &lt;STRONG&gt;VEClusteringType &lt;/STRONG&gt;enumeration specifying a known clustering algorithm supported by Virtual Earth, or it can be a reference to a custom function which does the clustering.&amp;nbsp; Currently &lt;STRONG&gt;VEClusteringType &lt;/STRONG&gt;can either be &lt;STRONG&gt;VEClusteringType.Grid &lt;/STRONG&gt;to specify a grid-based clustering algorithm or &lt;STRONG&gt;VEClusteringType.None &lt;/STRONG&gt;which turns off clustering.&amp;nbsp; By default clustering is off if you do not call SetClusteringConfiguration on a VEShapeLayer.&lt;/P&gt;
&lt;P&gt;So, you can turn on grid clustering with a single call to SetClusteringConfiguration.&amp;nbsp; Assuming you have a VEShapeLayer reference called shapeLayer, here's the syntax:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;shapeLayer.SetClusteringConfiguration(VEClusteringType.Grid);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The built-in grid based clustering algorithm divides the screen into equal-sized squares.&amp;nbsp; If there are more than one VEShape pushpins in a square, they are combined into a cluster.&amp;nbsp; So, at the highest altitude, you will see more clusters and at the lowest altitude (highest level of detail) you will see less clusters, but more individual shapes.&amp;nbsp; So, as you zoom in on clusters to highest level of detail, they will eventually break up and show individual shapes.&amp;nbsp; So, with one line of code, this simple algorithm now reduces clutter on the map significantly and divides shapes up into manageable chunks.&amp;nbsp; By default, pushpin clusters will have a special cluster pushpin icon just like VEShape pushpins have their own default pin icon also.&amp;nbsp; Each cluster will also have a default popup balloon with information about the cluster.&amp;nbsp; The default popup shows the number of shapes in the cluster.&amp;nbsp; In a future blog post, I will show you how to override some of these default settings to provide more advanced customization to pushpin clustering.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Figure 1 &lt;/STRONG&gt;below shows a set of pushpins that are not clustered.&amp;nbsp; &lt;STRONG&gt;Figure 2 &lt;/STRONG&gt;shows the same set of pushpins clusterd with Grid clustering:&amp;nbsp; &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=2 width=800 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=487&gt;&lt;IMG height=346 src="http://krkinnan.members.winisp.net/i/unclusteredpushpins01.jpg" width=387 mce_src="http://krkinnan.members.winisp.net/i/unclusteredpushpins01.jpg"&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=362&gt;&lt;IMG src="http://krkinnan.members.winisp.net/i/clusteredpushpins01.jpg" mce_src="http://krkinnan.members.winisp.net/i/clusteredpushpins01.jpg"&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=487&gt;&lt;STRONG&gt;Figure 1. Unclustered Pushpins&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=362&gt;&lt;STRONG&gt;Figure 2. Clustered Pushpins&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you want to turn off pushpin clustering after you have turned it on, you just have to make the following call:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;shapeLayer.SetClusteringConfiguration(VEClusteringType.None);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you want to know what shapes are in each pushpin cluster, you can do so with the &lt;STRONG&gt;GetClusteredShapes &lt;/STRONG&gt;method on the VEShapeLayer which also takes in a VEClusteringType parameter.&amp;nbsp; For example:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;var shapeClusters = shapeLayer.GetClusteredShapes(VEClusteringType.Grid);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This call returns an array of &lt;STRONG&gt;VEClusterSpecification &lt;/STRONG&gt;objects representing the set of shape clusters with the passed in clustering type.&amp;nbsp; Each &lt;STRONG&gt;VEClusterSpecification &lt;/STRONG&gt;object in the array represents a cluster.&amp;nbsp; The &lt;STRONG&gt;Shapes &lt;/STRONG&gt;property on the object specifies the pushpins in the cluster.&amp;nbsp; The &lt;STRONG&gt;LatLong &lt;/STRONG&gt;property is a &lt;STRONG&gt;VELatLong &lt;/STRONG&gt;and specifies the Latitude, Longitude location of the center of the cluster where the cluster icon is positioned.&amp;nbsp; This provides all the information you have for a cluster, so no information is lost when pushpins are clustered. Also, this method works even when clustering is off. So, if you want to have a complete custom rendering for a cluster, or just know what shapes would be clustered if you turned clustering on, you can use this method.&lt;/P&gt;
&lt;P&gt;Click on the link below to see a sample of pushpin clustering with Virtual Earth.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v6.2/VirtualEarthMapControlAPIClustering01.html" mce_href="http://krkinnan.members.winisp.net/samples/v6.2/VirtualEarthMapControlAPIClustering01.html"&gt;Virtual Earth Map Control API Clustering Sample&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;(Note: I have also published this post on the &lt;A class="" href="http://blogs.msdn.com/veplatform/archive/2008/10/12/clustering-pushpins-with-the-virtual-earth-map-control-api.aspx" mce_href="http://blogs.msdn.com/veplatform/archive/2008/10/12/clustering-pushpins-with-the-virtual-earth-map-control-api.aspx"&gt;VE Platform Team Blog&lt;/A&gt;)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8996680" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth/default.aspx">Virtual Earth</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+API/default.aspx">Virtual Earth API</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx">VEShape</category></item><item><title>Microsoft Research Releases Tiled Vectors Demo</title><link>http://blogs.msdn.com/keithkin/archive/2008/01/18/microsoft-research-releases-tiled-vectors-demo.aspx</link><pubDate>Sat, 19 Jan 2008 01:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7153938</guid><dc:creator>keithkin</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/keithkin/comments/7153938.aspx</comments><wfw:commentRss>http://blogs.msdn.com/keithkin/commentrss.aspx?PostID=7153938</wfw:commentRss><description>&lt;P&gt;Microsoft Research released a &lt;A href="http://research.microsoft.com/MapCruncher/TiledVectors/TiledVectorsDemo-1.1/" mce_href="http://research.microsoft.com/MapCruncher/TiledVectors/TiledVectorsDemo-1.1/"&gt;Tiled Vectors Demo&lt;/A&gt; which is available for &lt;A href="http://research.microsoft.com/research/downloads/details/5f3c6272-fc9d-48f8-9e3f-982b9ca4e882/details.aspx" mce_href="http://research.microsoft.com/research/downloads/details/5f3c6272-fc9d-48f8-9e3f-982b9ca4e882/details.aspx"&gt;download&lt;/A&gt;.&amp;nbsp; The demo shows a way to solve the problem of showing extremely large mapping data sets in the web browser.&amp;nbsp; If you have used the Virtual Earth AJAX/JavaScript Map Control or other web-based mapping controls or any web application with a large number of DOM elements/SVG/VML graphics, then you probably have seen that loading extremely large data sets (with thousands of points, lines, and polygons) can bring the browser to a crawl because of limitations in the browser DOM.&lt;/P&gt;
&lt;P&gt;The Tiled Vectors Demo from MSR attempts to solve this problem by breaking up the shapepoints into constant-sized sets, similar to how &lt;A href="http://dev.live.com/virtualearth/mapcruncher/" mce_href="http://dev.live.com/virtualearth/mapcruncher/"&gt;MapCruncher&lt;/A&gt; breaks up images into image tiles.&amp;nbsp; Since the data is broken into constant-sized sets, the original data set can be arbitrarily large -- so the solution scales really well to extremely large data sets.&amp;nbsp; Regardless of which level of detail you are viewing the map from, the amount of data the map loads is always constant.&amp;nbsp; This significantly improves performance.&amp;nbsp; The vector data is still loaded using Virtual Earth &lt;A href="http://blogs.msdn.com/keithkin/archive/2007/04/28/virtual-earth-api-simple-veshapelayer-example.aspx" mce_href="http://blogs.msdn.com/keithkin/archive/2007/04/28/virtual-earth-api-simple-veshapelayer-example.aspx"&gt;VEShapeLayers&lt;/A&gt; in JavaScript -- so the shapes are still interactive and can be controlled from client code and respond to events.&lt;/P&gt;
&lt;P&gt;You can see a demo page here:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://research.microsoft.com/MapCruncher/TiledVectors/TiledVectorsDemo-1.1/" mce_href="http://research.microsoft.com/MapCruncher/TiledVectors/TiledVectorsDemo-1.1/"&gt;Tiled Vectors Demo&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://research.microsoft.com/MapCruncher/TiledVectors/TiledVectorsDemo-1.1/" mce_href="http://research.microsoft.com/MapCruncher/TiledVectors/TiledVectorsDemo-1.1/"&gt;&lt;IMG style="WIDTH: 692px; HEIGHT: 432px" height=432 src="http://krkinnan.members.winisp.net/i/tv01.jpg" width=692 border=0 mce_src="http://krkinnan.members.winisp.net/i/tv01.jpg"&gt; &lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For more detailed information regarding the Tiled Vectors approach and how you can apply it to your data sets, see:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://research.microsoft.com/MapCruncher/TiledVectors/TiledVectorsDemo-1.1/description.html" mce_href="http://research.microsoft.com/MapCruncher/TiledVectors/TiledVectorsDemo-1.1/description.html"&gt;Tiled Vectors Demo Information&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7153938" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth/default.aspx">Virtual Earth</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+API/default.aspx">Virtual Earth API</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx">VEShape</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/MapCruncher/default.aspx">MapCruncher</category></item><item><title>Virtual Earth API: Implementing Drag and Drop in Virtual Earth</title><link>http://blogs.msdn.com/keithkin/archive/2008/01/10/virtual-earth-api-implementing-drag-and-drop-in-virtual-earth.aspx</link><pubDate>Fri, 11 Jan 2008 00:15:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7062579</guid><dc:creator>keithkin</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/keithkin/comments/7062579.aspx</comments><wfw:commentRss>http://blogs.msdn.com/keithkin/commentrss.aspx?PostID=7062579</wfw:commentRss><description>&lt;p&gt;Steve Lombardi posted some nice samples recently on the &lt;a href="http://virtualearth.spaces.live.com/blog/cns!2BBC66E99FDCDB98!10254.entry"&gt;Virtual Earth Spaces blog&lt;/a&gt; showing how to implement drag and drop on shapes using the Virtual Earth map control API.&amp;nbsp; You just need to add a custom event handler for the "onmousedown", "onmousemove", and "onmouseup" events.&lt;/p&gt; &lt;p&gt;Here's the links to the working samples:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a href="http://www.veteam.members.winisp.net/dragndrop/simpledrag.html"&gt;Simple Drag and Drop Sample&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.veteam.members.winisp.net/dragndrop/Collectiondrag.html"&gt;Collections Drag and Drop Sample&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7062579" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth/default.aspx">Virtual Earth</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+API/default.aspx">Virtual Earth API</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx">VEShape</category></item><item><title>Virtual Earth API: Bulk Adding Pushpins to a Layer to Improve Performance</title><link>http://blogs.msdn.com/keithkin/archive/2007/11/20/virtual-earth-api-bulk-adding-pushpins-to-a-layer-to-improve-performance.aspx</link><pubDate>Tue, 20 Nov 2007 18:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6435876</guid><dc:creator>keithkin</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/keithkin/comments/6435876.aspx</comments><wfw:commentRss>http://blogs.msdn.com/keithkin/commentrss.aspx?PostID=6435876</wfw:commentRss><description>&lt;P&gt;One of the new features from the Virtual Earth v6 Map Control API is the ability to bulk add groups of pushpins to the map in one step.&amp;nbsp; This improves performance when putting a large number of pushpins on the map since the HTML markup of the pushpins is serialized and inserted in the map in one operation.&lt;/P&gt;
&lt;P&gt;Bulk adding pushpins to the map consists of 3 steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create an array of pushpins 
&lt;LI&gt;Create an empty shape layer and add it to the map 
&lt;LI&gt;Add the array of pushpins to the shape layer&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;1. Create an array with a large number of pushpins:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;var center = map.GetCenter(); 
&lt;P&gt;var shapes = new Array();&lt;BR&gt;for (i=0 ; i &amp;lt; 150; ++i)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var shape = new VEShape(VEShapeType.Pushpin, new VELatLong(center.Latitude + Math.random()*20 - 10, center.Longitude + Math.random()*20 - 10));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shapes.push(shape); &lt;BR&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;2. Create an empty shape layer and add it to the map:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;var shapeLayer = new VEShapeLayer();&lt;BR&gt;map.AddShapeLayer(shapeLayer);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;3. Add the array of pushpins to the shape layer:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;shapeLayer.AddShape(shapes);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here's a link to a working sample which adds pushpins to the map using the new bulk add approach.&amp;nbsp; It has a checkbox which allows you to turn off the bulk add and add the pushpins in the normal manner so you can compare the performance improvement between bulk add and the traditional approach.&amp;nbsp; The time to execute a bulk add operation tends to be about 1/2 the time of the traditional approach.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v6/bulkshape/ve6bulkshape01.html" mce_href="http://krkinnan.members.winisp.net/samples/v6/bulkshape/ve6bulkshape01.html"&gt;Virtual Earth API Bulk Add Pushpin Sample&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v6/bulkshape/ve6bulkshape01.html"&gt;&lt;IMG style="WIDTH: 420px; HEIGHT: 280px" height=280 src="http://krkinnan.members.winisp.net/samples/v6/bulkshape/ve6bulkshape01.jpg" width=420 border=0 mce_src="http://krkinnan.members.winisp.net/samples/v6/bulkshape/ve6bulkshape01.jpg"&gt; &lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6435876" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth/default.aspx">Virtual Earth</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+API/default.aspx">Virtual Earth API</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx">VEShape</category></item><item><title>Virtual Earth API: Setting Altitude of Shapes</title><link>http://blogs.msdn.com/keithkin/archive/2007/11/14/virtual-earth-api-setting-altitude-of-shapes.aspx</link><pubDate>Wed, 14 Nov 2007 23:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6223560</guid><dc:creator>keithkin</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/keithkin/comments/6223560.aspx</comments><wfw:commentRss>http://blogs.msdn.com/keithkin/commentrss.aspx?PostID=6223560</wfw:commentRss><description>&lt;P&gt;The Virtual Earth v6 map control API added support for setting altitude of VEShapes in Virtual Earth 3D.&amp;nbsp; There is a new &lt;STRONG&gt;SetAltitude&lt;/STRONG&gt; method on VEShape which takes in 2 parameters:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;VEShape.SetAltitude(altitude, altitudeMode);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The &lt;EM&gt;altitude&lt;/EM&gt; parameter is the altitude specified in meters.&amp;nbsp; The &lt;EM&gt;altitudeMode parameter &lt;/EM&gt;is an optional VEAltitudeMode enumeration specifying the mode of the altitude.&amp;nbsp; If not specified, by default it is &lt;STRONG&gt;VEAltitudeMode.RelativeToGround&lt;/STRONG&gt; which is meters above ground level.&amp;nbsp; You can also specify &lt;STRONG&gt;VEAltitudeMode.Absolute &lt;/STRONG&gt;which is meters above the &lt;A href="http://en.wikipedia.org/wiki/WGS84" mce_href="http://en.wikipedia.org/wiki/WGS84"&gt;WGS84 ellipsoid&lt;/A&gt;.&amp;nbsp; When the VEShape is a pushpin, the altitude is a single floating point value.&amp;nbsp; When the VEShape is a polyline or polygon, it is an array of floating point values specifying the altitude for each point in the shape.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;There is also a new &lt;STRONG&gt;SetLineToGround &lt;/STRONG&gt;method on the VEShape for polylines and polygon shapes which takes in a boolean to specify whether or not connect the points in the shape to the ground.&amp;nbsp; By default it is false.&lt;/P&gt;
&lt;P&gt;The following sample shows some custom VEShapes at different altitudes.&amp;nbsp; It also demonstrates a polygon with points at different altitudes and the line to ground functionality:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html" mce_href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html"&gt;Virtual Earth API Shape Altitude Sample&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html"&gt;&lt;IMG height=339 src="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude02.jpg" width=394 border=0&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html"&gt;&lt;IMG height=300 src="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.jpg" width=400 border=0&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6223560" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth/default.aspx">Virtual Earth</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+API/default.aspx">Virtual Earth API</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+3D/default.aspx">Virtual Earth 3D</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx">VEShape</category></item><item><title>Virtual Earth API: Accurately Position Points in Birdseye</title><link>http://blogs.msdn.com/keithkin/archive/2007/11/05/virtual-earth-api-accurately-position-points-in-birdseye.aspx</link><pubDate>Tue, 06 Nov 2007 02:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5922610</guid><dc:creator>keithkin</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/keithkin/comments/5922610.aspx</comments><wfw:commentRss>http://blogs.msdn.com/keithkin/commentrss.aspx?PostID=5922610</wfw:commentRss><description>&lt;P&gt;In the Virtual Earth v6 API, one of the new features is improved Birdseye accuracy.&amp;nbsp; The Virtual Earth v6 API has some new methods to more accurately position pushpins when in Birdseye view.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Satellite (Aerial/Hybrid) and Road imagery views are direct overhead views, so calculations to position a pushpin at an exact latitude and longitude are not as complex as in Birdseye.&amp;nbsp; The camera is directly overhead the point and the elevation of that point on the Earth does not need to be taken into account in 2D.&amp;nbsp; However, with Birdseye imagery taken from different angles, there are a lot more variables to consider when calculating where to position a point including the camera position and the elevation of the Earth in that scene.&lt;/P&gt;
&lt;P&gt;In order to do this calculation efficiently in Birdseye, a service request is made from the client to the server to get more accurate positions.&amp;nbsp; For some applications, the client-side, less-accurate, faster calculation may be enough to position points.&amp;nbsp; Because of this, enhanced birdseye accuracy for pushpins is off by default in the Virtual Earth API.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;To turn on enhanced Birdseye Accuracy for pushpins in the Virtual Earth API, you can make the following call (assuming you have a VEMap instance called "map"):&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;map.SetShapesAccuracy(VEShapeAccuracy.Pushpin);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To turn off enhanced Birdseye Accuracy for pushpins, you can make the following call:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;map.SetShapesAccuracy(VEShapeAccuracy.None);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here is&amp;nbsp;a link to sample Virtual Earth application showing 3 points on Lombard Street in San Francisco with a checkbox which turns Birdseye Accuracy on and off:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v6/birdseye/ve6beaccuracy01.html" mce_href="http://krkinnan.members.winisp.net/samples/v6/birdseye/ve6beaccuracy01.html"&gt;Virtual Earth Birdseye Accuracy Sample&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Notice in Aerial view, the 3 yellow dots are positioned at precise points along Lombard Street:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v6/birdseye/ve6beaccuracy01.html"&gt;&lt;IMG style="WIDTH: 799px; HEIGHT: 247px" height=247 src="http://krkinnan.members.winisp.net/samples/v6/birdseye/VirtualEarthLombardStreetAerial01.JPG" width=799 border=0 mce_src="http://krkinnan.members.winisp.net/samples/v6/birdseye/VirtualEarthLombardStreetAerial01.JPG"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;If you click on "Bird's eye" on the navigation panel and click on different orientations ("N", "W", "E", "S") on the compass in the navigation panel, you will notice the 3 yellow dots are still positioned rather accurately in Birdseye. &lt;/P&gt;
&lt;P&gt;Here's a screenshot of the Birdseye scene looking toward the West with enhanced accuracy enabled:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v6/birdseye/ve6beaccuracy01.html"&gt;&lt;IMG style="WIDTH: 414px; HEIGHT: 598px" height=598 src="http://krkinnan.members.winisp.net/samples/v6/birdseye/VirtualEarthLombardStreetBirdseye01.jpg" width=414 border=0 mce_src="http://krkinnan.members.winisp.net/samples/v6/birdseye/VirtualEarthLombardStreetBirdseye01.jpg"&gt;&lt;/A&gt; &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5922610" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth/default.aspx">Virtual Earth</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+API/default.aspx">Virtual Earth API</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx">VEShape</category></item><item><title>Virtual Earth API: Creating Numbered Pushpins</title><link>http://blogs.msdn.com/keithkin/archive/2007/05/16/virtual-earth-api-creating-numbered-pushpins.aspx</link><pubDate>Wed, 16 May 2007 21:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2677648</guid><dc:creator>keithkin</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/keithkin/comments/2677648.aspx</comments><wfw:commentRss>http://blogs.msdn.com/keithkin/commentrss.aspx?PostID=2677648</wfw:commentRss><description>&lt;P&gt;Many people have asked how to create numbered pushpins using the Virtual Earth API.&amp;nbsp; One way to do this is to have custom pin images with numbers in the image.&amp;nbsp; However, you can also do this in the v5 API using VEShape and custom HTML and CSS styles for the shape icon.&amp;nbsp; The following example shows one way&amp;nbsp;to do this.&lt;/P&gt;
&lt;P&gt;You fist need to create custom CSS styles for a pin setting a background image, position, and font styles. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;.pinStyle1{ position:relative; background:url('pin1.gif') no-repeat 0 0; height:30px; width:25px; top:-15px; color:#fff; text-align:center; font: bold 12px Arial; cursor: pointer;}&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;.pinStyle1 .text{ position: relative; top: 2px; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then, to add the numbered pin to the map, you can create a VEShape and use the SetCustomIcon method to set the pin icon to custom HTML/CSS.&amp;nbsp;&amp;nbsp; In this example, the pin icon consists of two styled DIVs using the styles above and the text "1".&amp;nbsp; The outer DIV is used to style the pushpin image and the inner DIV is used to style the pushpin text.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;var shape = new VEShape(VEShapeType.Pushpin,new VELatLong(37.776, -122.426)); &lt;BR&gt;shape.SetCustomIcon("&amp;lt;div class='pinStyle1'&amp;gt;&amp;lt;div class='text'&amp;gt;1&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;"); &lt;BR&gt;shape.SetTitle('Shape 1');&lt;BR&gt;shape.SetDescription('This is Shape 1');&lt;BR&gt;map.AddShape(shape);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This adds a numbered pin to the map using "pin1.gif" and the number "1".&amp;nbsp; In this example, the pin image "pin1.gif" is 30 pixels x 25 pixels.&amp;nbsp; By default pushpin icons are centered.&amp;nbsp; However, "pin1.gif" is a pushpin which has a pointer on the bottom. So to get the bottom of the pin to point to the location,&amp;nbsp;I set the top position to the negative of half of the image height (-15 pixels) to move the pin up and position it properly. Also, I set the text to be position 2 pixels from the top of the pin to position the text properly.&lt;/P&gt;
&lt;P&gt;Using the above technique, you can now create numbered, lettered, or any kind of custom pushpin with custom text.&lt;/P&gt;
&lt;P&gt;Here's a link to the complete example with several different examples of numbered and letter pushpins:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v5/veshapes/venumberedpinsample.html" mce_href="http://krkinnan.members.winisp.net/samples/v5/veshapes/venumberedpinsample.html"&gt;Virtual Earth API Numbered Pushpin Example&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v5/veshapes/venumberedpinsample.html" mce_href="http://krkinnan.members.winisp.net/samples/v5/veshapes/venumberedpinsample.html"&gt;&lt;IMG src="http://krkinnan.members.winisp.net/samples/v5/veshapes/venumberedpushpin01.jpg" border=0&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2677648" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth/default.aspx">Virtual Earth</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+API/default.aspx">Virtual Earth API</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx">VEShape</category></item><item><title>Virtual Earth API: Importing Virtual Earth Collections into VEShapeLayers</title><link>http://blogs.msdn.com/keithkin/archive/2007/04/28/virtual-earth-api-importing-virtual-earth-collections-into-veshapelayers.aspx</link><pubDate>Sat, 28 Apr 2007 12:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2310355</guid><dc:creator>keithkin</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/keithkin/comments/2310355.aspx</comments><wfw:commentRss>http://blogs.msdn.com/keithkin/commentrss.aspx?PostID=2310355</wfw:commentRss><description>&lt;P&gt;The same way you can &lt;A class="" href="http://blogs.msdn.com/keithkin/archive/2007/04/28/virtual-earth-api-georss-layers.aspx" mce_href="http://blogs.msdn.com/keithkin/archive/2007/04/28/virtual-earth-api-georss-layers.aspx"&gt;import GeoRSS Layers into VEShapeLayers&lt;/A&gt;, you can also import any public Virtual Earth Collection from &lt;A href="http://maps.live.com/" mce_href="http://maps.live.com"&gt;Live Search Maps&lt;/A&gt;.&amp;nbsp; It is very simple to do and is probably one of the easiest ways to create a Virtual Earth application.&lt;/P&gt;
&lt;P&gt;Steve Lombardi posted a great post awhile back on the &lt;A href="http://virtualearth.spaces.live.com/" mce_href="http://virtualearth.spaces.live.com/"&gt;Virtual Earth Spaces Blog&lt;/A&gt; regarding the &lt;A href="http://virtualearth.spaces.live.com/blog/cns!2BBC66E99FDCDB98!8240.entry" mce_href="http://virtualearth.spaces.live.com/blog/cns!2BBC66E99FDCDB98!8240.entry"&gt;10 Minute Map&lt;/A&gt; with steps how to create a user collection in &lt;A href="http://maps.live.com/" mce_href="http://maps.live.com"&gt;Live Search Maps&lt;/A&gt; and then load it in the Virtual Earth API.&amp;nbsp; Now, with the v5 Virtual Earth API you can still do this very easily, and now even provide more customization using VEShape and VEShapeLayer if you choose to do so.&lt;/P&gt;
&lt;P&gt;To import a Virtual Earth Collection, you first need to create a VEShapeLayer and a VEShapeSourceSpecification.&amp;nbsp; The VEShapeSourceSpecification allows you to specify the shape source type, the shape source, and the shape layer to load the data in.&amp;nbsp; For a collection, you need to specify the source type as VEDataType.VECollection, specify the source as the Collection ID from Live Search Maps, and pass in a reference to the VEShapeLayer.&amp;nbsp; Then you can call ImportShapeLayerData on the map with this specification, and you are done!&lt;/P&gt;
&lt;P&gt;Here's the example code using a collection with information about the Lewis &amp;amp; Clark Expedition (for your collection, replace the collection ID with the ID of your collection):&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;var shapeLayer = new VEShapeLayer();&lt;BR&gt;var shapeSpec = new VEShapeSourceSpecification(VEDataType.VECollection,"B41BBC2FFB8342CD!107", shapeLayer);&lt;BR&gt;map.ImportShapeLayerData(shapeSpec);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To customize things further, you can pass in an optional&amp;nbsp;callback to the ImportShapeLayerData call and customize the VEShapes.&lt;/P&gt;
&lt;P&gt;Here's some sample code that changes the icon of the VEShapes when displaying the collection.&amp;nbsp; Notice to iterate through the VEShapes in the collection, we do exactly what we did when importing GeoRSS layers.&amp;nbsp; We can get iterate through the shapes and modify any of the VEShape properties that we want to customize.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;function onFeedLoad(layer)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var numShapes = layer.GetShapeCount();&lt;BR&gt;&amp;nbsp;&amp;nbsp; for(var i=0; i &amp;lt; numShapes; ++i)&lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var s = layer.GetShapeByIndex(i);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.SetCustomIcon("&amp;lt;img src='hiking_icon.gif'/&amp;gt;");&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;var shapeLayer = new VEShapeLayer();&lt;BR&gt;var shapeSpec = new VEShapeSourceSpecification(VEDataType.VECollection,"B41BBC2FFB8342CD!107", shapeLayer);&lt;BR&gt;map.ImportShapeLayerData(shapeSpec, onFeedLoad);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here's a link to the complete example:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v5/vecollections/vecollectionssample1.html" mce_href="http://krkinnan.members.winisp.net/samples/v5/vecollections/vecollectionssample1.html"&gt;Virtual Earth API Collections Example&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v5/vecollections/vecollectionssample1.html" mce_href="http://krkinnan.members.winisp.net/samples/v5/vecollections/vecollectionssample1.html"&gt;&lt;IMG src="http://krkinnan.members.winisp.net/samples/v5/vecollections/vecollections01.jpg" border=0&gt; &lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;For more information, see the &lt;A href="http://dev.live.com/virtualearth/sdk/" mce_href="http://dev.live.com/virtualearth/sdk/"&gt;Virtual Earth Interactive SDK&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2310355" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth/default.aspx">Virtual Earth</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+API/default.aspx">Virtual Earth API</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx">VEShape</category></item><item><title>Virtual Earth API: GeoRSS Layers</title><link>http://blogs.msdn.com/keithkin/archive/2007/04/28/virtual-earth-api-georss-layers.aspx</link><pubDate>Sat, 28 Apr 2007 10:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2309650</guid><dc:creator>keithkin</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/keithkin/comments/2309650.aspx</comments><wfw:commentRss>http://blogs.msdn.com/keithkin/commentrss.aspx?PostID=2309650</wfw:commentRss><description>&lt;P&gt;The v5 Virtual Earth API has improved &lt;A href="http://www.georss.org/" mce_href="http://www.georss.org/"&gt;GeoRSS&lt;/A&gt; support.&amp;nbsp; The Virtual Earth API now integrates GeoRSS Layer support with the VEShapeLayer.&amp;nbsp; So, you can now load a GeoRSS layer feed and then access the items in that layer through the VEShapeLayer and VEShape interfaces.&amp;nbsp; The Virtual Earth API supports both the &lt;A href="http://www.georss.org/w3c.html" mce_href="http://www.georss.org/w3c.html"&gt;W3C Basic Geo&lt;/A&gt;&amp;nbsp;point format and &lt;A href="http://www.georss.org/simple.html" mce_href="http://www.georss.org/simple.html"&gt;Simple GeoRSS &lt;/A&gt;point format.&amp;nbsp; The Virtual Earth v5 API also now supports GeoRSS lines and polygons (&amp;lt;georss:line&amp;gt;, &amp;lt;georss:polygon&amp;gt;).&lt;/P&gt;
&lt;P&gt;In order to load a GeoRSS layer, you first have to create a VEShapeLayer and a VEShapeSourceSpecification.&amp;nbsp; The VEShapeSourceSpecification allows you to specify the source type, the shape source, and the shape layer to load the data in.&amp;nbsp; In this example, I set the source type to VEDataType.GeoRSS, specify the URL to the GeoRSS feed as the source, and pass in a reference to the VEShapeLayer:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;var geoRssLayer1 = new VEShapeLayer();&lt;BR&gt;var geoRssLayerSpec1 = new VEShapeSourceSpecification(VEDataType.GeoRSS, "1992hurricaneandrew.xml", geoRssLayer1);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Once the VEShapeLayer&amp;nbsp;and VEShapeSourceSpecification are created, you can then call ImportShapeLayerData on the VEMap to load the data in the layer.&amp;nbsp; The first parameter is the VEShapeSourceSpecification.&amp;nbsp;&amp;nbsp;The second parameter is an optional callback, and the third parameter is a boolean specifying whether or not to set the map view around the points in the layer when the feed loads.&amp;nbsp; In this case, I do not want to change the map view when the feed loads, so I set it to false.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;map.ImportShapeLayerData(geoRssLayerSpec1, onFeed1Load, false);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The callback specified to the ImportShapeLayerData will receive a reference to the VEShapeLayer that the feed is loaded in.&amp;nbsp; In this example, I iterate through the VEShapes in the layer by using the GetShapeCount and the GetShapeByIndex methods on the VEShapeLayer, and then I set a custom icon for each of the VEShapes.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;function onFeed1Load(layer)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var numShapes = layer.GetShapeCount();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(var i=0; i &amp;lt; numShapes; ++i)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var s = layer.GetShapeByIndex(i);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.SetCustomIcon("http://krkinnan.members.winisp.net/samples/v5/georss/hurricane01.gif");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And that's it! The GeoRSS feed will appear on the map after a few simple calls.&amp;nbsp; And, once the feed loads, you can access the elements just like any other VEShape on the map.&lt;/P&gt;
&lt;P&gt;Here is a link to a complete working example showing GeoRSS layers using two feeds.&amp;nbsp; One feed in a W3C Basic Geo format with &lt;A href="http://krkinnan.members.winisp.net/samples/v5/georss/2004hurricaneivan.xml" mce_href="http://krkinnan.members.winisp.net/samples/v5/georss/2004hurricaneivan.xml"&gt;2004 Hurricane Ivan Geo RSS data&lt;/A&gt;.&amp;nbsp; The other feed is a Simple GeoRSS format with &lt;A href="http://krkinnan.members.winisp.net/samples/v5/georss/1992hurricaneandrew.xml" mce_href="http://krkinnan.members.winisp.net/samples/v5/georss/1992hurricaneandrew.xml"&gt;1992 Hurricane Andrew GeoRSS data&lt;/A&gt;.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v5/georss/georss_sample1.html" mce_href="http://krkinnan.members.winisp.net/samples/v5/georss/georss_sample1.html"&gt;Virtual Earth API GeoRSS Example&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v5/georss/georss_sample1.html" mce_href="http://krkinnan.members.winisp.net/samples/v5/georss/georss_sample1.html"&gt;&lt;IMG src="http://krkinnan.members.winisp.net/samples/v5/georss/georss01.jpg" border=0&gt; &lt;/A&gt;&amp;nbsp;&lt;A href="http://krkinnan.members.winisp.net/samples/v5/georss/georss_sample1.html" mce_href="http://krkinnan.members.winisp.net/samples/v5/georss/georss_sample1.html"&gt;&lt;IMG src="http://krkinnan.members.winisp.net/samples/v5/georss/ve3dgeorss01.jpg" border=0&gt; &lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For more information regarding the Virtual Earth APIs, see the &lt;A href="http://dev.live.com/virtualearth/sdk/" mce_href="http://dev.live.com/virtualearth/sdk/"&gt;Virtual Earth Interactive SDK&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2309650" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth/default.aspx">Virtual Earth</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+API/default.aspx">Virtual Earth API</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/GeoRSS/default.aspx">GeoRSS</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx">VEShape</category></item><item><title>Virtual Earth API: Simple VEShapeLayer Example</title><link>http://blogs.msdn.com/keithkin/archive/2007/04/28/virtual-earth-api-simple-veshapelayer-example.aspx</link><pubDate>Sat, 28 Apr 2007 08:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2308795</guid><dc:creator>keithkin</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/keithkin/comments/2308795.aspx</comments><wfw:commentRss>http://blogs.msdn.com/keithkin/commentrss.aspx?PostID=2308795</wfw:commentRss><description>&lt;P&gt;One of the powerful features of the Virtual Earth v5 API is the new VEShapeLayer.&amp;nbsp; The VEShapeLayer allows you to organize VEShapes into groups.&amp;nbsp; In the previous VEShape example, the VEShapes were added directly to the map.&amp;nbsp; When shapes are added directly to the map, those shapes are put in a default shape layer.&amp;nbsp; In this post, I'll show you how to create some simple shape layers.&lt;/P&gt;
&lt;P&gt;To add a VEShape to a specific VEShapeLayer, you just need to create a VEShapeLayer and some VEShapes, and then call AddShape on the layer.&lt;/P&gt;
&lt;P&gt;The following code example shows you how to add a simple pushpin to a shape layer:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;var shapeLayer1= new VEShapeLayer();&lt;BR&gt;&lt;/STRONG&gt;var shape1 = new VEShape(VEShapeType.Pushpin,new VELatLong(37.776, -122.426));&lt;BR&gt;&lt;STRONG&gt;shapeLayer1.AddShape(shape1);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Once you have&amp;nbsp;shape layer, you can add a shape layer to the VEMap using the AddShapeLayer method:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;map.AddShapeLayer(shapeLayer1);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Each shape layer can hold multiple VEShapes, and they can be different types of VEShapes.&amp;nbsp; You can have pushpins, polylines, and polygons shapes all in the same shape layer.&lt;/P&gt;
&lt;P&gt;The following code example, adds a pushpin, polyline, and polygon all to the same shape layer:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;//Create the shape layer&lt;BR&gt;&lt;STRONG&gt;var shapeLayer1= new VEShapeLayer(); &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;//Add a pushpin&lt;BR&gt;var shape1 = new VEShape(VEShapeType.Pushpin,new VELatLong(37.776, -122.426));&lt;BR&gt;shape1.SetTitle('Shape 1 (pushpin)');&lt;BR&gt;shape1.SetDescription('in Layer 1');&lt;BR&gt;shape1.SetCustomIcon('pin_blue.gif');&lt;BR&gt;&lt;STRONG&gt;shapeLayer1.AddShape(shape1); &lt;/STRONG&gt;
&lt;P&gt;//Add a polyline&lt;BR&gt;var shape2= new VEShape(VEShapeType.Polyline, [ new VELatLong(44.5, -122.5), new VELatLong(48.5, -112.3), new VELatLong(42.3, -114.7), new VELatLong(45.1, -100.4), new VELatLong(35.1, -104.2) ]);&lt;BR&gt;shape2.SetTitle('Shape 2 (polyline)');&lt;BR&gt;shape2.SetDescription('in Layer 1');&lt;BR&gt;shape2.SetCustomIcon('pin_blue.gif');&lt;BR&gt;shape2.SetLineColor(new VEColor(0,0,255,0.3));&lt;BR&gt;&lt;STRONG&gt;shapeLayer1.AddShape(shape2); &lt;/STRONG&gt;
&lt;P&gt;//Add a Polygon&lt;BR&gt;var shape3= new VEShape(VEShapeType.Polygon, [ new VELatLong(44.5, -90.8), new VELatLong(48.5, -75.3),&amp;nbsp;new VELatLong(35.5, -80.4), new VELatLong(30.5, -95.8)]);&lt;BR&gt;shape3.SetTitle('Shape 3 (polygon)');&lt;BR&gt;shape3.SetDescription('in Layer 1');&lt;BR&gt;shape3.SetCustomIcon('pin_blue.gif');&lt;BR&gt;shape3.SetLineColor(new VEColor(0,0,255,0.3));&lt;BR&gt;shape3.SetFillColor(new VEColor(0,0,255,0.3));&lt;BR&gt;&lt;STRONG&gt;shapeLayer1.AddShape(shape3);&lt;/STRONG&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;//Add the shape layer to the map&lt;BR&gt;&lt;STRONG&gt;map.AddShapeLayer(shapeLayer1);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In the above code example, I used three additional optional methods on the VEShape objects.&amp;nbsp; SetCustomIcon allows you to specify a custom icon for the VEShape.&amp;nbsp; SetLineColor allows you to specify a VEColor of the lines in the shape.&amp;nbsp; SetFillColor allows you to specify a VEColor to fill in the shape.&amp;nbsp; The VEColor takes 3 arguments: a red, green, blue, and alpha transparency value.&amp;nbsp; In the above sample, I set the line color to blue and the transparency to 0.3. 
&lt;P&gt;Once you create shape layers on the map, you can then choose to show and hide individual shape layers with the Show and Hide methods on the VEShapeLayer.&amp;nbsp; 
&lt;P&gt;For example, the following code hides and then shows the shape layer: 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;shapeLayer1.Hide(); 
&lt;P&gt;shapeLayer1.Show();&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The following link has a complete working example showing two shape layers -- one using blue colors and one using green colors.&amp;nbsp; I created a simple checkbox control in the top right which can be used to hide/show the individual shape layers. 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v5/veshapes/veshapelayersample1.html" mce_href="http://krkinnan.members.winisp.net/samples/v5/veshapes/veshapelayersample1.html"&gt;Simple VEShapeLayer Example&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v5/veshapes/veshapelayersample1.html" mce_href="http://krkinnan.members.winisp.net/samples/v5/veshapes/veshapelayersample1.html"&gt;&lt;IMG src="http://krkinnan.members.winisp.net/samples/v5/veshapes/veshapelayer01.png" border=0&gt;&lt;/A&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For more information on VEShapeLayers and the v5 Virtual Earth API, see the &lt;A href="http://dev.live.com/virtualearth/sdk/" mce_href="http://dev.live.com/virtualearth/sdk/"&gt;Virtual Earth Interactive SDK&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2308795" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth/default.aspx">Virtual Earth</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+API/default.aspx">Virtual Earth API</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx">VEShape</category></item><item><title>Virtual Earth API: Simple VEShape Example</title><link>http://blogs.msdn.com/keithkin/archive/2007/04/28/virtual-earth-api-simple-veshape-example.aspx</link><pubDate>Sat, 28 Apr 2007 08:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2308528</guid><dc:creator>keithkin</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/keithkin/comments/2308528.aspx</comments><wfw:commentRss>http://blogs.msdn.com/keithkin/commentrss.aspx?PostID=2308528</wfw:commentRss><description>&lt;P&gt;The Virtual Earth v5 APIs added a new VEShape class to make it easier to create pushpins, polylines, and polygons.&amp;nbsp; The new VEShape class gives these shapes a standard interface and a uniform way to create and access drawing elements on the map.&amp;nbsp; VEShapes are powerful and have many settings you can customize.&amp;nbsp; However, for this example,&amp;nbsp;we are sticking with the basics to create simple pushpins, polylines, and polygons.&amp;nbsp; Future examples will show more details and expand on the customizable attributes of these elements.&lt;/P&gt;
&lt;P&gt;To create a simple pushpin with a VEShape, you just need pass the VEShapeType.Pushpin type and a VELatLong to the VEShape constructor.&amp;nbsp; Then add it to the VEMap with the AddShape call.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;var shape1 = new VEShape(VEShapeType.Pushpin,new VELa\tLong(37.776, -122.426));&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To create a simple polyline with VEShape, you need to pass the VEShapeType.Polyline type and an array of VELatLongs to the VEShape constructor.&amp;nbsp; Then add it to the map with the AddShape call.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;var shape2= new VEShape(VEShapeType.Polyline, [ new VELatLong(44.5, -122.5), new VELatLong(48.5, -112.3), new VELatLong(42.3, -114.7), new VELatLong(45.1, -100.4), new VELatLong(35.1, -104.2) ]);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To create a simple polygon with VEShape, you need to pass the VEShapeType.Polygon and an array of VELatLongs to the VEShape constructor.&amp;nbsp; Then add it to the map with the Add Shape call&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;var shape3= new VEShape(VEShapeType.Polygon, [ new VELatLong(44.5, -90.8), new VELatLong(48.5, -75.3),&amp;nbsp;new VELatLong(35.5, -80.4), new VELatLong(30.5, -95.8)]);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can also add content to the default pop-up info box for each VEShape by calling the SetTitle and SetDescription methods on the VEShape:&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;shape1.SetTitle('Shape 1');&lt;BR&gt;shape1.SetDescription('Pushpin');&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The pop-up info box by default will appear when mousing over the shape icon.&amp;nbsp; (Note: The pop-up info box is very customizable as well, however for this example, we'll keep it simple.&amp;nbsp; Future examples will show how to customize these elements.)&lt;/P&gt;
&lt;P&gt;Once you have created your shapes, you can add them to the VEMap using the AddShape call:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;map.AddShape(shape1);&lt;/P&gt;
&lt;P&gt;map.AddShape(shape2);&lt;/P&gt;
&lt;P&gt;map.AddShape(shape3);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;When adding VEShapes directly to the VEMap, they will be a part of the default layer.&amp;nbsp; In a future example, we will add shapes to multiple layers.&lt;/P&gt;
&lt;P&gt;Here's a link to the complete sample for this mashup:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://krkinnan.members.winisp.net/samples/v5/veshapes/veshapesample1.html" mce_href="http://krkinnan.members.winisp.net/samples/v5/veshapes/veshapesample1.html"&gt;Simple VEShape Example&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="http://krkinnan.members.winisp.net/samples/v5/veshapes/veshapesample1.html" mce_href="http://krkinnan.members.winisp.net/samples/v5/veshapes/veshapesample1.html"&gt;&lt;IMG src="http://krkinnan.members.winisp.net/samples/v5/veshapes/veshape01.png" border=0&gt;&lt;/A&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For more information on VEShapes, see the &lt;A href="http://dev.live.com/virtualearth/sdk/" mce_href="http://dev.live.com/virtualearth/sdk/"&gt;Virtual Earth Interactive SDK&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2308528" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth/default.aspx">Virtual Earth</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/Virtual+Earth+API/default.aspx">Virtual Earth API</category><category domain="http://blogs.msdn.com/keithkin/archive/tags/VEShape/default.aspx">VEShape</category></item></channel></rss>