Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register Trees - Drawing mode does not work on local system #1873

Open
mohitb35 opened this issue Sep 28, 2023 · 2 comments
Open

Register Trees - Drawing mode does not work on local system #1873

mohitb35 opened this issue Sep 28, 2023 · 2 comments

Comments

@mohitb35
Copy link
Collaborator

mohitb35 commented Sep 28, 2023

#1856 (comment)

Reproducing the Issue

  1. Run the project locally (develop branch).
  2. Go to Register Trees, and enter a treecount greater than 25.
  3. Click on the Draw Map button that appears over the map.
  4. Drawing controls are not visible on the map, and the user is unable to draw a polygon.
  5. What it should appear like - https://www.loom.com/share/77e4ff8b61844c32b4ce524e1965bbaf?sid=a36851c7-23e6-4fe9-9a6d-4a384f803d1c

This issue is seen only while running on the local system, once deployed the code works fine.

@mohitb35 mohitb35 changed the title Register Register Trees - Drawing mode does not work on local system Sep 28, 2023
@mohitb35
Copy link
Collaborator Author

mohitb35 commented Sep 28, 2023

I did a bit of digging, and I'm not sure if the react-map-gl-draw package is working correctly any more. It has not been updated for 4 years, and some of the issues we're facing may be related to it not playing well with react 18.

The functionality seems to work while deployed, but not locally suggests this as well - I checked if it worked with reactStrictMode=false in next config and the draw controls were seen (and worked properly)

We may want to find an alternative.

These comments can also get addressed at that time

@norbertschuler
Copy link
Collaborator

Best of course would be to have it replaced, but that would need some refactoring work. There is a thread in Slack about using and replacing https://github.com/alex3165/react-mapbox-gl at https://planetfoundation.slack.com/archives/C02393H3GDC/p1687670228689869 as well which is related to this:

As it still seems to get actively supported and developed I would of course suggest using only more https://visgl.github.io/react-map-gl/docs which maybe also allows to use https://github.com/MapLibre/maplibre-gl-js below. But I assume refactoring the current usage of https://github.com/alex3165/react-mapbox-gl will require quite some work.

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

No branches or pull requests

2 participants