Import KML Layer RRS feed

  • Question

  • Is this method still valid in Version 8 of BING Maps.

    I have KML files being outputted from a Routing engine that need to be displayed on the map.


    // KML feed
                // var veLayerSpec = new VEShapeSourceSpecification(VEDataType.ImportXML, "http://localhost/kml/lines.kml", layer);

                // map.ImportShapeLayerData(veLayerSpec);


    Tuesday, August 23, 2016 9:14 PM


  • KML is currently not supported in Bing Maps V8 but is being considered. KML is not as common as it used to be and has been replaced by much more efficient data formats such as GeoJSON. Until this is made available there are a couple of options;

    • Find a JavaScript library that can convert KML to GeoJSON on the fly.
    • Upload the KML file into the bing Spatial Data Services. This will expose it as a spatial REST service which you can easily connect to your app using the built in Spatial Data services module in V8.

    [Blog] [twitter] [LinkedIn]

    • Proposed as answer by Ricky_Brundritt Tuesday, August 23, 2016 10:45 PM
    • Marked as answer by Robert Blake Tuesday, August 23, 2016 10:51 PM
    Tuesday, August 23, 2016 10:45 PM