Skip to content

PB-101 : zoom on GPX extent on file added #626

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

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

pakb
Copy link
Contributor

@pakb pakb commented Jan 30, 2024

re-using some parts that were made for KML

Test link

@pakb pakb requested a review from ltshb January 30, 2024 10:49
Copy link

cypress bot commented Jan 30, 2024

Passing run #441 ↗︎

0 167 19 0 Flakiness 0

Details:

PB-101 : add handling of empty GPX error
Project: web-mapviewer Commit: cfa281a018
Status: Passed Duration: 03:50 💡
Started: Feb 1, 2024 7:36 AM Ended: Feb 1, 2024 7:40 AM

Review all test suite changes for PR #626 ↗︎

@pakb pakb force-pushed the feat_PB-101_gpx-zoom-to-extent branch from 4761db4 to b3f7679 Compare January 30, 2024 12:34
Base automatically changed from feat_PB-101_gpx_support to develop January 30, 2024 12:37
@pakb pakb force-pushed the feat_PB-101_gpx-zoom-to-extent branch 2 times, most recently from 9661d0e to 690237f Compare January 30, 2024 13:59
@@ -465,7 +466,7 @@ const actions = {
if (!extent) {
updatedLayer.errorKey = 'kml_gpx_file_empty'
updatedLayer.hasError = true
} else if (!getKmlExtentForProjection(rootState.position.projection, extent)) {
} else if (!getExtentForProjection(rootState.position.projection, extent)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just seen that in your previous PR for GPX support it seems that you don't support GPX after a reload as the GPX data will not be set (no store subscriber to get the GPX data from url). This means that you would need to add that support and also need a similar logic in the layer store as here and have a updateGpxLayer() and test here again for the extent being in projection bound like for kml. So we would handle the case were an online GPX is updated and the new version is out of bound.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's something I wanted to do in another PR

pakb added 2 commits February 1, 2024 08:08
re-using some parts that were made for KML
adding test to better cover getExtentForProjection and getKmlExtent
better feedback when a parsed GPX is empty or out of the current projection's bounds
@pakb pakb force-pushed the feat_PB-101_gpx-zoom-to-extent branch from 690237f to b0261cb Compare February 1, 2024 07:08
@pakb pakb requested a review from ltshb February 1, 2024 07:19
// TODO : zoom to extent
const extent = bbox(gpxToGeoJSON(parseGpx))
if (!extent) {
throw new EmptyGPXError()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to handle this error here

@pakb pakb force-pushed the feat_PB-101_gpx-zoom-to-extent branch from 2f20b59 to cfa281a Compare February 1, 2024 07:31
@pakb pakb requested a review from ltshb February 1, 2024 07:41
@pakb pakb merged commit d5f4f72 into develop Feb 1, 2024
@pakb pakb deleted the feat_PB-101_gpx-zoom-to-extent branch February 1, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants