enhance tile-debug readability
this commit enhances the readability of tile debug coordinates by adding a stroke for better readability on aerial imagery and a maxWidth for high zoom levels
This commit is contained in:
@@ -55,10 +55,12 @@ class LabeledTile extends Tile {
|
||||
context.strokeRect(0.5, 0.5, tileSize[0] + 0.5, tileSize[1] + 0.5);
|
||||
|
||||
context.fillStyle = 'grey';
|
||||
context.strokeStyle = 'white';
|
||||
context.textAlign = 'center';
|
||||
context.textBaseline = 'middle';
|
||||
context.font = '24px sans-serif';
|
||||
context.fillText(this.text_, tileSize[0] / 2, tileSize[1] / 2);
|
||||
context.font = 'bold 24px sans-serif';
|
||||
context.fillText(this.text_, tileSize[0] / 2, tileSize[1] / 2, tileSize[0]);
|
||||
context.strokeText(this.text_, tileSize[0] / 2, tileSize[1] / 2, tileSize[0]);
|
||||
|
||||
this.canvas_ = context.canvas;
|
||||
return context.canvas;
|
||||
|
||||
Reference in New Issue
Block a user