Description
There is an issue with showing lat, lng mouse coords for custom geographic CRSs rather then 4326.
How to reproduce
- Define a geographic CRS in localConfig in projectionDefs and add it to MousePosition and CRSSelector plugins like:
"projectionDefs": [
{
"code": "EPSG:4258",
"def": "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs +type=crs +axis=neu",
"extent": [-180, -90, 180, 90],
"worldExtent": [-180, -90, 180, 90]
}],
{
"name": "MousePosition",
"cfg": {
"editCRS": true,
"showLabels": true,
"showToggle": true,
"filterAllowedCRS": [ "EPSG:4258"],
"additionalCRS": { "EPSG:3857": {"label": "WEB MERCATOR"}, "EPSG:4326": {"label": "WGS84"}, "EPSG:4258": {"label": "ETRS89"}}
}
}
{
"name": "CRSSelector",
"cfg": {
"availableProjections": [
{ "value": "EPSG:4326", "label": "WGS84" },
{ "value": "EPSG:3857", "label": "WEB MERCATOR" },
{ "value": "EPSG:4258", "label": "Custom Geographic CRS" },
],
"allowedRoles": ["ADMIN","USER"]
}
},
- Press on the mouse position button to show the list and the mouse coords
- select from the list 'Custom Geographic CRS'
- try to move the mouse via map
The mouse position not updated for the provided CRSs is a regression issue due to this PR #11514
The PR handle direct return here for x,y even if units is degrees like our case
|
return {x: reprojected.x, y: reprojected.y, z}; |
Expected Result
The lat, lng coords should be appeared properly while moving the mouse on map
Current Result
showing with zeros values not updating them
Browser info
(use this site: https://www.whatsmybrowser.org/ for non expert users)
| Browser Affected |
Version |
| Internet Explorer |
|
| Edge |
|
| Chrome |
|
| Firefox |
|
| Safari |
|
Other useful information
Description
There is an issue with showing lat, lng mouse coords for custom geographic CRSs rather then 4326.
How to reproduce
The mouse position not updated for the provided CRSs is a regression issue due to this PR #11514
The PR handle direct return here for x,y even if units is degrees like our case
MapStore2/web/client/components/mapcontrols/mouseposition/MousePosition.jsx
Line 82 in d686c38
Expected Result
The lat, lng coords should be appeared properly while moving the mouse on map
Current Result
showing with zeros values not updating them
Browser info
(use this site: https://www.whatsmybrowser.org/ for non expert users)Other useful information