[*] providing tilePoint/pixelPoint pairs to client draw function
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user