Solved! Go to Solution.
<layer label="Earthquakes GeoRSS" type="georss" visible="true" alpha="1"
url="http://earthquake.usgs.gov/earthquakes/feed/atom/1.0/week">
<simplerenderer>
<simplemarkersymbol style="diamond" size="12" color="0xff0000" alpha="1" />
</simplerenderer>
</layer>
private static function createGeoRSSLayer(layerCreationProperties:LayerCreationProperties):GeoRSSLayer
{
var geoRSSLayer:GeoRSSLayer = new GeoRSSLayer(layerCreationProperties.url);
geoRSSLayer.alpha = layerCreationProperties.alpha;
geoRSSLayer.id = layerCreationProperties.label;
geoRSSLayer.name = layerCreationProperties.label;
geoRSSLayer.disableClientCaching = layerCreationProperties.disableClientCaching;
if (layerCreationProperties.renderer)
{
geoRSSLayer.addEventListener(LayerEvent.LOAD,function loadSymbol(event:LayerEvent):void{
FeatureLayer(geoRSSLayer.featureLayers[0]).renderer = layerCreationProperties.renderer;
});
}
if (layerCreationProperties.serviceURL)
{
geoRSSLayer.serviceURL = layerCreationProperties.serviceURL;
}
if (!isNaN(layerCreationProperties.minScale))
{
geoRSSLayer.minScale = layerCreationProperties.minScale;
}
if (!isNaN(layerCreationProperties.maxScale))
{
geoRSSLayer.maxScale = layerCreationProperties.maxScale;
}
geoRSSLayer.visible = layerCreationProperties.visible;
return geoRSSLayer;
}
private static function createGeoRSSLayer(layerCreationProperties:LayerCreationProperties):GeoRSSLayer { var geoRSSLayer:GeoRSSLayer = new GeoRSSLayer(layerCreationProperties.url); geoRSSLayer.alpha = layerCreationProperties.alpha; geoRSSLayer.id = layerCreationProperties.label; geoRSSLayer.name = layerCreationProperties.label; geoRSSLayer.disableClientCaching = layerCreationProperties.disableClientCaching; geoRSSLayer.showInLegend = layerCreationProperties.showInLegend; geoRSSLayer.visible = layerCreationProperties.visible; if (layerCreationProperties.renderer) { geoRSSLayer.addEventListener(LayerEvent.LOAD,function loadSymbol(event:LayerEvent):void{FeatureLayer(geoRSSLayer.featureLayers[0]).renderer = layerCreationProperties.renderer;}); } if (layerCreationProperties.copyright != null) { geoRSSLayer.copyright = layerCreationProperties.copyright; } if (layerCreationProperties.serviceURL) { geoRSSLayer.serviceURL = layerCreationProperties.serviceURL; } if (!isNaN(layerCreationProperties.minScale)) { geoRSSLayer.minScale = layerCreationProperties.minScale; } if (!isNaN(layerCreationProperties.maxScale)) { geoRSSLayer.maxScale = layerCreationProperties.maxScale; } if (layerCreationProperties.markerSymbol) { geoRSSLayer.pointSymbol = layerCreationProperties.markerSymbol; } if (layerCreationProperties.lineSymbol) { geoRSSLayer.polylineSymbol = layerCreationProperties.lineSymbol; } if (layerCreationProperties.fillSymbol) { geoRSSLayer.polygonSymbol = layerCreationProperties.fillSymbol; } return geoRSSLayer; }
import com.esri.ags.events.LayerEvent;