Введение: Итак, клиент хочет использовать статический образ мира без подключения к tilserver.
Мы подготовили изображение (8192*5461)

И во время сопоставления точек мы заметили, что отображаемые точки сильно отклоняются
(Пример: Япония — 37,436, 139,30)

То же самое касается и других мест.
Моя реализация следующая, чего мне не хватает:
Код: Выделить всё
const imageGeoExtent = [-180, -90, 180, 90];
const projection = new Projection({
code: 'static-image-deg',
units: 'degrees',
global: true,
extent: imageGeoExtent,
});
const imageLayer = new ImageLayer({
source: new Static({
url: 'assets/images/map_full__mid_res.webp',
projection: projection,
imageExtent: imageGeoExtent,
}),
zIndex: 0,
});
this.map = new Map({
target: targetId,
layers: [imageLayer, this.vectorLayer],
view: new View({
projection: projection,
zoom: 0,
center: getCenter(imageGeoExtent),
minZoom: this.minZoom,
maxZoom: this.maxZoom,
}),
interactions: defaultInteractions({
mouseWheelZoom: false,
doubleClickZoom: false,
pinchZoom: false,
}),
});
Подробнее здесь: https://stackoverflow.com/questions/798 ... atic-image
Мобильная версия