Skip to content

Plugins

Kyle Corry edited this page Dec 12, 2025 · 15 revisions

Plugins add features to Trail Sense without requiring Trail Sense to be modified. Plugins also allow access to permissions that are not allowed in the base Trail Sense APK, such as Internet.

NOTE: Plugins are not currently available

GeoJSON Feature Plugins

TODO: Details on how to tell Trail Sense about these.

The body of the plugin response must be valid GeoJSON (https://geojson.org/). All geometry types are supported.

Trail Sense will request a region to be loaded. There will be a way to specify that your source does not vary when zoom or pan changes, meaning Trail Sense will not call it under those circumstances (ex. plugin returns GeoJSON for the whole world).

Trail Sense supports the following properties (additional properties can be sent, but are ignored):

  • name (string, default null): The name of the feature. Depending on user settings this may be displayed on the map or when selected.
  • lineStyle (string, default "solid"): The style of the line. Valid values are:
    • solid
    • dotted
    • arrow
    • dashed
    • square
    • diamond
    • cross
  • color (number, default TODO): The Android compatible ARGB color int of the fill/LineString color.
  • strokeColor (string, default null): The Android compatible ARGB color int of the stroke color. Does not apply to LineStrings.
  • strokeWeight (number, default TODO, 2.25 for LineStrings): The stroke weight in dp.
  • size (number, default TODO): The size of the marker in the units of sizeUnit. Only applies to Points.
  • sizeUnit (string, default "px"): The size unit of the marker. Only applies to Points. Valid values are:
    • px: Pixels
    • dp: Density pixels
    • m: Meters
  • icon (string, default null): The ID of the icon to use. Only applies to Points. TODO: Make this a string
  • iconSize (number, default size): The size of the icon in dp. Only applies to Points.
  • markerShape (string, default "circle" if icon is not provided, else "none"): The shape of the marker. Valid values are:
    • circle
    • none: Only the icon is rendered
  • isClickable (boolean, default false): A boolean that indicates if the feature should be clickable.
  • opacity (number, default 255): The opacity of the feature (between 0 and 255).

Other properties in the future may include description and coordinateProperties (properties of coordinates in a LineString/Polygon).

Clone this wiki locally