Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking β€œSign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production Release #440

Merged
merged 519 commits into from
Jan 16, 2025
Merged
Changes from 1 commit
Commits
Show all changes
519 commits
Select commit Hold shift + click to select a range
0ad9333
feat(dashboard): show drone certificate and pilot certificate on task…
Nov 28, 2024
2f6e5ba
feat: ommit password section if the existing user is trying to login …
Nov 28, 2024
722fa3b
fix: remove comment code from task schemas
Pradip-p Nov 28, 2024
407ab9b
Merge branch 'feature/user-certificate-file' of github.com:hotosm/dro…
Pradip-p Nov 28, 2024
0231ba6
feat(regulators-approval-page): clear local storage on main page unmount
Nov 28, 2024
135d19d
Merge branch 'feature/user-certificate-file' of github.com:hotosm/dro…
Nov 28, 2024
5510fd8
feat: implemented user certificate upload functionality, storing user…
Pradip-p Nov 28, 2024
8f216ac
fix: set iscertifiedDroneUser initial value once
Nov 28, 2024
ed3a71b
feat(user-profile): support pdf to upload certificates
Nov 28, 2024
9359231
feat: add zoom to extent function
bijayrauniyar0 Nov 28, 2024
6b7188c
refactor: remove unecessary states and handle session end of modal
bijayrauniyar0 Nov 28, 2024
9cb8af5
refactor: rename title for imageMapBox modal
bijayrauniyar0 Nov 28, 2024
80e8a16
feat(project-approval-page): clear comment on approval comment success
Nov 28, 2024
e42e2ba
feat: update type for coordinates
bijayrauniyar0 Nov 28, 2024
360afab
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/drone-…
bijayrauniyar0 Nov 28, 2024
a002a69
feat: make project `DescriptionSection` dynamic to render on both pro…
Nov 28, 2024
12da774
feat: add about section on project description page
Nov 28, 2024
05c5904
feat: make regulator approval status optional to view on description …
Nov 28, 2024
5a30131
feat(project-description): make map popup disabled if the regulator a…
Nov 28, 2024
4f979f7
feat(project-description): disable popup open on table row click if r…
Nov 28, 2024
13e65c3
fix: merge conflict
Nov 28, 2024
0ecea6a
fix: merge conflict
Nov 28, 2024
63cfb4c
fix: merge conflict
Nov 28, 2024
137ce1b
Merge pull request #360 from hotosm/feat/drone-operator-image-upload-ui
subashtiwari1010 Nov 28, 2024
206dd79
Adjust project description as per regulator's approval status (#361)
suzit-10 Nov 28, 2024
acd41ab
fix: hide approval section if the approval status has value
Nov 28, 2024
6239c4a
add trailing slash(/) in the regulator approval endpoint
nrjadkry Nov 28, 2024
12debfb
style: about project
Nov 28, 2024
ff813ab
feat(project-description): show different popup message and hide task…
Nov 28, 2024
8f703e0
fix: about typo and set default selected project tab to about
Nov 28, 2024
d506c9b
fix: capitalize tab options label
Nov 28, 2024
ec1ca58
fix: merge conflict
Nov 28, 2024
f1be2a9
fix: update roles in existing user when auto local regulator creation
Pradip-p Nov 28, 2024
5467288
Merge branch 'develop' of github.com:hotosm/drone-tm into fix/regulat…
Pradip-p Nov 28, 2024
cddb772
feat(regulators-approval-section): hide approval section on approval …
Nov 28, 2024
7454b12
Merge pull request #363 from hotosm/fix/minor-issues
suzit-10 Nov 28, 2024
13e9259
fix: remove commented code
Nov 28, 2024
1d6a2d9
Merge pull request #364 from hotosm/fix/minor-issues
suzit-10 Nov 28, 2024
c7b5ba9
fix: show popup on task click although the project is rejected
Nov 28, 2024
ff2ab37
Merge pull request #365 from hotosm/fix/minor-issues
suzit-10 Nov 28, 2024
002cab1
fix: update roles in existing user when auto local regulator creation…
Pradip-p Nov 28, 2024
2bff9e7
fix: upadate the regulator
Pradip-p Nov 28, 2024
5bd65f4
Merge branch 'develop' of github.com:hotosm/drone-tm into fix/regulat…
Pradip-p Nov 28, 2024
2023591
Fix/regulator profile creation (#366)
Pradip-p Nov 28, 2024
ece26c0
fix: reslove user roles access issues with regulator
Pradip-p Nov 29, 2024
1a9755d
fix: merge conflict with develop
Pradip-p Nov 29, 2024
6002031
Merge pull request #367 from hotosm/fix/regulator-profile-creation
Pradip-p Nov 29, 2024
eb07016
feat: add drone altitude regulations model
Pradip-p Nov 29, 2024
796da2d
feat: Add 'get all' and 'get one' endpoints for drone altitudes
Pradip-p Nov 29, 2024
84ffaee
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 29, 2024
4fe803a
reac: Rename DbDroneAltitude class to DbDroneFlightHeight and update …
Pradip-p Nov 29, 2024
52dfcd4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 29, 2024
f7f641e
feat: Implemented endpoint to retrieve all drone altitude regulations…
Pradip-p Nov 29, 2024
28a4e5a
feat: add `OSM_NOMINATIM_URL` on viteconfig and env.example
Nov 29, 2024
1fed7f8
feat(project-creation): get project country by project centroid using…
Nov 29, 2024
ffd14c6
Replace `pdm` to `uv` for faster dependency management (#347)
Pradip-p Nov 29, 2024
5e0670e
feat: add className optional prop to InfoMessage component for dynami…
Nov 29, 2024
78b941f
feat: add orthoPhoto task component
bijayrauniyar0 Nov 29, 2024
8d82347
feat: add symbol type prop for icon at tooltip
bijayrauniyar0 Nov 29, 2024
e0dada9
refactor: remove delay
bijayrauniyar0 Nov 29, 2024
2e90d7c
feat: add functions to handle visiblity of vector layers and orthopho…
bijayrauniyar0 Nov 29, 2024
69fba12
refactor: remove button of show orthophoto from description section
bijayrauniyar0 Nov 29, 2024
4869a8f
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/drone-…
bijayrauniyar0 Nov 29, 2024
911f9c3
refactor: update onSuccess function to navigate user from task page t…
bijayrauniyar0 Nov 29, 2024
d64b25f
Merge pull request #369 from hotosm/feat/drone-operator-image-upload-ui
subashtiwari1010 Nov 29, 2024
3c0ff3e
feat(create-project): Show warning if altitude exceeds country’s max …
Nov 29, 2024
8a259f5
feat(individual-project): disable popup only if the user role regulat…
Nov 29, 2024
ec864eb
fix: merge conflict
Nov 29, 2024
149b526
feat(create-project): update fields description
Nov 29, 2024
056ef36
feat: add validations for input feild
bijayrauniyar0 Nov 29, 2024
d4260e9
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/drone-…
bijayrauniyar0 Nov 29, 2024
c99c938
Merge pull request #371 from hotosm/feat/drone-operator-image-upload-ui
subashtiwari1010 Nov 29, 2024
1691af4
refactor: update onSuccess Function to navigate user to dashboard aft…
bijayrauniyar0 Nov 29, 2024
86aab4a
style: add z-index to user profile
bijayrauniyar0 Nov 29, 2024
2cc3b04
feat: remove nominatim api from .env and vite config and save as a co…
Nov 29, 2024
59fcb95
feat: update .env.example
Nov 29, 2024
14c561f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 29, 2024
3183a76
feat: Show warning if altitude exceeds country's max limit (#370)
suzit-10 Nov 29, 2024
a3b2de1
feat: overwrite props className using `cn` the utils function to merg…
Nov 29, 2024
984adf3
fix: typo
Nov 29, 2024
f9f3070
Merge branch 'feat/drone-altitude-regulations' of github.com:hotosm/d…
Nov 29, 2024
bc99a8b
feat: add validation to check if old and new password are same
bijayrauniyar0 Nov 29, 2024
28d75f2
fix: merge conflict
Nov 29, 2024
a65934e
Merge pull request #372 from hotosm/feat/drone-altitude-regulations
subashtiwari1010 Nov 29, 2024
f6d1c88
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/drone-…
bijayrauniyar0 Dec 2, 2024
00fd404
refactor: update placeholder for file upload
bijayrauniyar0 Dec 2, 2024
3d281c0
feat: updated count waypoints within AOI
Pradip-p Dec 2, 2024
73c8f1f
fix: added auth in endpoint
Pradip-p Dec 2, 2024
3fe93c8
feat: update handleDrawEnd function to prevent duplicate draw
bijayrauniyar0 Dec 2, 2024
00c2514
feat: add conditional rendering for orthophoto button at map
bijayrauniyar0 Dec 2, 2024
e5dca8d
refactor: remove character length restriction from comment submission
bijayrauniyar0 Dec 2, 2024
c5b4b60
refactor: update naming of filterDuplicateFeature parameters
bijayrauniyar0 Dec 2, 2024
0a26cb1
Merge pull request #374 from hotosm/feat/drone-operator-image-upload-ui
subashtiwari1010 Dec 2, 2024
04089f1
fix: update waypoints count of aoi
Pradip-p Dec 2, 2024
c7362c3
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/count-…
Pradip-p Dec 2, 2024
9b58166
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/count-…
bijayrauniyar0 Dec 2, 2024
4e0affa
feat: add service to get project waypoints
bijayrauniyar0 Dec 2, 2024
659ea54
feat: implementation of project avg taskway points count api
bijayrauniyar0 Dec 2, 2024
7fa2b2f
Merge branch 'feat/count-waypoints' of github.com:hotosm/drone-tm int…
bijayrauniyar0 Dec 2, 2024
36d781d
feat: add logic to count number of waypoints in task split (#373)
Pradip-p Dec 2, 2024
a86574a
fix: disable popup trigger if user signin as `ReGULATOR`
Dec 2, 2024
90bd93b
Merge pull request #375 from hotosm/fix/regulator-lock-task
subashtiwari1010 Dec 2, 2024
c5e49ca
Merge branches 'feat/count-waypoints' and 'develop' of github.com:hot…
Pradip-p Dec 3, 2024
218daa5
fix: added slash in waypoints count endpoint
Pradip-p Dec 3, 2024
46d9d84
Merge pull request #377 from hotosm/feat/count-waypoints
Pradip-p Dec 3, 2024
40125c4
[pre-commit.ci] pre-commit autoupdate (#376)
pre-commit-ci[bot] Dec 3, 2024
5316907
refctor: update params and add a loading state for avg way points
bijayrauniyar0 Dec 3, 2024
0cc7ada
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/count-…
bijayrauniyar0 Dec 3, 2024
eb7de02
Merge pull request #379 from hotosm/feat/count-waypoints
subashtiwari1010 Dec 3, 2024
a12a3ec
fix: ensure small areas merge with the nearest one in task splitting …
Pradip-p Dec 5, 2024
065782a
fix: task locking and validation error in project creator (#382)
Pradip-p Dec 5, 2024
2f784c2
add images.json file into s3
nrjadkry Dec 5, 2024
2962430
feat: add turf/transform-rotate package
bijayrauniyar0 Dec 5, 2024
d4ae0e8
feat: add onDrag event listner and corresponding props
bijayrauniyar0 Dec 5, 2024
d1c7bfc
feat: add type for functions to be call at on drag event
bijayrauniyar0 Dec 5, 2024
8ff8e49
feat: add feature to rotate filght plan
bijayrauniyar0 Dec 5, 2024
b072614
feat: add function to calculate angle, centeroid
bijayrauniyar0 Dec 5, 2024
c574d10
feat: add funciton to rotate geojson
bijayrauniyar0 Dec 5, 2024
74183b5
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/flight…
bijayrauniyar0 Dec 5, 2024
9674480
refactor: update type for function params
bijayrauniyar0 Dec 5, 2024
26f245a
Feat/flightplan rotation (#383)
bijayrauniyar0 Dec 5, 2024
01638fd
feat: gcp app with router setup
nrjadkry Dec 6, 2024
eb04182
feat: function to calculate image footprints
nrjadkry Dec 6, 2024
3dab722
fix: regulator tags updated in routes
nrjadkry Dec 6, 2024
3a57b6f
functions to find images within a point
nrjadkry Dec 6, 2024
9b07c31
feat: endpoint to find all the images that contains the specific point
nrjadkry Dec 6, 2024
f16e41b
gcp router added in main.py
nrjadkry Dec 6, 2024
aa3d375
typing used for params
nrjadkry Dec 6, 2024
0d06fff
refactor: update type for calculate angle fn
bijayrauniyar0 Dec 6, 2024
5d4409c
Merge pull request #384 from hotosm/gcp_calculation
nrjadkry Dec 8, 2024
b2e01ac
feat: resolve merge conflict
bijayrauniyar0 Dec 9, 2024
53f90cb
hot-fix: ignore ts on modal component
Dec 9, 2024
c06d139
feat: add needDragEvent Prop
bijayrauniyar0 Dec 9, 2024
e616459
refactor: update taskDataPolygon and pass needDragEvent at vector layer
bijayrauniyar0 Dec 9, 2024
fb1aa4d
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/flight…
bijayrauniyar0 Dec 9, 2024
1b7c81d
Merge pull request #385 from hotosm/feat/flightplan-rotation
subashtiwari1010 Dec 9, 2024
bf8f557
bump drone_flightplan version
nrjadkry Dec 9, 2024
c1dfce8
bump drone_flightplan version (#387)
nrjadkry Dec 9, 2024
f58e91a
bump drone_flightplan version to 0.3.3
nrjadkry Dec 9, 2024
6516c2b
fix: merge conflict
nrjadkry Dec 9, 2024
44fbb5d
Merge pull request #388 from hotosm/bump_versions
nrjadkry Dec 9, 2024
245fcf0
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Dec 9, 2024
43f6543
Merge pull request #389 from hotosm/pre-commit-ci-update-config
nrjadkry Dec 10, 2024
7725889
feat: update rotation funcitons
bijayrauniyar0 Dec 10, 2024
f46a844
feat: optimization of flightplan rotation
bijayrauniyar0 Dec 10, 2024
1b86875
style: add dropshadow style
bijayrauniyar0 Dec 10, 2024
ec40702
feat: add newAsync Popup for taskpage
bijayrauniyar0 Dec 10, 2024
56befcd
feat: add rotattionCue component
bijayrauniyar0 Dec 10, 2024
75c4e7c
feat: optimize flightplan rotation
bijayrauniyar0 Dec 10, 2024
6441699
feat: add layer ids constants
bijayrauniyar0 Dec 10, 2024
2957cfd
refactor: remove unused vars
bijayrauniyar0 Dec 10, 2024
d28cfac
feat: add function to swap first and last coordinate and fucntion to …
bijayrauniyar0 Dec 10, 2024
c1e6743
style: add responsive attributes to rotation cue
bijayrauniyar0 Dec 10, 2024
632acfa
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/flight…
bijayrauniyar0 Dec 10, 2024
133d4b5
refactor: update swapFirstAndLastCoordinate
bijayrauniyar0 Dec 10, 2024
cd9fde0
refactor: remove swapFirstAndLast coordinate function
bijayrauniyar0 Dec 10, 2024
858af11
fix: update the flight plan time & updated waypoints conuts if user t…
Pradip-p Dec 11, 2024
85bd95f
feat: update api for taskDataPolygon
bijayrauniyar0 Dec 11, 2024
4e84a1d
refactor: update popup close fn
bijayrauniyar0 Dec 11, 2024
de31906
refactor: update type for mouse Events
bijayrauniyar0 Dec 11, 2024
ea4cc9e
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/flight…
bijayrauniyar0 Dec 11, 2024
9a44f58
fix: calculate bbox for the drone image (#393)
nrjadkry Dec 11, 2024
0b8c888
refactor: update taskWayPointsData data
bijayrauniyar0 Dec 11, 2024
110dafd
feat: add est flight time
bijayrauniyar0 Dec 11, 2024
2c08b2a
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/flight…
bijayrauniyar0 Dec 11, 2024
d38f3c1
refactor: update type for coordinates
bijayrauniyar0 Dec 11, 2024
e60c70f
Merge pull request #391 from hotosm/feat/flightplan-rotation
subashtiwari1010 Dec 11, 2024
8b2afe4
feat: generate and download KMZ files with placemarks (#392)
Pradip-p Dec 11, 2024
56b501f
feat: update rotation cue to handle touch events
bijayrauniyar0 Dec 11, 2024
944caf0
feat: add button to save rotated taskpoints
bijayrauniyar0 Dec 11, 2024
ff85f9d
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/flight…
bijayrauniyar0 Dec 11, 2024
05fe9b2
Gcp calculation (#394)
nrjadkry Dec 11, 2024
483176a
refactor: extract centroid from api
bijayrauniyar0 Dec 11, 2024
0fba3a6
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/flight…
bijayrauniyar0 Dec 11, 2024
63fe010
feat: remove conditional color of points vector layer
bijayrauniyar0 Dec 11, 2024
9ed53ed
refactor: update get exif data function to check N and S and provide …
bijayrauniyar0 Dec 11, 2024
f4ff717
style: decrease height of save rotated plan button
bijayrauniyar0 Dec 11, 2024
67a0a1a
feat: add rotation degree inside rotation cue
bijayrauniyar0 Dec 11, 2024
6b23508
docs: add quick summary page about GCP workflow
spwoodcock Dec 11, 2024
07a3b21
style: add bgcolor for toggled buttons
bijayrauniyar0 Dec 12, 2024
8edcddc
feat: update events for rotation handle
bijayrauniyar0 Dec 12, 2024
266a325
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/flight…
bijayrauniyar0 Dec 12, 2024
a42c5d4
Merge pull request #395 from hotosm/feat/flightplan-rotation
subashtiwari1010 Dec 12, 2024
4f30f16
Get a list of images that contains a GCP Point from a whole Project (…
nrjadkry Dec 12, 2024
fad365d
Style/responsive (#397)
bijayrauniyar0 Dec 12, 2024
c507709
Fix/image procssing status (#386)
aryalsaurav Dec 13, 2024
7b89824
feat: Download dem file from JAXA if not provided by the user (#380)
aryalsaurav Dec 13, 2024
638ed43
Update README.md
nrjadkry Dec 13, 2024
8a00450
update: label for dem file download from jaxa
nrjadkry Dec 16, 2024
a7b13ac
Feat/flightplan rotation (#400)
bijayrauniyar0 Dec 16, 2024
78e2e55
[pre-commit.ci] pre-commit autoupdate (#403)
pre-commit-ci[bot] Dec 17, 2024
7e25569
feat: update drone image processor to handle single and multiple task…
Pradip-p Dec 17, 2024
7d8de9f
Update faq section to add basic frequently asked questions.md (#402)
manjitapandey Dec 18, 2024
703fe74
fix: slove merge conflict with main
Pradip-p Dec 20, 2024
cbb5c62
feat: initial py-test setup & update Dockerfile (#404)
Pradip-p Dec 20, 2024
6bc2f92
fix: update response for flight plan
Dec 22, 2024
af25291
Merge pull request #409 from hotosm/fix/flight-plan-download
suzit-10 Dec 22, 2024
b552aee
[pre-commit.ci] pre-commit autoupdate (#412)
pre-commit-ci[bot] Dec 24, 2024
d91fa3f
Implement Waylines flight mode in flights with terrain following enab…
nrjadkry Dec 24, 2024
0a969bf
heading angle added in popup
nrjadkry Dec 25, 2024
06c5421
fix: waypoints count
nrjadkry Dec 26, 2024
9f44c02
remove unwanted params in waypoint generation
nrjadkry Dec 26, 2024
8343657
change buffer distance for take off point
nrjadkry Dec 27, 2024
fb9c726
fix: waypoints count in project creation
nrjadkry Dec 30, 2024
b96f8dd
fix: kmz download in android chrome
nrjadkry Dec 30, 2024
95e4b8a
[pre-commit.ci] pre-commit autoupdate (#418)
pre-commit-ci[bot] Dec 31, 2024
aefebf7
fix: Show re-upload section if image upload is failed (#417)
suzit-10 Dec 31, 2024
e6b2759
Implement all image processing with gcp files & updated task table to…
Pradip-p Dec 31, 2024
ec648e5
fix: update all image processing without gcp files
Pradip-p Dec 31, 2024
7880916
Merge pull request #419 from hotosm/fix/hot-fixes
Pradip-p Dec 31, 2024
c464347
hotfix: fixes on flight plan time & distance
Pradip-p Dec 31, 2024
a1b021e
Merge pull request #420 from hotosm/fix/hot-fixes
Pradip-p Dec 31, 2024
b04cc56
fix:Ensure password is saved during user creation if provided (#421)
Pradip-p Jan 1, 2025
a81fe00
feat: invalidate task description storing to refetch the updated data…
suzit-10 Jan 1, 2025
bcb5b16
fix: solve merge conflict with main from develop
Pradip-p Jan 1, 2025
6298213
Feat: Implement gcp editor package (#424)
suzit-10 Jan 2, 2025
a5396f6
fix:altitude in gcp list
nrjadkry Jan 2, 2025
523d75d
fix: multilple api calls
suzit-10 Jan 3, 2025
e9088ff
fix: process_all_imagery for a project
nrjadkry Jan 3, 2025
a1d58cd
Test cases for user and project functionalities with fixtures (#415)
Pradip-p Jan 6, 2025
44fbb94
docs: update roadmap, mobile flight plan upload, additional dji models
spwoodcock Jan 6, 2025
db1ca8e
docs: update docs index.md to mirror readme for now
spwoodcock Jan 8, 2025
c57e7da
docs: add info about supported drones to readme + extra faq details
spwoodcock Jan 8, 2025
6d9a217
Merge pull request #433 from hotosm/docs/extra-info-supported-drones
spwoodcock Jan 8, 2025
6e99894
docs: remove docs page link to readme (bad formatting), write manually
spwoodcock Jan 8, 2025
bd785f9
docs: add DroneLink to FAQ as potential link
spwoodcock Jan 8, 2025
0d65863
Merge branch 'develop' of github.com:hotosm/drone-tm into feat/implem…
suzit-10 Jan 9, 2025
034121c
[pre-commit.ci] pre-commit autoupdate (#425)
pre-commit-ci[bot] Jan 9, 2025
d2453b8
feat: update gcp-editor version
suzit-10 Jan 9, 2025
7b33efb
Merge pull request #434 from hotosm/feat/implement-gcp
suzit-10 Jan 9, 2025
9a04a8b
feat: add image url
suzit-10 Jan 9, 2025
256bc5a
Merge pull request #435 from hotosm/feat/implement-gcp
suzit-10 Jan 9, 2025
d8736bd
fix: duplicate images in a list in image processing
nrjadkry Jan 15, 2025
1e4c0ee
[pre-commit.ci] pre-commit autoupdate (#437)
pre-commit-ci[bot] Jan 15, 2025
bd00d53
image processing status
nrjadkry Jan 15, 2025
741ef5a
update project db to add image processing status
nrjadkry Jan 15, 2025
0effbe4
Merge branch 'feat-processing-status' of github.com:hotosm/Drone-TM i…
nrjadkry Jan 15, 2025
f0eacb1
Remove: duplicate code
nrjadkry Jan 15, 2025
d10aa44
remove: status table
nrjadkry Jan 15, 2025
3fb51a5
image processing status added in projects api
nrjadkry Jan 15, 2025
78950d1
update: processing status to processing for whole project processing
nrjadkry Jan 15, 2025
7c720c1
update: task status in processing of whole task
nrjadkry Jan 15, 2025
c82d6a0
Merge pull request #438 from hotosm/feat-processing-status
nrjadkry Jan 15, 2025
fe01932
fix: migration (#439)
nrjadkry Jan 15, 2025
c05c2ad
pre commit config
nrjadkry Jan 16, 2025
cfc385e
fix: update gcp-editor version
suzit-10 Jan 16, 2025
4f46329
fix: hide gcp editor ui on project details page unmount
suzit-10 Jan 16, 2025
7eb041e
fix: hide image processing button if processing is ongoing
suzit-10 Jan 16, 2025
8b311ae
feat: refetch project detail on image processing starter api success
suzit-10 Jan 16, 2025
32a6f16
Merge pull request #441 from hotosm/feat/implement-gcp
suzit-10 Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add zoom to extent function
bijayrauniyar0 committed Nov 28, 2024
commit 9359231f9365a6539d8c1d6543d492ed2bb54c70
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/* eslint-disable no-param-reassign */
import { useEffect, useMemo, useRef } from 'react';
import { MapMouseEvent } from 'maplibre-gl';
import { LngLatLike, MapMouseEvent } from 'maplibre-gl';
import bbox from '@turf/bbox';
import { toast } from 'react-toastify';
import { Feature, FeatureCollection } from 'geojson';
// import { v4 as uuidv4 } from 'uuid';
import { IVectorLayer } from '../types';

@@ -18,9 +21,11 @@ export default function VectorLayer({
symbolPlacement = 'point',
iconAnchor = 'center',
imageLayerOptions,
zoomToExtent = false,
}: IVectorLayer) {
const sourceId = useMemo(() => id.toString(), [id]);
const hasInteractions = useRef(false);
const firstRender = useRef(true);
const imageId = `${sourceId}-image/logo`;

useEffect(() => {
@@ -108,6 +113,53 @@ export default function VectorLayer({
};
}, [map, sourceId]);

useEffect(() => {
if (!map || !geojson || !zoomToExtent) return;
if (!firstRender.current) return;
firstRender.current = false;

const handleZoom = () => {
if (!map || !geojson || !zoomToExtent) return;
let parsedGeojson: Feature | FeatureCollection;

// Parse GeoJSON if it's a string
if (typeof geojson === 'string') {
try {
parsedGeojson = JSON.parse(geojson) as Feature | FeatureCollection;
} catch (error) {
toast.error(
'Invalid GeoJSON string:',
(error as Record<string, any>)?.message,
);
return;
}
} else {
parsedGeojson = geojson as Feature | FeatureCollection;
}
const [minLng, minLat, maxLng, maxLat] = bbox(parsedGeojson);
const bounds: [LngLatLike, LngLatLike] = [
[minLng, minLat], // Southwest corner
[maxLng, maxLat], // Northeast corner
];

// Zoom to the bounds
map.fitBounds(bounds, {
padding: 20,
maxZoom: 14,
zoom: 18,
// animate: false,
duration: 300,
});
map.off('idle', handleZoom);
};

map.on('idle', handleZoom);
// eslint-disable-next-line consistent-return
return () => {
map.off('idle', handleZoom);
};
}, [map, geojson, zoomToExtent]);

// add select interaction & return properties on feature select
useEffect(() => {
if (!map || !interactions.includes('feature')) return () => {};
Original file line number Diff line number Diff line change
@@ -60,6 +60,7 @@ export interface IVectorLayer extends ILayer {
| 'bottom-left'
| 'bottom-right';
imageLayerOptions?: Object;
zoomToExtent?: boolean;
}

type InteractionsType = 'hover' | 'select';