Databinding to KML has to be one of the top requested features I hear when I speak to people about VE.  The good news is that I can now tell people YES when they ask about it!!!  The VE team released a Quick Fix Engineering (QFE) update to Virtual Earth that included some enhancements to the v6 map control (more here).  So how does it work?  The VEDataType enumeration has been updated.  All you need is a slight tweak to the same code you would use for GeoRSS.

 

map = new VEMap('myMap'):

map.LoadMap(new VELatLong(46.3081, -122.1928), 12);

var l = new VEShapeLayer();

var veLayerSpec = new VEShapeSourceSpecification(VEDataType.ImportXML, "YourKmlFileHere.kml", l);

map.ImportShapeLayerData(veLayerSpec, onFeedLoad);

I have not tried it out myself.  I don't have many KML sources:).  Try it out with yours!

 

-Marc

Technorati Tags: ,,,