Default labels are hard to read on a light background

Try this: load up the “KML” Sandcastle demo, then flip over to the Bing Maps Roads provider. Now, zoom in on a “facility” that’s in the middle of nowhere – there are a lot of them! – and you’ll see something like this:

image

Eeesh.

Compare that with the same placemarker on Google Maps (the user-facing service, not loaded via KML, but bear with me):

image

Of course, choosing the right label style for a given basemap takes time and consideration, but the KMLDataSource does not allow for customization of Placemark labels, it just uses mostly the defaults, with the “fill and outline” style.

I wanted to suggest that part of the problem is with choosing a sensible default for label style. In my experience, dark text with a light outline is more versatile than the reverse, and manages to remain legible on both dark and light backgrounds. Also, the default outline width appears to be 1 – experimentally, it seems like 3 or 4 does a better job of providing contrast when the fill color is too similar to the background. With those changes, you get

image

Not perfect, but much better. It also works great on a medium background:

image

It even mostly manages on a black map:

image

How would the team (and community) feel about making some changes to the defaults? If not for LabelGraphics itself, then at least for the base label settings in KMLDataSource? I think most important would be increasing the outlineWidth (4 seems sensible). It would also be great to either swap fill and outline defaults, or perhaps think about a way to expose a property that can do this conditionally.

Hi James,

Great suggestions and thank you for bringing this up. I agree that it would be easier on the eyes to default the fill and outline colors of the labels to what you suggested. We don’t have the change on our road map (you can add the suggestion by opening an issue in the Cesium repository).

It is possible to change the default color and outline of the billboard labels by iterating through them after loading the data: Sandcastle. This will produce results like below:
image
image

I’m happy to file an issue (or even a PR), but I thought it probably merited a broader discussion, ideally with community input. I assumed that the defaults were chosen for a reason, and I didn’t want to blunder in demanding changes before I asked about it.