support userProjection

This commit is contained in:
mike-000
2022-08-17 14:40:33 +01:00
parent edd28d7096
commit bfee7f184a
2 changed files with 67 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ import Event from '../events/Event.js';
import EventType from '../events/EventType.js';
import Interaction from './Interaction.js';
import {TRUE} from '../functions.js';
import {get as getProjection} from '../proj.js';
import {get as getProjection, getUserProjection} from '../proj.js';
import {listen, unlistenByKey} from '../events.js';
/**
@@ -178,8 +178,11 @@ class DragAndDrop extends Interaction {
const map = this.getMap();
let projection = this.projection_;
if (!projection) {
const view = map.getView();
projection = view.getProjection();
projection = getUserProjection();
if (!projection) {
const view = map.getView();
projection = view.getProjection();
}
}
let text;