User Tools

Site Tools


manual:advanced:map_tools:theming

This is an old revision of the document!


Locus Maps Theming


This page is obsolete and will be reworked soon

Locus Maps content

Basic information

This page contains mapping XML file, used by Locus for generating OSM-based vector maps

TAG file

XML file used for generation of vector map. It contains combination of OSM tag KEY-VALUE of elements that are rendered in Locus vector maps. tag-mapping.zip

Internal themes

Definition of five default themes locus_internal_theme_20150407.zip


Locus Maps - theme configuration

Supported tags

area

  • src
  • fill
  • stroke
  • stroke-width

caption

  • k
  • dx
  • dy
  • font-family
  • font-style
  • font-size
  • fill
  • stroke
  • stroke-width
  • upper-case
  • scale-font-size
  • bg-rect-fill
  • bg-rect-stroke
  • bg-rect-over
  • bg-rect-stroke-width
  • bg-rect-rounded
  • priority
  • force-draw

circle

  • r
  • scale-radius
  • fill
  • stroke
  • stroke-width

line

  • curve
  • dy
  • src
  • stroke
  • stroke-width
  • stroke-dasharray
  • stroke-linecap

lineSymbol

  • src
  • align-center
  • repeat
  • repeat-gap
  • scale
  • scale-icon-size

pathText

  • k
  • font-family
  • font-style
  • font-size
  • fill
  • stroke
  • stroke-width
  • dx
  • dy
  • upper-case
  • scale-font-size
  • bg-rect-fill
  • bg-rect-stroke
  • bg-rect-over
  • bg-rect-stroke-width
  • bg-rect-rounded

symbol

  • src
  • scale
  • scale-icon-size
  • symbol-width
  • symbol-height
  • priority
  • force-draw

Details about tags

curve

Adds possibility to draw line extrapolated as curve. It helps in some situations to create “smooth” lines:

  • value: “cubic”
  • example: <line stroke=“#A07F5F” stroke-width=“0.08” curve=“cubic”/>

bg-rect-*

Background rectangle is very useful method how to draw a nicely looking rectangle as a background of texts.

  • bg-rect-fill
    • more in fill attribute
  • bg-rect-stroke
    • more in stroke attribute
  • bg-rect-over
    • space between text and border
    • value: decimal number
  • bg-rect-stroke-width
    • more in stroke-width
  • bg-rect-rounded
    • allow to round corners of bounding rectgangle
    • value: decimal number
  • used in: caption, pathText

fill

  • Fills colours of items.
  • value: colour

force-draw

  • useful method to draw icon no matter if other overlays it or not
  • value: boolean

scale

  • Scale symbol for drawing
  • default: 1.0f
  • value: decimal number

scale-icon-size

  • Allows to scale symbol based on current zoom level. Very useful method how to increase the size of symbols on map when you change zoom level. Method is defined by two values separated by comma, where 1. value is base zoom level, 2. value is exponent. Base scale value is from attribute scale.
  • example: scale=“1.5” scale-icon-size=“12,1.1”
    • for zoom levels 0 - 11, scale: 1.5
    • for zoom level 12, scale: 1.5 * 1.0 = 1.5
    • for zoom level 13, scale:
      • zoom level difference: 1
      • scale: 1.5 * 1.1 = 1.65
    • for zoom level 15, scale:
      • zoom level difference: 3
      • scale: 1.5 * 1.1 * 1.1 * 1.1 = 2.00

stroke

  • Stroke colours for items.
  • value: colour

stroke-width

  • Width of stroke color
  • value: decimal number

symbol-width, symbol-height

enables to resize symbol icon to specific width or height

  • value: decimal number

upper-case

  • allows to display texts in upper-case
  • used in: caption, pathText
  • value: boolean

Possible values

boolean

Boolean value may be written as text true, false or as number 1 (as true), 0 (as false)

colour

Supported formats are: #RRGGBB #AARRGGBB 'red', 'blue', 'green', 'black', 'white', 'gray', 'cyan', 'magenta', 'yellow', 'lightgray', 'darkgray'

decimal number

Common decimal number

manual/advanced/map_tools/theming.1431665303.txt.gz · Last modified: 2015/05/15 07:48 (external edit)