Add crossOrigin to examples using ol.style.Icon

This commit is contained in:
Frederic Junod
2017-03-31 13:38:28 +02:00
parent ce088d5919
commit a9adaf2052
3 changed files with 5 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ function createStyle(src, img) {
return new ol.style.Style({
image: new ol.style.Icon(/** @type {olx.style.IconOptions} */ ({
anchor: [0.5, 0.96],
crossOrigin: 'anonymous',
src: src,
img: img,
imgSize: img ? [img.width, img.height] : undefined