... even if RendererSettings symbology standard has been set to RendererSettings.Symbology_2525C.
This is for getBasicSymbolID, defined in SymbolUtilities.js, when the scheme is S, O, or E.
Here are some options for ways I think this could be fixed:
Rather than checking both standards in a for loop, check only symStd. It appears that hasUnitDef will handle the case where symStd is undefined. (This has the added benefit of simplifying the logic quite a bit).
Still check standards in a for loop, but if symStd is undefined, set it to RendererSettings.getSymbologyStandard() instead of 0
Inside the for loop, you could check for UnitDefTable.hasSymbolMap(symStd) before doing anything else
Update the developer's guide to say that symStd is a mandatory parameter
I think that I like (1) the most, but I leave the decision to your wise judgment. :smile:
I did a combination of 1-3. No for loop, setting symStd if undefined, also doing the symbolMap check in case someone sets symStd to an erroneous value.
... even if
RendererSettings
symbology standard has been set toRendererSettings.Symbology_2525C
.This is for
getBasicSymbolID
, defined inSymbolUtilities.js
, when thescheme
isS
,O
, orE
.Here are some options for ways I think this could be fixed:
for
loop, check onlysymStd
. It appears thathasUnitDef
will handle the case wheresymStd
isundefined
. (This has the added benefit of simplifying the logic quite a bit).for
loop, but ifsymStd
isundefined
, set it toRendererSettings.getSymbologyStandard()
instead of 0UnitDefTable.hasSymbolMap(symStd)
before doing anything elsesymStd
is a mandatory parameterI think that I like (1) the most, but I leave the decision to your wise judgment. :smile: