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

Map features #881

Open
jSylvestre opened this issue Oct 9, 2023 · 4 comments
Open

Map features #881

jSylvestre opened this issue Oct 9, 2023 · 4 comments
Assignees

Comments

@jSylvestre
Copy link
Member

The map to draw fields does not have a lot of details, so it is difficult for them to draw small fields in accurate locations.

As a mitigation, it would be helpful if there was a satellite overlay.

@jSylvestre
Copy link
Member Author

ucdavis/cecdss@fd807e3

@laholstege
Copy link
Contributor

laholstege commented Oct 25, 2023

alright so i've done a bunch of investigating and here are our options for getting a satellite view:

  • use mapbox as our data source, use react-leaflet, react-leaflet-draw for rendering

    • PRO: easy to integrate, comes with a satellite view without any config, only a few lines of code
    • CON: has a limit on number of free monthly loads/initializations of the map (50,000) and then gets quite expensive. we would likely not hit that quickly but it would be a pain to be tied to it or have to move away from mapbox later
    • this is what we use for CECDSS ☝️
  • use ArcGIS as our data source, use react-leaflet, esri-leaflet for rendering

    • we have access through ArcGIS Online. i was able to make an API key through the Developer Dashboard.
    • PROS: more reliable (free!) access. have the option of incorporating other layers and features of ArcGIS
    • CONS: i haven't (yet) been able to get it to work with leaflet–the basemap (which is what the satellite is) requires more fiddling with esri-leaflet, and there isn't an up-to-date well supported react package. also might conflict with react-leaflet-draw, which is what we're using to draw polygons–it isn't compatible with hooks (yuck, hate that) and the stuff i was trying to do to get this to work required me to do useRef(). i could do that inside the class but this is where i stopped.

which leads me to another option:

  • use ArcGIS Maps SDK for js
    • i haven't looked into this very much / haven't tried it out. but we should be able to use this directly in react. e.g. this example using arcgis-core.
    • PROS: looks fairly simple to use. opens up the possibility of doing a lot with ArcGIS. there's a lot of cool examples. requires learning more about ArcGIS
    • CONS: might not be as easy to use as it looks. requires learning more about ArcGIS. also requires us to answer questions like: should the polygons be a layer in ArcGIS? how do we interact with that data? would that change what we store in the db?
    • here's their vscode extension
    • and .NET tools

@laholstege
Copy link
Contributor

going to look into ArcGIS Maps SDK for js next. they also offer .NET tools

@laholstege
Copy link
Contributor

#892

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