Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

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 a 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 {..}. Clickl 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] : Katman için sözlük düzenleme veya proje düzenleme arayüzlerinden ismi seçilen katmanları etkiler. Naming in CSS definition can be done. The definition added to the CSS content will appear in the edit interfaces.
  •  .[ClassNameDefinedInGeometry] : Only affects geometry definitions that exclusively specified at Layer/Recognizer level. Bazı tanıyıcı düzenleme arayüzlerinde hangi tip geometriye hangi sınıf tanımının ekleneceği sorulmaktadır.

If a 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
/* 
Bu örnekte MyClass sınıfı seçilmiş MyLayer isimli bir katman için etkietler .
- Kırmızı renkte çizilir. "." ile tanımlı sınıf adı devralma sırasında sondadır.
- Siyah zemin kullanılır. Zemini Gri yapmaya çalışan "." ile tanımlı sınıf adı devralma sırasında sonda olsa da devralma sırasında daha önce gelen "#" katman tanımında !important kullanılmıştır.
- Yazı kenarları beyazdır. "#" katman tanımından Halo tanımı devralınmıştır.

*/
.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;
}

  • No labels