-
-
Notifications
You must be signed in to change notification settings - Fork 151
Plugins
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
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, defaultnull): 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:soliddottedarrowdashedsquarediamondcross
-
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,6px for LineString): The stroke weight in dp. LineStrings are currently in pixels. -
size(number, default TODO): The size of the marker in the units ofsizeUnit. 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, defaultsize): The size of the icon in dp. Only applies to Points. -
markerShape(string, default"circle"ificonis not provided, else"none"): The shape of the marker. Valid values are:circle-
none: Only the icon is rendered
-
isClickable(boolean, defaultfalse): A boolean that indicates if the feature should be clickable. -
opacity(number, default255): 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).