-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add Manual bbox entry option to search page #389
Open
stephenkilbourn
wants to merge
24
commits into
radiantearth:main
Choose a base branch
from
stephenkilbourn:manual-bbox-entry
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
4ca7a34
WIP: add param on submit and clear on reset
stephenkilbourn 03efc9a
implement loading filter values from params
stephenkilbourn 94318fb
check & show geospatial map based on url param
stephenkilbourn dcec953
overwrite defaults with url params
stephenkilbourn 8d6af73
submit form on load if query params present
stephenkilbourn 01bd9da
allow bbox input via text or map
stephenkilbourn 1bdf78f
set datetime to date object array when reading query param string
stephenkilbourn c54484b
move bbox entry to component
stephenkilbourn 71df2ed
fix linting error
stephenkilbourn cfc913d
add manual BBoxEntry Component to search
stephenkilbourn 933adc4
switch to tabs
stephenkilbourn 8068ac4
remove console log
stephenkilbourn caca3a4
move defaults to component, validate prop, remove unused style import
stephenkilbourn fb0683e
Update src/components/BBoxEntry.vue
stephenkilbourn 5a96538
map tab to initialize with query.bbox and set areaselect to that bbox
stephenkilbourn a07190e
Merge branch 'manual-bbox-entry' of github.com:stephenkilbourn/stac-b…
stephenkilbourn 3fc9e29
move bbox labels to locales
stephenkilbourn 23866c3
update setInitialBounds to use leaflet bounds methods
stephenkilbourn f25404a
fix: lat, lon were swapped
stephenkilbourn 75ddf39
remove unused watcher & default bbox value
stephenkilbourn fed9d9d
use setBBox() instead of $set()
stephenkilbourn 5230e3b
no need to initialize _bbox
stephenkilbourn 3f58ecb
ensure map is centered on bounds from Bbox entry before rendering
stephenkilbourn 569b34f
round value from bounding box
stephenkilbourn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<template> | ||
<b-form-group> | ||
<b-form-row> | ||
<b-col> | ||
<b-form-group label="x_min" label-for="x_min"> | ||
<b-form-input | ||
id="x_min" | ||
@input="updateBBoxArray($event, 0)" | ||
:value="bbox[0]" | ||
type="number" | ||
no-wheel | ||
step="any" | ||
min="-180" | ||
max="180" | ||
/> | ||
</b-form-group> | ||
</b-col> | ||
<b-col> | ||
<b-form-group label="y_min" label-for="y_min"> | ||
<b-form-input | ||
id="y_min" | ||
@input="updateBBoxArray($event, 1)" | ||
:value="bbox[1]" | ||
type="number" | ||
no-wheel | ||
step="any" | ||
min="-90" | ||
max="90" | ||
/> | ||
</b-form-group> | ||
</b-col> | ||
<b-col> | ||
<b-form-group label="x_max" label-for="x_max"> | ||
<b-form-input | ||
id="x_max" | ||
@input="updateBBoxArray($event, 2)" | ||
:value="bbox[2]" | ||
type="number" | ||
no-wheel | ||
step="any" | ||
min="-180" | ||
max="180" | ||
/> | ||
</b-form-group> | ||
</b-col> | ||
<b-col> | ||
<b-form-group label="y_max" label-for="y_max"> | ||
<b-form-input | ||
id="y_max" | ||
@input="updateBBoxArray($event, 3)" | ||
:value="bbox[3]" | ||
type="number" | ||
no-wheel | ||
step="any" | ||
min="-90" | ||
max="90" | ||
/> | ||
</b-form-group> | ||
</b-col> | ||
</b-form-row> | ||
</b-form-group> | ||
</template> | ||
|
||
<script> | ||
import { BFormInput, BFormGroup} from 'bootstrap-vue'; | ||
|
||
export default { | ||
name: 'BBoxEntry', | ||
components: { | ||
BFormGroup, | ||
BFormInput, | ||
}, | ||
props: { | ||
bbox: { | ||
type: Array, | ||
required: true | ||
} | ||
}, | ||
methods: { | ||
updateBBoxArray($event, position) { | ||
this.$emit('updateBBoxArray', $event, position); | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not sure how this is usually done in forms, but x_min seems a little too technical as a user readable label.
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 asked around and didn't find a clear answer. I could do something like Lat max/min and Lon max/min. Would that be clearer to most users?
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.
Maybe follow the specification terms? I guess there are names hidden in the API spec documents.
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.
looking at the geojson spec, the bounding box uses the terms "southwest" and "northeast" and avoids min/max to avoid confusion when crossing the antimeridian. I've updated the labels to Southwest latitude/longitude and Northeast latitude/longitude to match that.