Is it possible to change or remove the outline color when querying/selecting a feature? We have invisible polygons (no fill or outline color) which we want the user to be able to query and get a popup from in our web map. However, we don’t want the polygon to get selected with the default cyan color, since they are meant to be invisible. The map is an ArcGIS Online web map which is presented in a story map template, which we have downloaded to our web server. There is no “query”- or “onClick”-call in the js-code for the story map template, so we don’t know what to do?
Solved! Go to Solution.
Staffanstrops,
To change the color of the selection you would set the fillsymbol or the linesymbol of the popup.
//initialize popup window
var popup = new esri.dijit.Popup({
fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25]))
}, dojo.create("div"));
You can also find out how to disable the selection in the popup documentation.
Here is the documentation reference:
Staffanstrops,
To change the color of the selection you would set the fillsymbol or the linesymbol of the popup.
//initialize popup window
var popup = new esri.dijit.Popup({
fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25]))
}, dojo.create("div"));
You can also find out how to disable the selection in the popup documentation.
Here is the documentation reference:
Wow, much simpler than we expected ! Thanks Robert!
Do I just create the popup after I create the map, or do I assign it to a featurelayer?
Marc,
Just use map.infowidow.fillSymbol = x;
Hi Robert,
I am having this same issue. What folder or file contains the "
as shown earlier. I am using the out of the box Search and want the item found to just be highlighted with no fill covering the location.
I've looked int the Config for the Search and Selection widgets, but do not see the popup file.
Thanks,
Leroy,
OK, I see the issue is you are asking about WAB but you are in the native JS API space. Your question is better placed and already answered in the WAB space.
Thanks Robert.
That takes care of what I needed.
Leroy A. Christophersen
Sent from my Wireless smartphone
Thanks Robert.
I checkedout the answer link. Is there a better tool for reviewing and editing the .js file other than notepad++?
Using notepad++ lines of code run together. Most of the other languages, it works quite nicely.
Leroy A. Christophersen
Sent from my Wireless smartphone
Leroy,
The only reason the code wold be running together in Notepad++ is you are trying to edit minified code (I.e. code downloaded from AGOLs WAB). If you want to make code changes you really need to get WAB Dev and start from there.