feat(map): add render components and tests
1 unresolved thread
1 unresolved thread
Objective:
Create map rendering components, logic and unit tests
What has been done:
- map rendering utils
- map viewer component
- unit tests
What has not been done (intentionally):
- connection to the API service (size of the PR)
- unit tests for utils that will be connected to the API service, they are based on mocks only so tests won't serve their purpose
Additionally:
Edited by Adrian Orłów
Merge request reports
Activity
Filter activity
requested review from @mateuszmiko and @teoMiesiac
assigned to @AdrianOrlow
- Resolved by Adrian Orłów
- Resolved by Adrian Orłów
- Resolved by Adrian Orłów
- Resolved by Tadeusz Miesiąc
- Resolved by Adrian Orłów
- Resolved by Adrian Orłów
- Resolved by Adrian Orłów
- src/utils/map/pointToLatLng.ts 0 → 100644
13 try { 14 VALID_MAP_SIZE_SCHEMA.parse(mapSize); 15 } catch (e) { 16 // TODO: need to rething way of handling parsing errors, for now let's leave it to console.log 17 // eslint-disable-next-line no-console 18 console.error('Error parsing map size', e); 19 return LATLNG_FALLBACK; 20 } 21 22 const { pointOrigin, pointShifted } = getPointOriginAndShifted(point, mapSize); 23 const pixelsPerLonDegree = mapSize.tileSize / 360; 24 const pixelsPerLonRadian = mapSize.tileSize / (2 * Math.PI); 25 26 const lng = (pointShifted.x - pointOrigin.x) / pixelsPerLonDegree; 27 const latRadians = (pointShifted.y - pointOrigin.y) / -pixelsPerLonRadian; 28 const lat = radiansToDegrees(2 * Math.atan(Math.exp(latRadians)) - Math.PI / 2); added 8 commits
- f8b8786d - fix(map): move @testing-library/react to dev depends
- 53d809a0 - fix(tests): add resize observer mock as a global
- 0e350fc8 - fix(tests): add resize observer mock as a global
- b64ca935 - fix(tests): add rule disable for actWait test util
- fecf722b - feat(map): improve readability and tests of point offset util
- 302ed1e1 - feat(map): improve readability of point to lat lng util
- 38b68875 - feat(map): improve usage of selectors and types in map module
- ac14c550 - feat(map): improve hook and tests of useOlMap
Toggle commit listadded 1 commit
- 52ef7073 - test: fix transformIgnorePatterns not configured in test commands
- Resolved by Adrian Orłów
- Resolved by Adrian Orłów
added 41 commits
-
52ef7073...926fd3fd - 40 commits from branch
development
- f6a39f44 - Merge remote-tracking branch 'origin/development' into feature/add-map-render-components
-
52ef7073...926fd3fd - 40 commits from branch
enabled an automatic merge when the pipeline for f6a39f44 succeeds
mentioned in commit 1f1cf84b
Please register or sign in to reply