2

I want show a PNG layer like this example

What I actually get is a smoothed image https://gyazo.com/4fa39774ca2fab1fc4d82ff558f120eb

This is unrelated with the zoom level because when I zoom in or zoom out the image keeps unchanged. So I suppose it's applied an interpolation function on it when loading.

My code

    var extent = _wktParser.readGeometry(_result.wkt).getExtent();
                 _imageLayer = new ol.layer.Image({
                                    name: 'Query',
                                    opacity: 0.8,
                                    map: _map,
                                    visible: true,
                                    source: new ol.source.ImageStatic({
                                              imageExtent : extent,
                                              projection : bbox.epsg,
                                              url : 'data:image/png;base64,'+ _result.image64
                                              })
                   });
_map.addLayer(_imageLayer);

I've already tried the solution from ahocevar in this post but I have the same result.

How can I disable this behavior?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.