Back

polygon element

Elementpolygon
AttributeFormatRemarks
widthfloatline width in pixels
colorstringcolor id name
rbytecolor RGB value (0-255)
gbytecolor RGB value (0-255)
bbytecolor RGB value (0-255)

Each polygon consists of at least three <point> elements where each <point> is connected to the next <point> and where the first and last <point> elements connect to each other. The area inside the points is filled with the specified color.

The drawing can be written as:

  <polygon color="myPredefinedColor">
      <point x="v0 x" y="v0 y" />
      <point x="v1 x" y="v1 y" />
      <point x="v2 x" y="v2 y" />
      <point x="v3 x" y="v3 y" />
      <point x="v4 x" y="v4 y" />
      <point x="v5 x" y="v5 y" />
  </polygon>

Example

The following code draws a filled rectangle:

  <polygon color="myPredefinedColor">
      <point lat="N0504413" lon="E0043108"/>
      <point lat="N0504421" lon="E0042601"/>
      <point lat="N0504528" lon="E0042119"/>
      <point lat="N0504730" lon="E0041718"/>
  </polygon>

to draw a line border around a polygon: draw the same polygon again as a lineloop element