I'm displaying a pop up when a feature is selected on feature layer. I'm also highlighting the polygon boundary with a red line but when the pop up appears the highlighter changes to aqua color which i'm assuming is the default behavior. The highlighter goes back to red as soon as the pop up is closed .

enter image description here

Without PopUp

enter image description here

Is there a way to override the default feature highlighter behavior when the Pop Up is displayed or just not show that graphic at all?


When defining the popup, you can turn off the highlight by setting the highlight property to false or you can set a specific marker symbol, line symbol, or fill symbol


This ESRI example, Identify with Popup, demonstrates setting a custom highlight color. The relevant code is shown below. When the Popup is created, the fillSymbol option overrides the default aqua color with a SimpleFillSymbol object. The first color argument seen here is the outline color (red), and the second color argument is the 'fill' color or the shaded color over the polygon (yellow).

var popup = new Popup({
fillSymbol: new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
        new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
        new Color([255, 0, 0]), 2), new Color([255, 255, 0, 0.25]))
    }, domConstruct.create("div"));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.