Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
493 views
in Technique[技术] by (71.8m points)

OpenLayers, Geoserver: TileWMS are displaying wrong

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. enter image description here

This is another example, in zooms very far way from the map: enter image description here

Any idea how could I fix it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...