OpenLayers 4中的一个像素大小的分划

OpenLayers 4中的一个像素大小的分划,openlayers,Openlayers,我使用OpenLayers来可视化巨大的平铺图像。我可以放大到可以区分图片像素的程度。在这种缩放状态下,我希望添加一个功能,在这里我可以显示某种分划,以清晰区分像素 这看起来就像显示一些网格线一样 考虑到文档,我尝试添加以下内容: // Create the graticule component var graticule = new ol.Graticule({ // the style to use for the lines, optional. targetSize: 1,

我使用OpenLayers来可视化巨大的平铺图像。我可以放大到可以区分图片像素的程度。在这种缩放状态下,我希望添加一个功能,在这里我可以显示某种分划,以清晰区分像素

这看起来就像显示一些网格线一样

考虑到文档,我尝试添加以下内容:

// Create the graticule component
var graticule = new ol.Graticule({ 
  // the style to use for the lines, optional.
   targetSize: 1,
   strokeStyle: new ol.style.Stroke({
     width: 1
   })
});
在文档中指出,
targetSize
是分划单元的目标大小,以像素为单位。默认值为100像素。。所以根据我的理解,如果我把它设为1,它应该显示在1像素的边界上,而不是更大

我应该如何添加这样的功能