OpenLayers, Geoserver: TileWMS are displaying wrong

☆樱花仙子☆ 提交于 2020-01-07 04:08:05

问题


I'm trying to display some WMS with tiles, but at every zoom (in or out) the images are displaying wrong, with wrong proportions. This is how I'm creating the tile:

    var map = this.state.map;
    var layers =
        new ol.layer.Tile({
            source: new ol.source.TileWMS({
                url: 'http://XX.XX.XX:8080/geoserver/cite/wms',
                params: {'LAYERS': 'cite:clientes_ex', 'TILED': true, 'VERSION': '1.3.0',
                    'FORMAT': 'image/png8', 'WIDTH': 256, 'HEIGHT': 256, 'CRS': 'EPSG:3857'},
                serverType: 'geoserver'
            })
        })
    map.addLayer(layers);

This is what happens.

This is another example, in zooms very far way from the map:

Any idea how could I fix it?

来源:https://stackoverflow.com/questions/44662136/openlayers-geoserver-tilewms-are-displaying-wrong

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!