Skip to content

User JSON SlopeSpeedIndicator

roosit edited this page Oct 16, 2026 · 1 revision

Slope and Speed JSON

Back to list | Indicator page | Русский

Purpose

This page describes the JSON template of the slopeSpeed indicator for manual editing of .vttp.

Full Template

{
  "name": "com.velitask.plagin.official.slopeSpeed",
  "data": {
    "maket": { "preset": "auto" },
    "properties": {
      "Slope": {},
      "Distance": {},
      "Font": { "name": "Dialog", "style": 0, "size": 48 },
      "slopeColorUp": { "r": 220, "g": 80, "b": 80, "a": 255 },
      "slopeColorDown": { "r": 80, "g": 220, "b": 80, "a": 255 },
      "slopeColorPlain": { "r": 128, "g": 128, "b": 128, "a": 255 },
      "speedColor": { "r": 255, "g": 255, "b": 255, "a": 255 },
      "TextAlign": { "value": 4 }
    }
  }
}

Settings

Slope

Selects the slope sensor ("Slope"). Leave it empty in a template: the sensor is selected automatically when the indicator is added to the project.

{
  "Slope": {}
}
Field Values What it does
sourceId {"value": source id} In a real project, selects the data source. Absent in the template.
sensorId {"value": sensor id} In a real project, selects the specific sensor. Absent in the template.

Distance

Selects the sensor from which the speed is taken ("Distance"). Leave it empty in a template.

{
  "Distance": {}
}
Field Values What it does
sourceId {"value": source id} In a real project, selects the data source. Absent in the template.
sensorId {"value": sensor id} In a real project, selects the specific sensor. Absent in the template.

Font

The font of both lines ("Font"). The name is written with a capital F. The line colors are set by separate settings, so there is no color here.

{
  "Font": { "name": "Dialog", "style": 0, "size": 48 }
}
Field Values What it does
name string, the font name Font name ("Font Name"); Dialog by default.
style 0, 1, 2 Font style ("Font Style").
size integer 1..999 Font size ("Font Size"); 48 by default.

Values of style:

Value Style
0 Plain
1 Bold
2 Italic

slopeColorUp

The color of the slope line on an uphill section ("Slope color (uphill)"). Reddish by default.

{
  "slopeColorUp": { "r": 220, "g": 80, "b": 80, "a": 255 }
}
Field Values What it does
r 0..255 Red channel.
g 0..255 Green channel.
b 0..255 Blue channel.
a 0..255 Transparency: 0 fully transparent, 255 opaque.

slopeColorDown

The color of the slope line on a downhill section ("Slope color (downhill)"). Greenish by default.

{
  "slopeColorDown": { "r": 80, "g": 220, "b": 80, "a": 255 }
}
Field Values What it does
r 0..255 Red channel.
g 0..255 Green channel.
b 0..255 Blue channel.
a 0..255 Transparency: 0 fully transparent, 255 opaque.

slopeColorPlain

The color of the slope line on a flat section ("Slope color (flat)"). Gray by default.

{
  "slopeColorPlain": { "r": 128, "g": 128, "b": 128, "a": 255 }
}
Field Values What it does
r 0..255 Red channel.
g 0..255 Green channel.
b 0..255 Blue channel.
a 0..255 Transparency: 0 fully transparent, 255 opaque.

speedColor

The color of the speed line ("Speed color"). White by default.

{
  "speedColor": { "r": 255, "g": 255, "b": 255, "a": 255 }
}
Field Values What it does
r 0..255 Red channel.
g 0..255 Green channel.
b 0..255 Blue channel.
a 0..255 Transparency: 0 fully transparent, 255 opaque.

TextAlign

The position of each line in its half of the layer ("Text Alignment"). The name is written with a capital T and A. The default is 4 — centered.

{
  "TextAlign": { "value": 4 }
}
Field Values What it does
value integer 0..8 Number of the position from the table below.
Value Position
0 Top left
1 Top center
2 Top right
3 Center left
4 Center
5 Center right
6 Bottom left
7 Bottom center
8 Bottom right

Clone this wiki locally