Add typecast to icon example
This commit is contained in:
@@ -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({
|
||||||
|
|||||||
Reference in New Issue
Block a user