This project has moved. For the latest updates, please go here.

UniqueValuesTheme missing reference

Topics: SharpMap v0.9 / v1.x
Jul 9, 2012 at 1:21 AM
Edited Jul 9, 2012 at 1:34 AM

Hi everyone,

I'm having a small difficulity with Sharpmap. I'm trying to add style to a vector layer but when i try to use the line where UniqueValuesTheme i cannot find the reference for that instruction. Here is my code. Any help would be appreciated. Thanks. Using Visual Studio 2010.


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SharpMap.Styles;
using SharpMap.Rendering.Thematics;
using SharpMap.Rendering;

namespace WindowsFormsApplication3
    public partial class Form1 : Form
        public Form1()
            SharpMap.Layers.VectorLayer vlay = new SharpMap.Layers.VectorLayer("Canada");
            vlay.DataSource = new SharpMap.Data.Providers.ShapeFile("D:\\Desktop\\shapesfiles\\Canada\\PROVINCE.shp", true);

            VectorStyle landstyle = new VectorStyle();
            landstyle.Fill = new SolidBrush(Color.FromArgb(232, 232, 232));
            Dictionary<string,SharpMap.Styles.IStyle> styles = new Dictionary<string,IStyle>();
            styles.Add("land", landstyle);

            vlay.Theme = new SharpMap.Rendering.Thematics.UniqueValuesTheme<string>("class", styles, landstyle);
Jul 10, 2012 at 6:56 AM

The file is present in the repository:

and included in the project file:

You may have to update your solution.

Hth FObermaier

Jul 10, 2012 at 2:00 PM

Please not that the UniqueValuesTheme is added after the last binary release (from downloads). 

You need to build the code yourself to be able to use it.

Feb 12, 2013 at 1:43 AM
Please, update the binary released with the UniqueValuesTheme.