Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@GrahamS-Quartech
Copy link
Contributor

🎯 Summary

PIMS-1544

  • This PR adds a small map component that appears in the general information section for buildings and parcels adding/editing.
  • You should be able to enter a PID or a PIN and have the map automatically fix itself to the lat/lng at the centroid of the relevant parcel.
  • The map should automatically set itself to the relevant location when you go to edit an existing parcel/building. Note that I was making it default the location to (0, 0) previously so if you see that in some of the parcels you already made locally that is expected.
  • When you click on the map, you should be able to see a super basic popup showing the PID/PID at that location. I figure we can flesh this out more later. It only triggers when you're zoomed in enough.

Please test this functionality out locally and let me know if there's anything weird happening.

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

… CORS requests) in get method. Can now request a parcel by pid or pin from general info form. If found, will set location and adjust map accordingly.
@github-actions
Copy link

github-actions bot commented Apr 9, 2024

🚀 Deployment Information

The React APP Image has been built with the tag: 2315. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the APP deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link
Collaborator

@dbarkowsky dbarkowsky left a comment

Choose a reason for hiding this comment

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

Two strange behaviours:

  • If a popup is open, you cannot scroll away from it. As soon as it hits the outside of the map, scrolling is stopped.
  • If you blur the PID field while a popup is open, it doesn't seem to centre the pin. It just brings it a little bit closer to that parcel. Maybe we should just close the popup on blur if possible before the map.setView is called.

@dbarkowsky
Copy link
Collaborator

Pushed two changes:

  • Moving @types dependencies to dev-dependencies and removing carets
  • Closing the popup on blur events
    Tried out closing the popup on drag to avoid the boundary issue, but it doesn't feel natural to use, so left that out.

Copy link
Collaborator

@dbarkowsky dbarkowsky left a comment

Choose a reason for hiding this comment

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

Tested again after most recent change. Can now pan away from the popup.

@GrahamS-Quartech GrahamS-Quartech merged commit 6880160 into main Apr 10, 2024
@GrahamS-Quartech GrahamS-Quartech deleted the PIMS-1544-ParcelLayer branch April 10, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants