Nevron .NET Vision
Diagram for .NET / User's Guide / Maps / Fill Rules

In This Topic
    Fill Rules
    In This Topic

    Fill rules are used to colorize a map based on the values of a map feature attribute. When creating a fill rule you must specify the fill rule data column name and the fill styles to use. There are two types of fill rules:

    C#
    Copy Code
    NMapFillRuleRange fillRule = new NMapFillRuleRange("POP_CNTRY", Color.White, Color.Black, 12);
    fillRule.DataGrouping = m_DataGrouping;
    countries.FillRule = fillRule;
    
    Visual Basic
    Copy Code
    Dim fillRule As NMapFillRuleRange = New NMapFillRuleRange("POP_CNTRY", Color.White, Color.Black, 12)
    fillRule.DataGrouping = New NDataGroupingOptimal()
    countries.FillRule = fillRule
    
    Fill rules create and add a style sheet to the drawing document for each generated fill style. All created style sheets inherit the style sheet specified by the DefaultStyleSheetName property of the map layer that owns the fill rule, so you can use it to specify some common styling properties that should affect all style sheets generated by the fill rule.

    The following is an example of different data grouping algorithms applied to a world map containing information for the population of each country:

     

    Equal Distribution - also known as quantiles, this method allows for unequally sized data intervals and involves adjustment of the interval limits until an equal number of data points can be slotted into each interval.

     

    Equal Interval - also known as equal ranges (or steps), this method involves division of the entire data range into equally sized intervals.

     

    Optimal - adjusts the size of data intervals in order to minimize the classification error and thus the map looks more balanced and the results seem more correct, with just a few shapes in the highest class as one would expect.

    See Also