Skip to content

Restrict collection item features in map layer to search results#38

Merged
apeters merged 6 commits intomainfrom
cnh/search_results_layer_37
Mar 8, 2025
Merged

Restrict collection item features in map layer to search results#38
apeters merged 6 commits intomainfrom
cnh/search_results_layer_37

Conversation

@chiatt
Copy link
Member

@chiatt chiatt commented Mar 4, 2025

Restricts the collection item features in the map overlay to search results when a search is performed.

class ReferenceCollectionMVT(View):

def get(self, request, zoom, x, y):
session_id = request.session.session_key
Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need to create the session key here because it will have already been created in search_api.py

@chiatt chiatt requested a review from apeters March 4, 2025 19:05

onMounted(async () => {
if (props.searchResult) {
if (props.searchResult?._source) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This change is unrelated, but probably good to have. Initially I used the searchResult as the cue to update the overlay which is when this issue arose. When I switched to queryString I just left this fix in place.

@apeters
Copy link
Member

apeters commented Mar 5, 2025

I'm seeing that weird caching issue. As I zoom in and out the points on the map appear and disappear.

map_zoom_bug

@apeters
Copy link
Member

apeters commented Mar 6, 2025

My only comment is that when a user goes to the page initially shouldn't all points show up as selected?
Also, IMO the "red" is a bit jarring, but if Dennis wanted this, so be it.

@dwuthrich
Copy link
Contributor

@apeters I was happy with the previous blue color for points. But if we're trying to improve legibility we should opt for a color other than red.

@chiatt
Copy link
Member Author

chiatt commented Mar 6, 2025

My only comment is that when a user goes to the page initially shouldn't all points show up as selected? Also, IMO the "red" is a bit jarring, but if Dennis wanted this, so be it.

I don't think we should show all of the points as selected before a search. The search layer should just show search results. It's like searching for sushi restaurants in Google maps, we only see markers for sushi restaurants when the search is performed.

I didn't put a lot of thought into the color because I figured we'd revisit the map styles later as a refinement. I just wanted something prominent for development.

@chiatt
Copy link
Member Author

chiatt commented Mar 6, 2025

@apeters I was happy with the previous blue color for points. But if we're trying to improve legibility we should opt for a color other than red.

The points are actually still blue. It's just the search result layer is bright red, but we can adjust that later. Maybe we even want markers instead of points?

@chiatt
Copy link
Member Author

chiatt commented Mar 6, 2025

I spoke with Dennis about the color and he agreed that something other than red would be better and he suggested that I increase the diameter of the points as well, so I'll make those changes.

Copy link
Member

@apeters apeters left a comment

Choose a reason for hiding this comment

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

looks good!

@apeters apeters merged commit f426b31 into main Mar 8, 2025
2 of 6 checks passed
@apeters apeters deleted the cnh/search_results_layer_37 branch March 8, 2025 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants