Select to view content in your preferred language

Sample Code - method to obtain KML extendedData from KMLLayer using JS API.

881
0
07-02-2012 02:38 PM
FengZhang2
Deactivated User
The JS API V2.4 added the KMLLayer class to create a layer based on a KML file (.kml,.kmz). It supports the ExtendedData feature attributes from JS API V2.5. The ExtendedData can be obtained by using the "attributes" of an object, such as:
  dojo.forEach(graphics, function(graphic){
  console.log(graphic.attributes.City);

The attached code sample shows how to obtain KML extendedData from KMLLayer using JS API.
0 Kudos
0 Replies