From 464ce13b133b20f35600a407a86ccaf9f7296c86 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Fri, 7 Aug 2015 11:56:11 +0200 Subject: [PATCH] Mark ol.style.Icon#load() @api We currently rely on the renderer to load the styles it intents to use. In Ol3-Cesium we want to allow different styles for 3D and for 2D. This commit fixes the issue by allowing application code to explicitely initiate the loading process. --- src/ol/style/iconstyle.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ol/style/iconstyle.js b/src/ol/style/iconstyle.js index 1c4f2bb11a..92e72face4 100644 --- a/src/ol/style/iconstyle.js +++ b/src/ol/style/iconstyle.js @@ -347,6 +347,10 @@ ol.style.Icon.prototype.listenImageChange = function(listener, thisArg) { /** * Load not yet loaded URI. + * When rendering a feature with an icon style, the vector renderer will + * automatically call this method. However, you might want to call this + * method yourself for preloading or other purposes. + * @api */ ol.style.Icon.prototype.load = function() { this.iconImage_.load();