feat(map): add interactive base layer
Closes MIN-124
Objective:
Implement interactive layer of the map - react on click and fetch data to Redux
How it works?
- Map listens for the click
- Users click on the map
- Algo transforms user click coords (so-called Projection) to pixel position on the original map image (x/y cartesian point)
- IF there are no elements beneath the click position, do nothing
- IF there is a single bioEntity element (type=
ALIAS
), fetch it to Redux state (identically as it would be searched) - IF there is a reaction element (type=
REACTION
), fetch it to Redux state and THEN fetch all related bioEntites (identically as they would be searched)
BREAKING CHANGE:
The algorithm of converting the lng/lon position to a cartesian point has been fixed. It was done due to the fact that we need a precise click position for the correct map field search. Also now the first load of the map is perfectly centered.