I try to receive the coordinates in lon/lat form an OpenLayer 5 map when i click on the map as an array or json with the values in order to set the map center to this clicked coordinates. I tried to get the coordinates by this
var mousePosition = new OlMousePosition({
coordinateFormat: createStringXY(2),
projection: 'EPSG:25832',
});
But where in mousePosition
are the coordinates stored? All examples I have found send the values via target:
into a HTML element.