AnsweredAssumed Answered

Issue with TextSymbol HaloSize in Chrome

Question asked by greenkarmic on Jan 12, 2017
Latest reply on Jan 19, 2017 by tsellste

I'm having an issue with the Halo size of TextSymbols in Chrome. I haven't been able to see a pattern yet, but it happens frequently. Often the HaloSize seems to be 1 less then asked. For instance if I ask for a HaloSize of 1, some will be at 0. If I ask for a HaloSize of 2, some will be at 1. If I load the exact same graphics in Firefox, the Halos are fine.

 

Here's screenshots from our application. In this specific case we add TextSymbols to measure polygon segments. All properties are the same for each TextSymbol, except for the angle and actual text used. Note that the surface labels in the middle of each polygons never have this issue, only the ones along each polygon segments. In this shot there 3 symbols that lost their halo in Chrome.

 

(Although this might be a bug specific to Chrome, I still thought I'd ask here and see if others got the same issue.)

 

We're using the API 3.19

 

Chrome

Chrome

 

Firefox

Firefox

 

Thanks,

 

Yohan

 

UPDATE 2017-08-13

 

So I finally got some time to look at this issue again, at least to find a workaround. I ended just doing a lot of tests and compiling a list of the problem angles, then just increasing the halo size by 1 for those angles. Seems to work fine.

 

if (has("chrome")){
var problemAngles = [8, 11, 27, 28, 34, 37, 40, 43, 44, 46, 47, 50, 53, 56, 62, 63, 79, 82, 98, 101, 117, 118, 124, 127, 130, 133, 134, 136, 137, 140, 143, 146, 152, 153, 169, 172, 180, 188, 191, 207, 208, 214, 217, 220, 223, 224, 226, 227, 230, 233, 236, 242, 243, 259, 262, 278, 281, 297, 298, 304, 307, 310, 313, 314, 316, 317, 320, 323, 326, 332, 333, 349, 352];
var haloSize = problemAngles.indexOf(angle) > -1 ? 2 : 1;
}

 

Not that this list does not handle negative angles, but you can just add 180 when this is the case.

 

Hope this helps someone.

Outcomes