Restrict collection item features in map layer to search results#38
Restrict collection item features in map layer to search results#38
Conversation
afrc/views/map_api.py
Outdated
| class ReferenceCollectionMVT(View): | ||
|
|
||
| def get(self, request, zoom, x, y): | ||
| session_id = request.session.session_key |
There was a problem hiding this comment.
We don't need to create the session key here because it will have already been created in search_api.py
|
|
||
| onMounted(async () => { | ||
| if (props.searchResult) { | ||
| if (props.searchResult?._source) { |
There was a problem hiding this comment.
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.
|
My only comment is that when a user goes to the page initially shouldn't all points show up as selected? |
|
@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. |
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. |
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? |
|
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. |

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