Define Extent of tiled Image in Openlayers 3

المشرف العام

Administrator
طاقم الإدارة
I am trying to display a tiled image in Openlayers 3 with a polarstereographic projection. I have a kml border overlay for checking if everything is fine. The whole thing works fine with a StaticImg, but not with the XYZ source. I am pretty sure the extent is missing. How can I define an extent with a tiled layer?

Works fine:

var basemap=new ol.layer.Image({ source: new ol.source.ImageStatic({ url: imgName, imageSize: [imgWidth,imgHeight], projection: cproj, imageExtent: cproj.getExtent() }) });I can see the KML layer and the tiled image, but it is positioned on the wrong place:

var basemap = new ol.layer.Tile({ source: new ol.source.XYZ({ url: imgName, tilePixelRatio: 1, minZoom: minzoom, maxZoom: maxzoom, projection: cproj }) });Thanks in advance,Greets claxn



أكثر...
 
أعلى