uses radius from cartocss renderer
This commit is contained in:
parent
fa5791483e
commit
9486bd9667
@ -86,5 +86,6 @@
|
||||
module.exports = {
|
||||
renderPoint: renderPoint,
|
||||
renderSprite: renderSprite,
|
||||
renderRectangle: renderRectangle
|
||||
renderRectangle: renderRectangle,
|
||||
maxSpriteRadius: MAX_SPRITE_RADIUS
|
||||
};
|
||||
|
@ -137,8 +137,8 @@ var Filters = require('./torque_filters');
|
||||
if (qualifiedUrl && this._iconsToLoad <= 0 && this._icons[qualifiedUrl]) {
|
||||
var img = this._icons[qualifiedUrl];
|
||||
|
||||
var dWidth = Math.min(st['marker-width'] * 2 || img.width, this.options.maxSpriteSize || 512);
|
||||
var dHeight = Math.min((st['marker-height'] || dWidth) * (img.width / img.height), this.options.maxSpriteSize || 512);
|
||||
var dWidth = Math.min(st['marker-width'] * 2 || img.width, cartocss.maxSpriteRadius * 2);
|
||||
var dHeight = Math.min((st['marker-height'] || dWidth) * (img.width / img.height), cartocss.maxSpriteRadius * 2);
|
||||
|
||||
canvas.width = ctx.width = dWidth;
|
||||
canvas.height = ctx.height = dHeight;
|
||||
|
Loading…
Reference in New Issue
Block a user