It could be useful to show pins on top of routes so that an emoji can describe the route as well as a subtitle can be added with eg. how many km’s the route is.
The following formula will only apply a pin on top of the route if there is a route (length != nil) and will then apply colours to the markers and routes that it gets from the category field.
length != nil
? ([pin(category[0][0]).markerColor(Color(category)), geometry.strokeColor(Color(category))])
: (pin(category[0][0]).markerColor(Color(category)))
Find an example in use here: https://mapar.one/c/B58B3LkCzzfd