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

Add geocoding lookup for a layer #370

Closed
smalers opened this issue Apr 14, 2021 · 6 comments
Closed

Add geocoding lookup for a layer #370

smalers opened this issue Apr 14, 2021 · 6 comments
Assignees
Labels
critical Priority: highest priority enhancement New feature or request S Size: day or less

Comments

@smalers
Copy link
Contributor

smalers commented Apr 14, 2021

There is a need for some layers to use GeoCoding to look up features. For example, for municipal polygons or water provider polygons, it would be nice to allow entering a street address and then selecting or zooming to a polygon of interest. Or, for any feature type, find the list of closest features.

Maybe add a menu item "Find from address" to the layer kebab menu? Or require using the data table display of layer attributes and then use its kebab menu? Then enter an address and use a public geocoding service to look up a lat/long, which can be used to find a containing polygon. I found the following census REST service, which may be useful

@smalers smalers added enhancement New feature or request critical Priority: highest priority S Size: day or less labels Apr 14, 2021
@smalers
Copy link
Contributor Author

smalers commented Apr 14, 2021

What is needed to display the features in the data table is a function that takes a point and a layer, and returns the features that are matched so their attributes/properties can be displayed in the data table.

@smalers
Copy link
Contributor Author

smalers commented Apr 15, 2021

Now that the basic query is done, I recommend the following to close this out for now:

  1. Confirm that the address search is only currently enabled for point in polygon. Otherwise, we need to add a search with radius, and we can deal with that later. Make sure code comments reflect this.
  2. Update the CSS so that the radio box is not purple.
  3. When one or more features have been selected to match an address, use the kebab menu at the bottom right of the data table dialog to show the following menu choices:
    1. Zoom to address - zoom the map with some reasonable buffer like was done with points. Is it necessary to add a temporary marker to show the address? I'm not sure. We can deal with that later once basic zoom is in place.
    2. Zoom to selected features - like it is now but should the selected features be highlighted similar to how points are done? Maybe? Probably? At a minimum zoom and we can circle around to highlighting later.

One way or another the user probably needs some visual indicator because otherwise they won't know what to look for. Get the zoom working in some form and we can decide.

@Nightsphere
Copy link
Collaborator

The new branch has been merged with the following changes:

  1. The search by address radio button should only show up on a polygon layer.
  2. The CSS has been overridden to be the OWF green color instead of purple.
  3. The Zoom to address kebab button in the data table will zoom to a point on the polygon. Any other smaller tweaks such as zoom level can be done later.

This will be added to documentation later, but all that should be done to install after a Git pull is:

Authenticate to GitHub Packages/npm by logging in to the GitHub Packages registry. Do this in the same
folder that npm install will be run by using the command

npm login --registry=https://npm.pkg.github.com --scope=OWNER

replacing OWNER with the owner of the repository - OpenWaterFoundation in this case. Three
prompts will display:

  1. Username - GitHub username. This must be all lower case or it will ask again.
  2. Password - The GitHub Package access Token (GitHub password would also work).
  3. Email - GitHub email address.

Then run npm install and there should be no authentication issues.

@smalers
Copy link
Contributor Author

smalers commented Apr 16, 2021

I had no luck following these instructions. See issue #371 comment.

@smalers
Copy link
Contributor Author

smalers commented Apr 21, 2021

I added a point layer for SNOTEL stations to the Poudre Basin Information. A radio box is shown with only Search layer data. However, the kebab menu also includes Zoom to address . This should be removed since there is no address search.

@Nightsphere
Copy link
Collaborator

This small bug has been taken care of, and will be in the upcoming common library version 0.0.1-alpha.11. This bug was too small to warrant a version increase and publication, but is in the code and ready to go. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical Priority: highest priority enhancement New feature or request S Size: day or less
Projects
None yet
Development

No branches or pull requests

2 participants