Refactor mouse position control to use postrender event
This commit is contained in:
@@ -43,7 +43,7 @@ domMap.getControls().push(new ol.control.MousePosition({
|
||||
coordinateFormat: ol.Coordinate.toStringHDMS,
|
||||
projection: ol.Projection.getFromCode('EPSG:4326'),
|
||||
target: document.getElementById('domMousePosition'),
|
||||
undefinedHtml: ' '
|
||||
undefinedHTML: ' '
|
||||
}));
|
||||
|
||||
var webglMap = new ol.Map({
|
||||
@@ -59,7 +59,7 @@ webglMap.getControls().push(new ol.control.MousePosition({
|
||||
coordinateFormat: ol.Coordinate.toStringHDMS,
|
||||
projection: ol.Projection.getFromCode('EPSG:4326'),
|
||||
target: document.getElementById('webglMousePosition'),
|
||||
undefinedHtml: ' '
|
||||
undefinedHTML: ' '
|
||||
}));
|
||||
|
||||
var keyboardInteraction = new ol.interaction.Keyboard();
|
||||
|
||||
Reference in New Issue
Block a user