geowebcache发布arcgis切片预览出现NaN问题解决

geowebcache发布arcgis切片预览出现NaN问题解决

服务预览:
问题

查看官网配置arcgis切片操作(https://www.geowebcache.org/docs/current/configuration/layers/arcgistilingschemes.html),与我的操作一致,但是预览不了,看到网上有说,geoserver预览使用openlayers3,所以无法预览。
使用openlayers v6.3.1版本加载该服务,加载成功。所以预览不了不影响服务调用。

var projection = new ol.proj.Projection({
        code: 'EPSG:4326',
        units: 'degrees',
        axisOrientation: 'neu'
    });

    let tilelayer = new ol.layer.Tile({
        source: new ol.source.TileWMS({
            url: 'http://localhost:8080/geowebcache/service/wms',
            params: {
                'LAYERS': 'tileserver',
                'FORMAT': 'image/png',
                'SRS': 'EPSG:4326',
                'VERSION': '1.0.0'
            },
            // 不要tileGrid会出现400
            tileGrid: new ol.tilegrid.TileGrid({
                resolutions: [0.019035688046642241,0.0095178440233211203,0.0047589220116605602,0.0023794610058302801,0.00118973050291514],
                tileSize: [256, 256],
                origin: [-400, 400]
            })
        })
    })

    var view = new ol.View({
        zoom: 7,
        center: [101.749275, 24.686393],
        projection: projection,
    });

    var map = new ol.Map({
        target: 'map',
        layers: [tilelayer],
        view: view
    });

加载服务结果: 在这里插入图片描述

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值