天天看點

geowebcache釋出arcgis切片預覽出現NaN問題解決

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
    });
           

加載服務結果:

geowebcache釋出arcgis切片預覽出現NaN問題解決
GIS