Merge pull request #1483 from elemoine/vector-api-anchor-units

[vector-api] Support different anchor units in ol.style.Icon
This commit is contained in:
Éric Lemoine
2014-01-08 01:13:19 -08:00
5 changed files with 97 additions and 24 deletions

View File

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