나는 이것을 이해하지 못한다 : 나는 고해상도 이미지가있는 OpenLayers를 사용하고 있는데, 나는 Microsoft Deep Zoom 형식으로 타일링했다. 이것은 256x256 픽셀 타일에서 잘 작동합니다. 그러나 이미지 타일은 192x192 픽셀 타일로되어 있습니다.OpenLayers tile-size 192
Microsoft Deep Zoom 형식으로, 예를 들어, 지. 이미지는 7,360 x 4,912 픽셀 (너비 x 높이)입니다. 확대/축소 수준은 0 - 13입니다 (13은 전체 해상도 이미지 임). OpenLayers에서 줌 레벨 0 = 8 Deep Zoom을 설정했습니다. 이 줌 레벨에서 이미지의 해상도는 230 x 154 픽셀입니다. OpenLayers는 256x256 픽셀 타일을 사용하여 줌 레벨 0에서 한 타일 만 올바르게 요구 한 다음 줌 레벨 1에서 네 타일을 요구합니다.
그러나 192x192 타일의 경우 확대/축소 레벨 0 (2 개는 존재하지 않음)에서 4 개의 타일을로드합니다. 그 해결책이 있습니까?
function startOL(tileinput){
var TileSize = tileinput;
var MaxZoom = 5;
var MinZoom = 0;
//var PyramidWidth = TileSize * (1 << MaxZoom);
var width = 12288;//7360
var height = 4912;//4912;
var extent = [0, 0, width, height];
var center = ol.extent.getCenter(extent);
var projection = new ol.proj.Projection({
code: 'pixels',
units: 'pixels',
extent: extent
});
var map = new ol.Map({
target: 'map',
controls: ol.control.defaults({attribution: false}),
layers: [
new ol.layer.Tile({
wrapX: false,
extent: [0, 0, width , height],
source: new ol.source.XYZ({
tileUrlFunction: function(tileCoord, pixelRatio, projection){
if (!tileCoord) { return ""; }
// tileCoord is representing the location of a tile in a tile grid (z, x, y)
var z = tileCoord[0];
var x = tileCoord[1].toString();
var y = tileCoord[2].toString();
// add the part /1/1-0.jpg, --> {z}/{x}-{y}.jpg
z = z+7;
var path = "./EY1_2481-"+tileinput.toString()+"/EY1_2481-"+tileinput.toString()+"_files";
path += '/' + z.toString() + '/' + x + '_' + y + '.jpeg';
return path;
},
maxZoom: MaxZoom,
minZoom: MinZoom,
projection: projection,
tileSize: TileSize,
logo:false
})
})
],
view: new ol.View({
center: ol.extent.getCenter(extent),
zoom: 0,
maxZoom: MaxZoom,
minZoom: MinZoom,
projection: projection
// maxResolution:maxRes
})
});
}
$('#256').click(function(){
$('.ol-viewport').remove();
$('#size').text('256');
startOL(256);
});
$('#192').click(function(){
$('.ol-viewport').remove();
$('#size').text('192');
startOL(192);
});