Hello,
I am currently using WAB Dev 2.12 and am looking to change the default marker from a black dot to hollow. I was able to partially do this. On line 374, I changed the SimpleMarkerSymbol from 'Style_SOLID' to 'Style_NULL. This did make my marker a hollow fill but I still have a black circle (with a hollow fill). I've been playing around with this section for quite a while now and have been unable to successfully hollowing out the outline as well. Any help would be greatly appreciated.
Thanks,
Craig
Solved! Go to Solution.
In that case the just do this:
convertedSource.highlightSymbol = new SimpleMarkerSymbol(
SimpleMarkerSymbol.STYLE_CIRCLE, 10,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0, 255, 255]),2),
new Color([0, 0, 0, 0])
);
Notice the addition of one extra 0 in the last Color class this sets the makers fill to black with an alpha of 0.
Craig,
So what are you really wanting? You said "default marker from a black dot to hollow". This to me would be a point with a color set to 0 opacity and an outline. Is that what you are after?
Robert,
Sorry for the confusion. Yes, this is what I am looking to accomplish.
Thanks,
Craig
In that case the just do this:
convertedSource.highlightSymbol = new SimpleMarkerSymbol(
SimpleMarkerSymbol.STYLE_CIRCLE, 10,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0, 255, 255]),2),
new Color([0, 0, 0, 0])
);
Notice the addition of one extra 0 in the last Color class this sets the makers fill to black with an alpha of 0.
Hello Robert,
I have some code to add my own symbol when an address is found. So I would like to make the default black symbol be transparent.
I am using WAB 2.16. When I run debugging tool in the widget.js for search widget, I don't see the debugging stopped at those lines which the "convertedSource.highlightSymbol" is assigned (convertedSource.highlightSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE,) at line 383 and line 401. The debugging doesn't stop at if statement ( if(sourceLayerInfo) ) at line 381. It looks like the small black dot is added at another location. Do you know where is it? thanks.
Helen,
You will only hit those lines if you specified a search layer. If you are only using the locator service then those lines will not be hit.
Thank you, Robert. Do you know where to customize the symbol after an address is located with a geocoding service in the search widget?
Helen
I have never tried that but I assume that you need to define a highlightSymbol on the locator source. I don't believe that it has one specified in the code so it just uses the default of the search dijit from the JS API.
Thanks again for all your assistance Robert!