Add default CSS style for mouse position
Missing CSS was confirmed with issue #680, this commit is to fix it and change ol-mouse-position class to ol-mouseposition. I choose for the moment the top right corner to display the coordinates from mouse position control because of potential conflict with the scaleline control.
This commit is contained in:
@@ -13,6 +13,8 @@ var map = new ol.Map({
|
||||
new ol.control.MousePosition({
|
||||
coordinateFormat: ol.coordinate.toStringHDMS,
|
||||
projection: 'EPSG:4326',
|
||||
// comment the following line to have the mouse position
|
||||
// be placed within the map.
|
||||
target: document.getElementById('mouse-position'),
|
||||
undefinedHTML: ' '
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user