Example: <caption>highlighter for mapwidget model</caption>
// inject factory as `highlights.HighlighterFactory` // inject model as `map-widget.MapWidgetModel` consthighlighter = factory.forMapWidgetModel(model); highlighter.highlight(graphic); // later clean up highlighter.destroy();
Example: <caption>highlighter using custom collection</caption>
constgraphicsLayer = newGraphicsLayer(); constgraphics = graphicsLayer.graphics; consthighlighter = factory.forMapWidgetModel(model, { graphicsCollectionResolver: (model) =>graphics }); // now highlights are added to the custom GraphicsLayer.
Factory to create new Highlighter instances. It can be injected as a component via
"highlights.HighlighterFactory"
.