Pesky error, that I'm having a hard time getting past. I'm using the JavaScript API 4.8 to create a 2D web map with some relatively simple layers, and hopefully simple labels. For labeling in particular, I apparently need to enable WebGL rendering of my layers. With a simple renderer, my layers draw fine. As soon as I add the requisite WebGL-enabling section though, in the proper location in my header, rendering fails:
<script>
var dojoConfig = {
has: {
"esri-featurelayer-webgl": 1
}
};
</script>
If I look at my console in Chrome, I get:
The WebGL samples work fine, and do not give this error.
Might anyone have an insight?
Thanks in advance.
Solved! Go to Solution.
Thank you, Rene. I think you've got me headed down the right path. I followed that link and now have a better understanding of supported fonts for what I'm trying to achieve. What was still confusing to me though was that I could find no reference to Tahoma in my label class or anywhere on the page for that matter. I could completely comment out my label class and all references to labeling, and still get the error. Then the light bulb... I was able to confirm a reference to Tahoma Bold in my service definition. This traces back to label setup in ArcPro. So, my next task is to address that, and surely/hopefully that will solve the problem. - thanks again
It doesn't look like tahoma is currently a supported font family.
Labeling | ArcGIS API for JavaScript 4.8
Can you try with one of the fonts on that list and see if that works, thanks!
Thank you, Rene. I think you've got me headed down the right path. I followed that link and now have a better understanding of supported fonts for what I'm trying to achieve. What was still confusing to me though was that I could find no reference to Tahoma in my label class or anywhere on the page for that matter. I could completely comment out my label class and all references to labeling, and still get the error. Then the light bulb... I was able to confirm a reference to Tahoma Bold in my service definition. This traces back to label setup in ArcPro. So, my next task is to address that, and surely/hopefully that will solve the problem. - thanks again
Hey Dan, what solution did you come up with for this? I'm getting the similar and innocuous seeming error:
It doesn't seem to "hurt" anything since it falls back to another font. But I figured there is probably a way to override the font spec from the map services (which, as you said is generated in Pro) with some JSAPI for text labels.
My services are relatively simple, and I control them, so I went back into Pro, changed all of my label fonts to get rid of tahoma, and re-published the services.
Thanks, Dan. I haven't dug too deep into which fonts are "allowed", nor did I create the original maps behind the map services. I'm a little surprised that seemingly common fonts like "Arial something" wouldn't be available. But I'll see what I can learn. Thanks for chiming in.
Here is the official list of which fonts are already hosted by Esri and can be used immediately:
The code snippets are really helpful to make sure you are calling the font resource by the appropriate name.