Maptitude GISDK Help |
You can use GISDK functions to control the style of every selection set in a layer. (To learn how to create and manage selection sets, see Selection Sets.) For example, suppose you have a selection set named "High Income" on the ZIP Code layer. The sample macro below sets the style for the ZIP Code layer, and a different style for ZIP Codes that are in the selection set:
// Leave the fill style and color blank
SetBorderColor("ZIP Code|", blue)
SetBorderStyle("ZIP Code|", solid_line)
SetBorderWidth("ZIP Code|", 0.25)
// For the high income set, apply a fill style and a fill color...
SetFillStyle("ZIP Code|High Income", checkerboard_fill)
SetFillColor("ZIP Code|High Income", red)
The display settings for a selection set can vary from map to map as well. For example, suppose you want the high income ZIP Codes to be shown in checkerboard red in one map, and in striped blue in another map:
// Settings for Map1
SetFillStyle("Map1|ZIP Code|High Income", checkerboard_fill)
SetFillColor("Map1|ZIP Code|High Income", red)
// Settings for Map2
SetFillStyle("Map2|ZIP Code|High Income", striped_fill)
SetFillColor("Map2|ZIP Code|High Income", blue)
Style elements for selection sets can be set to null, indicating that the selection set "inherits" the underlying style element. This lets you make styles cumulative for features that are in more than one selection set.
Here is an example. Suppose you have a Roads layer with two selection sets, named High Traffic and Poor Condition, and you set the style, width and color as follows:
Setting |
Base layer |
High traffic |
Poor condition |
Line style |
Solid |
Null |
Dashed |
Line color |
Blue |
Null |
Red |
Line width |
0.25-point |
5-point |
Null |
Here is how each kind of road will be drawn:
Road type |
Style |
Low traffic, good condition |
Solid blue 0.25-point line |
High traffic, good condition |
Solid blue 5-point line |
Low traffic, poor condition |
Dashed red 0.25-point line |
High traffic, poor condition |
Dashed red 5-point line |
©2025 Caliper Corporation | www.caliper.com |