private void processLegendSettings(XmlNode layerNode, FeatureLayer l)
{
XmlNode legendSettings = tryGetNodeByName(layerNode.ChildNodes, "legend_settings");
if (legendSettings != null)
{
LayerLegendSettings settings =
new LayerLegendSettings(
legendSettings.Attributes["display_point_sample"].Value == "1",
legendSettings.Attributes["display_polyline_sample"].Value == "1",
legendSettings.Attributes["display_polygon_sample"].Value == "1",
legendSettings.Attributes["point_sample_title"].Value,
legendSettings.Attributes["polyline_sample_title"].Value,
legendSettings.Attributes["polygon_sample_title"].Value);
l.LegendSettings = settings;
}
}