fixed position in point renderer
This commit is contained in:
parent
0270d34293
commit
bbf9db6046
@ -6,7 +6,7 @@
|
||||
var DEFAULT_CARTOCSS = [
|
||||
'#layer {',
|
||||
' marker-fill: #662506;',
|
||||
' marker-width: 20;',
|
||||
' marker-width: 4;',
|
||||
' [value > 1] { marker-fill: #FEE391; }',
|
||||
' [value > 2] { marker-fill: #FEC44F; }',
|
||||
' [value > 3] { marker-fill: #FE9929; }',
|
||||
@ -103,9 +103,9 @@
|
||||
if(!sp) {
|
||||
sp = sprites[c] = this.generateSprite(c, tile);
|
||||
}
|
||||
var x = tile.x[posIdx] - (sp.width >> 1);
|
||||
var y = tile.y[posIdx] - (sp.height >> 1);
|
||||
ctx.drawImage(sp, x*res, 255 - y*res);
|
||||
var x = tile.x[posIdx]*res - (sp.width >> 1);
|
||||
var y = (256 - res - res*tile.y[posIdx]) - (sp.height >> 1);
|
||||
ctx.drawImage(sp, x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user