Hello , using this
image : Cesium.writeTextToCanvas(‘Test’, { font: ‘24px san-serif’,
fillColor : Cesium.Color.DIMGREY,
outlineColor : Cesium.Color.RED,
outlineWidth : 2,
style : Cesium.LabelStyle.FILL_AND_OUTLINE
}
),
``
but only the font and fillColor options are working. Am i doing something wrong or are only certain text options supported within writeTextToCanvas?
Thanks
hannah
August 12, 2016, 2:44pm
2
Hello,
writeTextToCanvas doesn’t take outlineColor, outlineWidth, or style parameters.
Is there any reason you want to use that function instead of using a label? Here is an example for adding a label to the globe: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Labels.html&label=Showcases
Best,
Hannah
Thanks, but I want to orient the text along a path (like google maps orients a street name along the street) and I can’t do that with the label function. writeTextToCanvas seems to work ok but for orienting to a specific heading but it’s hard to read text without an outline for my project.
-j
hannah
August 18, 2016, 6:18pm
4
writeTextToCanvas doesn’t have outlineColor and outlineWidth properties. I think you can use strokeColor and strokeWidth instead.
See the doc above the function: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/writeTextToCanvas.js#L22-L33
However, a better solution would be for use to have axis align support to rotate labels
I wrote up this issue for us to look into adding it: https://github.com/AnalyticalGraphicsInc/cesium/issues/4215
Best,
Hannah