Returns a new Highlighter instance for the given map widget model.
The map widget model on which highlights should be drawn.
Optional
options: HighlighterFactoryOptionsadditional options
// inject factory as `highlights.HighlighterFactory`
// inject model as `map-widget.MapWidgetModel`
const highlighter = factory.forMapWidgetModel(model);
highlighter.highlight(graphic);
// later clean up
highlighter.destroy();
const graphicsLayer = new GraphicsLayer();
const graphics = graphicsLayer.graphics;
const highlighter = 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"
.