OpenLayers 官网提供了自带的属性添加网格信息,当地图作为底图时,如果添加了过多的图层,各图层之间由于冲突不会显示出来,下面的方法能很好的解决。
代码如下:
var graticuleLayer = new ol.Graticule({
strokeStyle: new ol.style.Stroke({
color: 'rgba(12, 12, 12, 0.8)',
width: 0.6
}),
targetSize: 100
});
graticuleLayer.setMap(map);
转载于:https://www.cnblogs.com/04180821liu/p/9477448.html
最后
以上就是大气大侠最近收集整理的关于OpenLayers 添加网格信息的全部内容,更多相关OpenLayers内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复