首页 > 解决方案 > 如何防止 OpenLayers 应用像素提示?

问题描述

我正在使用 OpenLayers 5.3.0,我发现它将像素提示应用于样式。两个同心圆不是完全居中的。

这是样式呈现特定功能的代码:

style = [
            new Style({
                image: new Circle({
                    radius: orangeRadius,
                    fill: new Fill({
                        color: '#f4b04a'
                    }),
                    anchor: [0.5, 0.5],

                }),
            })
            , new Style({
                image: new Circle({
                    radius: greenRadius,
                    stroke: new Stroke({
                        color: '#48bfa5'
                        , width: 3
                    }),
                    anchor: [0.5, 0.5],

                }),
            })
        ];

这就是我得到的:

在此处输入图像描述

如何禁用像素提示?

谢谢!

标签: javascriptopenlayersopenlayers-5

解决方案


推荐阅读