Add typecast to icon example

This commit is contained in:
Éric Lemoine
2014-01-08 00:44:00 +01:00
parent 1acdef835d
commit 5efc692b9d

View File

@@ -18,12 +18,12 @@ var raster = new ol.layer.Tile({
}); });
var styleArray = [new ol.style.Style({ var styleArray = [new ol.style.Style({
image: new ol.style.Icon({ image: new ol.style.Icon(/** @type {olx.style.IconOptions} */ ({
anchor: [0.5, 46], anchor: [0.5, 46],
anchorXUnits: 'fraction', anchorXUnits: 'fraction',
anchorYUnits: 'pixels', anchorYUnits: 'pixels',
src: 'data/icon.png' src: 'data/icon.png'
}) }))
})]; })];
var vector = new ol.layer.Vector({ var vector = new ol.layer.Vector({