Add to Technorati Favorites Virtual Earth KML - Take One - Waypoints
..................................
the blog@spencerwilliams.net

Virtual Earth KML - Take One - Waypoints

January 9, 2008 07:55 by Spencer

So I tried adding KML to the map - first glance, it looks great.  Pretty simple code too:

var map = null;

function MapLoad()
         {
            map = new VEMap('myMap');
            map.LoadMap(null,null,'h',null,VEMapMode.Mode3D,null,null);
            var l = new VEShapeLayer();
            
            var veLayerSpec = new VEShapeSourceSpecification(VEDataType.ImportXML, "
http://www.spencerwilliams.net/kml/kmlmainmap1.xml", 1);
            map.ImportShapeLayerData(veLayerSpec, onFeedLoad, 1);
          }

 function onFeedLoad(feed)
              {
                 
                 
              }

See the example here: http://spencerwilliams.net/trailmaps/default.aspx

I liked how Virtual Earth automatically zoomed the map in to see the two waypoints at the lowest zoom level that they would fit in.  I tried unsuccessfully to change the default pushpin icon.  More on that later.


Related posts

Comments are closed
 
Blog Information Profile for williasp