moves icon preloading to setShader
This commit is contained in:
parent
70a55ebfba
commit
508b75e4da
@ -91,6 +91,8 @@ var carto = global.carto || require('carto');
|
||||
this._sprites = [];
|
||||
this._shader = shader;
|
||||
this._Map = this._shader.getDefault().getStyle({}, { zoom: 0 });
|
||||
var img_names = this._shader.getImageURLs();
|
||||
this._preloadIcons(img_names);
|
||||
},
|
||||
|
||||
clearSpriteCache: function() {
|
||||
@ -124,8 +126,6 @@ var carto = global.carto || require('carto');
|
||||
var w = ctx.width = canvas.width = ctx.height = canvas.height = Math.ceil(canvasSize);
|
||||
ctx.translate(w/2, w/2);
|
||||
|
||||
var img_names = this._shader.getImageURLs();
|
||||
this._preloadIcons(img_names);
|
||||
var img_name = st["marker-file"] || st["point-file"];
|
||||
if (img_name && this._icons.itemsToLoad === 0) {
|
||||
var img = this._icons[img_name];
|
||||
|
Loading…
Reference in New Issue
Block a user