Skip to content

feat[map]: add reset button for map state modifications#695

Merged
suvanbanerjee merged 3 commits intodevelopmentfrom
feat/map-reset
Apr 10, 2026
Merged

feat[map]: add reset button for map state modifications#695
suvanbanerjee merged 3 commits intodevelopmentfrom
feat/map-reset

Conversation

@suvanbanerjee
Copy link
Copy Markdown
Contributor

@suvanbanerjee suvanbanerjee commented Mar 27, 2026

Pull Request

Description

Reset button added on top of the zoom controls on bottom right of map
this will only appear if maps is not in default state

image image

Fixes #183

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nowcasting-app Ready Ready Preview, Comment Mar 30, 2026 6:02am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
quartz-app Ignored Ignored Preview Mar 30, 2026 6:02am

Request Review

@suvanbanerjee suvanbanerjee requested a review from braddf March 27, 2026 04:35
@suvanbanerjee suvanbanerjee self-assigned this Mar 27, 2026
Comment thread apps/nowcasting-app/components/map/map.tsx Outdated
Copy link
Copy Markdown
Contributor

@braddf braddf left a comment

Choose a reason for hiding this comment

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

Couple of comments, otherwise looks good!

Comment thread apps/nowcasting-app/components/map/map.tsx Outdated
Comment thread apps/nowcasting-app/components/map/map.tsx Outdated
Comment on lines +392 to +400
return `<svg fill="#000000" viewBox="0 0 1920 1920" xmlns="http://www.w3.org/2000/svg">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<path d="M960 0v213.333c411.627 0 746.667 334.934 746.667 746.667S1371.627 1706.667 960 1706.667 213.333 1371.733 213.333 960c0-197.013 78.4-382.507 213.334-520.747v254.08H640V106.667H53.333V320h191.04C88.64 494.08 0 720.96 0 960c0 529.28 430.613 960 960 960s960-430.72 960-960S1489.387 0 960 0" fill-rule="evenodd">
</path>
</g>
</svg>`;
};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@braddf It is a string because we have to use it in html format, not sure if i should put it here or directly put it in
https://github.com/openclimatefix/quartz-frontend/pull/695/changes#diff-7251d9455f72e8fb43a93e7db2375b1429df6904295216039ede6b9da8fa5fe2R134

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is always an awkward thing going into forced HTML string behaviours... this is okay for now 👍

Copy link
Copy Markdown
Contributor

@braddf braddf left a comment

Choose a reason for hiding this comment

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

Nice, so am I correct that this disables tilt on the map? Not sure if there's any WebGL / performance improvement from disabling 3D map behaviour, but wouldn't that be ideal if it did... 😁

@suvanbanerjee suvanbanerjee merged commit 1f7d5d4 into development Apr 10, 2026
4 checks passed
@suvanbanerjee suvanbanerjee deleted the feat/map-reset branch April 10, 2026 11:12
@braddf braddf mentioned this pull request Apr 16, 2026
8 tasks
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.

2 participants