Description
It is requested with this issue to improve the CoordinatesSearch tool to be able to use coordinates expressed in the selected Map CRS, now it is possible a search for coordinates in the defined on the map, now it's only possible by Lat/Long.

A proper entry in the current coordinate type selector (decimal/aeronautical) should allow to select the current Map CRS to setup the tool accordingly (e.g. use current Map CRS)

Thank into account that the map CRS can vary according to the CRS selected din the CRS Selector.
What kind of improvement you want to add? (check one with "x", remove the others)
Design
It would be good to implement the following UI/UX:

- Selecting "Current map CRS" the possibility to switch between decimal/aeronautical disappear from the UI and the tool setup change by switching to map CRS coordinates

- The "Current map CRS" is available only if the the current Map CRS is not the one normally used by decimal and aeronautical coordinates, which means EPSG:4326

-
As coordinate fields validator when "Current map CRS" is selected, the current one should be preserved which means:
- The entered value is a number
- The entered coordinates are within the CRS bounds
- Same decimal separators should be used according locale as is also for other plugins where geographic coordinates are exposed
-
Current functionalities have to be maintained also when "Current map CRS" is selected e.g. when search is performed, the tool has to add the marker to the map and center / zoom the point as usual
Other useful information
The functionality is actually implemented here:
https://github.com/geosolutions-it/MapStore2/blob/master/web/client/components/mapcontrols/searchcoordinates/CoordinatesSearch.js
zoomAndAddPoint already send the CRS. This action is actually intercepted by epics/search.js --> zoomAndAddPointEpic
|
export const zoomAndAddPointEpic = (action$, store) => |
|
action$.ofType(ZOOM_ADD_POINT) |
|
.switchMap(action => { |
|
const feature = { |
|
type: "Feature", |
|
geometry: { |
|
type: "Point", |
|
coordinates: [action.pos.x, action.pos.y] |
|
} |
|
}; |
|
|
|
const state = store.getState(); |
|
return Rx.Observable.from([ |
|
updateAdditionalLayer("search", "search", 'overlay', { |
|
features: [feature], |
|
type: "vector", |
|
name: "searchPoints", |
|
id: "searchPoints", |
|
visibility: true, |
|
style: state.search && state.search.style || defaultIconStyle |
|
}), |
|
zoomToPoint(action.pos, action.zoom, action.crs) |
|
]); |
|
}); |
|
|
The epic does 2 operation.
- Add a layer with the marker. This is in 4326, and should support also the map CRS (or be converted).
zoomToPoint should already support a different CRS
Description
It is requested with this issue to improve the CoordinatesSearch tool to be able to use coordinates expressed in the selected Map CRS, now it is possible a search for coordinates in the defined on the map, now it's only possible by Lat/Long.
A proper entry in the current coordinate type selector (decimal/aeronautical) should allow to select the current Map CRS to setup the tool accordingly (e.g. use current Map CRS)
Thank into account that the map CRS can vary according to the CRS selected din the CRS Selector.
What kind of improvement you want to add? (check one with "x", remove the others)
Design
It would be good to implement the following UI/UX:
As coordinate fields validator when "Current map CRS" is selected, the current one should be preserved which means:
Current functionalities have to be maintained also when "Current map CRS" is selected e.g. when search is performed, the tool has to add the marker to the map and center / zoom the point as usual
Other useful information
The functionality is actually implemented here:
https://github.com/geosolutions-it/MapStore2/blob/master/web/client/components/mapcontrols/searchcoordinates/CoordinatesSearch.js
zoomAndAddPointalready send the CRS. This action is actually intercepted byepics/search.js-->zoomAndAddPointEpicMapStore2/web/client/epics/search.js
Lines 273 to 297 in 2556203
The epic does 2 operation.
zoomToPointshould already support a different CRS