[*] providing tilePoint/pixelPoint pairs to client draw function

This commit is contained in:
Gavin McDonald
2018-12-04 21:45:27 -05:00
parent 69cae5eb1a
commit ad4a16b796
2 changed files with 21 additions and 13 deletions

View File

@@ -224,6 +224,16 @@ export class Tessellate {
const height = canvas.height;
const width = canvas.width;
const corners = {
upperLeftX: 0,
upperLeftY: 0,
lowerRightX: width,
lowerRightY: height
};
const pointGroups = this.getTilePoints(corners)
.map(tilePoint => ({tilePoint, pixelPoint: this.tileToPixel(tilePoint)}));
this.settings.draw({
context,
@@ -233,12 +243,7 @@ export class Tessellate {
lastNow: context.lastUTC,
now: context.utc,
tilePoints: this.getTilePoints({
upperLeftX: 0,
upperLeftY: 0,
lowerRightX: width,
lowerRightY: height
}),
pointGroups,
});
}