fix: Fixed map for crags showing duplicate titles and not showing children on map #953
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.
name: Fixed map for crags showing duplicate titles and not showing children on map
about:
title: ''
labels: ''
assignees:
What type of PR is this?(check all applicable)
Description
Related Issues
Issue #940
What this PR achieves
As the discussion on the issue pointed out, the map is intended to label the main area of the page and label all the sub-areas on the map. Currently, it does not do that; it writes the main title twice on the map.
To fix this, I modified the query parameters (areaById) to send back the lat and long metadata of the sub-areas. Then, I fixed the map logic to write the sub-areas on the map and ensured the main area label was not written twice.
Screenshots, recordings
Current:
After fix:
Notes
The style of the labels may be want to be modified.
There also seems to be logic to change the color of labels based on variables "focused" and "selected." I left these, but they will not be used because the focus is set to null, and selected is the main area.id, which will never be equal to a subarea id.