-
Notifications
You must be signed in to change notification settings - Fork 11
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
PB-878: Filter out KML outside print extent #1055
base: develop
Are you sure you want to change the base?
Conversation
web-mapviewer Run #3490
Run Properties:
|
Project |
web-mapviewer
|
Branch Review |
pb-878-filter-out-kml
|
Run status |
Failed #3490
|
Run duration | 04m 29s |
Commit |
2f20e4a07e: PB-878: Remove unused comment.
|
Committer | Ismail Sunni |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
2
|
Flaky |
0
|
Pending |
22
|
Skipped |
0
|
Passing |
209
|
View all changes introduced in this branch ↗︎ |
Tests for review
tests/cypress/tests-e2e/print.cy.js • 2 failed tests • e2e/electron/mobile
3f4f219
to
76e6dff
Compare
60fa6e4
to
4040237
Compare
const topLeftCoordinate = map.getCoordinateFromPixel([printRectangle[0], printRectangle[1]]) | ||
const rightBottomCoordinate = map.getCoordinateFromPixel([ | ||
printRectangle[2], | ||
printRectangle[3], | ||
]) | ||
|
||
store.commit('setPrintExtent', { | ||
printExtent: [ | ||
topLeftCoordinate[0], | ||
rightBottomCoordinate[1], | ||
rightBottomCoordinate[0], | ||
topLeftCoordinate[1], | ||
], | ||
dispatcher, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this would help, but there are a couple extent utils in the file src/utils/coordinateUtils.js
that might be of use here.
There's a function to flatten an extent that is expressed as [ [x0, y0], [x1, y1] ]
and the opposite to make it a double coordinate array
If you want to use them, you could move these two function in the newly created src/utils/extentUtils.js
file instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's different I guess, since this code compute the coordinate-based extent from the pixel-based extent. The order is in different direction (e.g. pixel is from top-left while the coordinate is from left-bottom).
If it's ok, I will keep it in this location because it's very specific. I have added a comment to explain the order.
86980db
to
48d6f92
Compare
f297b8c
to
c08205a
Compare
… seen (not filtered out).
31a5185
to
4f8316e
Compare
77d1691
to
70eb9d9
Compare
Test link
Tested with this file:
super-big.zip
Test link