Skip to Content
APIAssetsFunction: createRouteAnimationIconDataUrl()

Function: createRouteAnimationIconDataUrl()

function createRouteAnimationIconDataUrl(config?): string

Generates a data URL for the route animation icon SVG with customizable appearance.

Parameters

config?

RouteAnimationIconConfig

Optional configuration for the icon appearance.

Returns

string

A data URL string that can be used as the src attribute of an <img> element.

Example

// Use default appearance (blue background, white arrow) const defaultIcon = createRouteAnimationIconDataUrl() // Customize colors const customIcon = createRouteAnimationIconDataUrl({ backgroundColor: "#FF5733", arrowColor: "#000000", }) // Add border and blur const styledIcon = createRouteAnimationIconDataUrl({ backgroundColor: "#0076B6", arrowColor: "#FFFFFF", borderWidth: 2, borderColor: "#000000", blur: 1, })
Last updated on