1

Working with the last version of OpenLayers 3, I'm not able to load correctly a static image over the map. After some test (with similar configuration) I found that the image looks fine on OL2, while on OL3 it has a displacement of several kilometers, as you can see on the following image:

enter image description here

I've done a plunker with that example. Could it be a bug or I'm missing something? http://plnkr.co/lzAKNGdkXkz6ZCM9H6ml

/* OL3 */ var graphicOL3 = new ol.layer.Image({ source: new ol.source.ImageStatic({ url: 'https://raw.githubusercontent.com/VictorVelarde/ImagenEstuario/master/Composite.png', imageSize: [864, 1024], imageExtent: [-791350.472638389, 5376837.581117962, -778150.4726383891, 5398392.773800777] }) }); var osm = new ol.layer.Tile({ source: new ol.source.OSM() }); mapaOL3 = new ol.Map({ layers: [osm], target: 'mapaOL3', view: new ol.View({ center: [-784751.048, 5389384.957], zoom: 13 }) }); mapaOL3.addLayer(graphicOL3); 

1 Answer 1

0

Finally it was a bug of OL3 library. They resolved it on this ticket: https://github.com/openlayers/ol3/pull/4426 It´s not yet implemented on the last release version (3.11.2) so if you face this problem you have to point to the master: http://openlayers.org/en/master/build/ol.js

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.