Skip to content

jrmsjorgesilva/SharpMap.Rendering.Decorations.Legend

 
 

Repository files navigation

SharpMap.Rendering.Decorations.Legend

A legend solution for SharpMap

Step 1: Create your map

Step 2: Create your legend for the map

var factory = new SharpMap.Rendering.Decoration.Legend.Factories.LegendFactory
    {
        HeaderFont = new System.Drawing.Font("Times New Roman", 24),
        SymbolSize = new System.Drawing.Size(14, 14);
        Indentation = 7;
        //more properties are ItemSize, ForeColor; Padding
    };
    
var legend = factory.Create(map);
// Get a legend image
var legendImage = legend.GetLegendImage();

// Display the legend image on the map
map.Decorations.Add(legend);
    

Here is an example:

Example image

About

A legend solution for SharpMap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%