Refactor mouse position control to use postrender event

This commit is contained in:
Tom Payne
2013-01-15 20:47:25 +01:00
parent 5d43aa22d4
commit 11ec1de89b
3 changed files with 51 additions and 86 deletions

View File

@@ -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();