Use anchorXUnits and anchorYUnits in icon example
This commit is contained in:
@@ -19,6 +19,9 @@ 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({
|
||||||
|
anchor: [0.5, 46],
|
||||||
|
anchorXUnits: 'fraction',
|
||||||
|
anchorYUnits: 'pixels',
|
||||||
src: 'data/icon.png'
|
src: 'data/icon.png'
|
||||||
})
|
})
|
||||||
})];
|
})];
|
||||||
|
|||||||
Reference in New Issue
Block a user