Map styles

The ready-made map drawing styles can be selected and used from Dictionary editing, project editing layer selection screens.

GEODI map drawing styles are set with CSS.  A new style can be defined by placing a CSS file  in %AppData%Dece/App/GEODI/SystemStyles or in the SystemStyles folder next to the application. Custom style constraints can be applied based on a layer.

CSS definitions support cascading architecture. A label can take a red color from one definition and blue background from another definition.



Style definitions

 Properties that will let you provide separate definitions for the  label, point, line, area, GDI settings can be used.

For label edits label-..., for point edits point-...., for area edits polygon-..., for line edits line-...., for GDI settings map-... definitions can be used.

Definitions cannot be used directly. It can be used in a block with the target or class name that it will affect.

Click here for all current CSS features. The document specifies the values and type of values that can be used in the description fields.

Defining a style block

Blocks can be defined as.[ClassName] { .. } , #[Target] {..}, #[TypeName] {..} or layer{...} .  A definition in the block called "layer" affects all geometries.


Inheritance order for blocks that affect a layer  "layer" → [TypeName] → #[LayerId] → #[LayerDisplayName] → .[ClassNameDefinedInLayer] → .[ClassNameDefinedInGeometry]
  • layer : Definition that affects all layers. HTML CSS definitions can be considered as tagName definitions.
  • [TypeName] :  Affects only specified object type layers.  A block definition ,that will affect all user dictionaries, can be defined as GeodiDictionary {..}. Click Here for a list of all current types.
  • #[LayerId] : Affects only the layer with the specified ID. You can reach All Layer ID values used in the project through the browser console by typing CurrentQueryContainer.CurrentWSInfo.Recognizers to the console. Example: A block definition to make a definition that will only affect the World Cities dictionary can be defined as GeodiDictionary_462a0511-06ba-4383-9335-0b8c29bd087c {..}.
  • #[LayerDisplayName] : Affects only the layer with the specified name. If you have specified a layer in multiple languages, the block name should be given in the syntax that you use for the multi-language.
  • .[ClassNameDefinedInLayer] : It affects the selected layers from the dictionary editing for the layer or project editing interfaces. Naming in the CSS definition can be done. The definition added to the CSS content will appear in the edit interfaces.
  •  .[ClassNameDefinedInGeometry] : Only effects geometry definitions that exclusively specified at Layer/Recognizer level. Some recognizer editing interfaces ask which class definition will be added to which type of geometry.

If geometry is affected by multiple definitions in the list during drawing, the property in the last definition applies. For a higher definition to always be valid, !important statement can be used in the definition.


Inheritance Example
/* 
In this example, the MyClass class tags a selected layer named MyLayer.
- It is drawn in red.  The class name defined by "." is at the end of inheritance.
- Black background used. Altough the layer,that is defined by ".", is trying to make the backgroud gray, background becomes black because usage of !important at the "#" layer definition makes the layers statue higher at the inheritence level.
- Text edges are set to be white. Halo definition is inherited from "#" layer definition.

*/
.MyCLass {
	label-Color:Red;
	label-BackgroundColor:Gray;
}
layer {
	label-Color:Blue;
}
#MyLayer {
	label-Halo:White;
	label-BackgroundColor:Black !important;
}

Using a Macro

Macro can be used for style values. For syntax rules, see the Macros page. The [ ] characters should not be used in style values.

Inheritance Example
.MyCLass_A {
	point-Color:$context.GetColor(context.ID) ;
}
.MyClass_B {
    point-Color:=Color.FromArgb(200,(int)Math.Abs((context.Geometry.Centroid.Y/10000)%255),(int)Math.Abs((context.Geometry.Centroid.X/10000)%255),(int)Math.Abs((context.Geometry.Centroid.X/10000)%255));
}
.MyClass_C {
    label-Enable:=c.MapScale>1000;
}