A shield renderer configured from a JSON specification

Example

const shields = {
"US:I": {
textColor: Color.shields.white,
spriteBlank: ["shield_us_interstate_2", "shield_us_interstate_3"],
textLayout: textConstraint("southHalfEllipse"),
padding: {
left: 4,
right: 4,
top: 6,
bottom: 5,
},
}
};

const shieldRenderer = new ShieldRenderer(shields, routeParser)
.filterImageID(shieldPredicate)
.filterNetwork(networkPredicate)
.renderOnMaplibreGL(map)
.onShieldDefLoad((shields) => afterShieldRendererLoads(shields)); //Post config

Hierarchy

Constructors

Methods

Generated using TypeDoc