MapAround.Mapping.MapWorkspace.addLegendElement C# (CSharp) Method

addLegendElement() private method

private addLegendElement ( FeatureLayer layer, XmlDocument doc, XmlElement layerElement ) : void
layer FeatureLayer
doc System.Xml.XmlDocument
layerElement System.Xml.XmlElement
return void
        private void addLegendElement(FeatureLayer layer, XmlDocument doc, XmlElement layerElement)
        {
            XmlElement legendSettings = doc.CreateElement("legend_settings");
            layerElement.AppendChild(legendSettings);
            addAttribute(doc, legendSettings, "display_point_sample", layer.LegendSettings.DisplayPointSample ? "1" : "0");
            addAttribute(doc, legendSettings, "display_polyline_sample", layer.LegendSettings.DisplayPolylineSample ? "1" : "0");
            addAttribute(doc, legendSettings, "display_polygon_sample", layer.LegendSettings.DisplayPolygonSample ? "1" : "0");
            addAttribute(doc, legendSettings, "point_sample_title", layer.LegendSettings.PointSampleTitle);
            addAttribute(doc, legendSettings, "polyline_sample_title", layer.LegendSettings.PolylineSampleTitle);
            addAttribute(doc, legendSettings, "polygon_sample_title", layer.LegendSettings.PolygonSampleTitle);
        }