I am developing an app which displays shaded country boundaries for selected countries. Most of the time, all of the country boundaries are turned off. I am using a UniqueValueRenderer to then "turn on" one or a few selected countries and display them shaded with an outline.My default "empty" symbol is currently:
var outlineNull = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_NULL, '#000000', 0);
mapLayerCountries.defSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_NULL, outlineNull, '#000000');
This works, but is currently non-optimal. Looking at the svg in Firebug, I see that each invisible country still has its huge outline, in svg code that looks like this:
<path fill="none" fill-opacity="0" stroke="none" stroke-opacity="0" stroke-width="1"
stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4"
path="M 195,333 195,333 195,333 195,333 195,333 195,334 195,333 195,333 195,334 196,334 196,333
196,333 196,333 196,333 197,333 197,333 197,333 197,333 197,334 195,334 195,334 195,334 195,334
194,334 192,334 192,334 192,334 192,334 191,335 191,335 190,335 190,335 190,335 190,335 189,335
188,336 188,336 188,336 188,336 187,336 .......
How do I make a truly NULL default symbol which results in no svg being generated for the countries which are not selected? I have tried using undefined for the symbol but the toolkit complains "sym is undefined".Thank you,Rex BradfordDirect Relief International