stevel

How to obtain symbology from a KML file

Discussion created by stevel on Jul 13, 2012
Latest reply on Jul 13, 2012 by stevel
See the simple sample which I made by modifying an Esri sample, which lloads a KML file onto the basemap.

Where is the symbology being defined? If I break around line 38, I can't see where the symbology is specified.

var kmlUrl = 'http://www.ci.redding.ca.us/KML/SacRiverTrail.kml';
    kml = new esri.layers.KMLLayer(kmlUrl);
    map.addLayer(kml);


    dojo.connect(kml, 'onLoad', function(lyr) {
      // Collect the line features from the KML layer
      kmlGeoms = dojo.map(lyr.getLayers()[0].graphics, function(g) {
       //g.symbol is blank, so where is the symbol coming from?
       return g.geometry;
      });


Thanks,
Steve

Outcomes