review corrections
This commit is contained in:
@@ -810,8 +810,8 @@ class PluggableMap extends BaseObject {
|
|||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getPixelFromCoordinateExternal(coordinate) {
|
getPixelFromCoordinateExternal(coordinate) {
|
||||||
const userCoordinate = fromUserCoordinate(coordinate, this.getView().getProjection());
|
const viewCoordinate = fromUserCoordinate(coordinate, this.getView().getProjection());
|
||||||
return this.getPixelFromCoordinateInternal(userCoordinate);
|
return this.getPixelFromCoordinateInternal(viewCoordinate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import View from '../../../src/ol/View.js';
|
|||||||
import {LineString, Point} from '../../../src/ol/geom.js';
|
import {LineString, Point} from '../../../src/ol/geom.js';
|
||||||
import {focus} from '../../../src/ol/events/condition.js';
|
import {focus} from '../../../src/ol/events/condition.js';
|
||||||
import {defaults as defaultInteractions} from '../../../src/ol/interaction.js';
|
import {defaults as defaultInteractions} from '../../../src/ol/interaction.js';
|
||||||
import {get as getProjection, useGeographic, transform} from '../../../src/ol/proj.js';
|
import {get as getProjection, useGeographic, transform, clearUserProjection} from '../../../src/ol/proj.js';
|
||||||
import GeoJSON from '../../../src/ol/format/GeoJSON.js';
|
import GeoJSON from '../../../src/ol/format/GeoJSON.js';
|
||||||
import DragPan from '../../../src/ol/interaction/DragPan.js';
|
import DragPan from '../../../src/ol/interaction/DragPan.js';
|
||||||
import DoubleClickZoom from '../../../src/ol/interaction/DoubleClickZoom.js';
|
import DoubleClickZoom from '../../../src/ol/interaction/DoubleClickZoom.js';
|
||||||
@@ -774,6 +774,7 @@ describe('ol.Map', function() {
|
|||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
map.dispose();
|
map.dispose();
|
||||||
document.body.removeChild(target);
|
document.body.removeChild(target);
|
||||||
|
clearUserProjection();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('gets coordinates in user projection', function(done) {
|
it('gets coordinates in user projection', function(done) {
|
||||||
|
|||||||
Reference in New Issue
Block a user