Freigeben über


How to develop Microsoft Virtual Earth applications in managed code like C# instead of JavaScript

Microsoft Live Labs VoltaVolta, a Live Labs technology preview launched last week, includes bindings for Virtual Earth. The VoltaVirtualEarth library allows developers using Volta to build Virtual Earth applications for the browser, in managed code. This translates into static type checking, IntelliSense, integrated debugging, and many others—see the Volta docs for a list of the benefits.

If you're interested in seeing it in action a subset of the Virtual Earth interactive SDK is available online, with the code written in C# rather than JavaScript. For example, here's the code for the Show/Hide a shape sample:

private void ShowHideShape(){    var map = new Microsoft.LiveLabs.Volta.VirtualEarth.Map(mapDiv);    map.LoadMap();    Shape shape = new Shape(ShapeType.Pushpin, map.GetCenter());    shape.SetTitle("My pushpin");    shape.SetDescription("This is a pushpin.");    map.AddShape(shape);    doShowShape.Click += delegate { shape.Show(); };    doHideShape.Click += delegate { shape.Hide(); };}

With the caveat that Volta is a technology preview, if it looks like something you'd like to take a closer look at please do give it a try and provide your feedback to the community forum.

To cool!

   Daniel

Comments