Community of MapPoint and Bing Maps Users and Developers
This is a discussion on Virtual Earth API: Adding KML or GeoRSS Layers to the Map within the Bing Maps Blogs & Tweets forums, part of the Blogs category; One of the new features of the Virtual Earth v6 Map Control API is the ability to import KML layers ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Virtual Earth API: Adding KML or GeoRSS Layers to the Map One of the new features of the Virtual Earth v6 Map Control API is the ability to import KML layers on the map. Previous versions of the API allowed you to import GeoRSS using client-side XML parsing. However, one of the restrictions was that the GeoRSS file had to be on the same domain as the application or the browser would bring up a security warning unless the feed was from a trusted site in the client browser. For v6, we have improved this by added a new VEDataType.ImportXML option to the ImportShapeLayerData call on VEMap. This new call uses the same service from Live Search Maps which allows users to import KML, GeoRSS, or GPX into user collections. In the Virtual Earth API, it will import the XML into a shape layer in your application. It also allows you to load these data files from different domains without causing a browser security warning. Here are the steps for importing a KML, GeoRSS, or GPX file into your Virtual Earth application:
2. Create a shape source specification with type VEDataType.ImportXML, the url to the XML file, and a reference to the shape layer:
3. Import the data into shape layer by calling ImportShapeLayerData on the map with the specification:
Here's a link to a simple example which imports a KML file from the Discovery Channel that shows different national parks around the United States:
Note: you can also import XML files directly into Live Search Maps by opening a collection and then clicking on Import and entering the url. You can also, use the following url syntax directly:
For example: More... |
![]() |
| Tags |
| adding, api, georss, kml, layers, map, virtual earth |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| BRIGHTi GeoFeeder for converting Geodata to GeoRSS | VE Team | Bing Maps Blogs & Tweets | 1 | 08-19-2008 03:07 PM |
| Mashing KML and GeoRSS in 3D on the Web | VE Team | Bing Maps Blogs & Tweets | 0 | 10-26-2007 02:13 PM |
| Virtual Earth News from GEOINT 2007: Virtual Earth Appliance | VE For Government | Bing Maps Blogs & Tweets | 0 | 10-24-2007 01:10 PM |
| GeoFeeder: Convert Your Vector Data to GeoRSS and Import into Virtual Earth | VE For Government | Bing Maps Blogs & Tweets | 0 | 10-17-2007 10:41 AM |
| Adding other layers to mappoint street maps | Anonymous | Bing Maps and MapPoint Web Service | 0 | 05-12-2005 08:42 PM |