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

Include interface for searching for a place name or address in Cesium #1796

Closed
robyngit opened this issue May 19, 2021 · 12 comments · Fixed by #2314 or #2352
Closed

Include interface for searching for a place name or address in Cesium #1796

robyngit opened this issue May 19, 2021 · 12 comments · Fixed by #2314 or #2352
Assignees
Labels
cesium enhancement pdg Permafrost Discovery Gateway portals Anything related to portals
Milestone

Comments

@robyngit
Copy link
Member

Cesium includes an optional widget for searching for a location by address or name, and then navigating to the searched-for location. To enable this, we'll need a key for one of the Geocoder services

@robyngit robyngit added enhancement pdg Permafrost Discovery Gateway cesium labels May 19, 2021
@robyngit
Copy link
Member Author

robyngit commented Sep 9, 2021

Also look into using the GNIS database for U.S. placenames, and geonames for places outside the U.S.

@robyngit
Copy link
Member Author

robyngit commented Dec 8, 2022

We have a list of placenames that we are going to add as a layer to the PDG. It would be great to incorporate these into the places search, see PermafrostDiscoveryGateway/pdg-portal#5

@robyngit
Copy link
Member Author

From #2229 (duplicate):

PDG and other portals would be more usable if users could search for and zoom to specific places, such as named local communities, rivers, and other relevant places. This was discussed and raised at the PDG mini-workshop. Need to develop out the ideas here, this ticket is just a placeholder.

One issue is we would need to be able to search place-name to location gazeteers, such as GNIS (see https://gnis-ld.org/ that we run, and https://geonames.org/).

@julietcohen julietcohen added the portals Anything related to portals label Dec 4, 2023
@mbjones mbjones moved this to Backlog in Visualization/Frontend Dec 19, 2023
@ianguerin ianguerin self-assigned this Feb 12, 2024
@ianguerin
Copy link
Collaborator

I've outlined a recommendation in a Google doc exploring various geocoder APIs. With input from Matt, Robyn, and Yvonne, we've elected to go with the Google Maps API. Below is a summary of the discussion had there in the case that this Google doc is no longer reachable.

There are a few reasons we've chosen this API. It supports international place name geocoding, it is an industry standard that we (MetacatUI) are already integrated with for using the Google Maps UI component, there's no additional server-side setup, and the story for integrating with the Places API for generating place name autocomplete suggestions similarly ought to be easy given the expected compatibility between Google APIs.

In the discussion we also noted that the desire to search for local Arctic place names may become a challenge with Google API place names, so we should implement this integration in such a way that if we need to migrate to a different third-party service it is impossible or even very difficult.

@mbjones
Copy link
Member

mbjones commented Feb 14, 2024

Thanks, @ianguerin -- great summary. For the local place names not found in the Google Maps API, another option might be to enable searching two or more services in parallel and merging the results. GMaps will likely cover 99%+ of our needs. Being able to merge in a few results from some local placename datasets would probably cover the local edgecases, if we could do that efficiently. I gave some examples of those in the gdoc.

@ianguerin
Copy link
Collaborator

In the case of multiple data sources, I think we will want to create a single API that fans out to call the separate data sources. That limits the number of outgoing requests for our users and will keep the FE code simple

@ianguerin
Copy link
Collaborator

Here's a quick outline of engineering design.

Essentially we are integrating with Google Maps Places Autocomplete and Google Maps Geocoder APIs. This will build off of the work done to support searching by latitude and longitude in the forthcoming "viewfinder" toolbar view.

@robyngit
Copy link
Member Author

@ianguerin, great job on the design doc for the viewfinder places search! Just a couple of things I wanted to clarify:

  1. Will the viewfinder model be independent of the map view and map model? I'm wondering if it could be used anywhere in our UI for place name searches, not just tied to the map.

  2. Regarding the integration with Google Maps API and future geocoding services, is there a separate model planned for these APIs, or how do you envision this integration? Specifically, I'm curious about how we might make it easy to configure and swap between different geocoding services in the future.

@ianguerin
Copy link
Collaborator

1- Yes, I'll create a viewfinder model (that could be renamed/moved in future for reuse) that takes an input and returns a list of GeoPoints + plus some display metadata.

2- I am planning to use the same, new, Viewfinder model. Would you suggest having a GoogleMapsApi model?

@robyngit
Copy link
Member Author

2- I am planning to use the same, new, Viewfinder model. Would you suggest having a GoogleMapsApi model?

I think there are multiple good approaches here. Whatever the design in the end, it should take into account two situations that we'd like to avoid:

  1. the Viewfinder model growing overly complex (like some of our existing models) as we continue integrating more and more services in the future.
  2. the Viewfinder model becoming too closely integrated with the GMaps API, making it difficult to switch providers in the future.

One approach could involve some sort of generic GeoCoderService model that acts as an extensible template for any service we use, and serves to standardize how other models/views interact with those services. So the GoogleGeoCoderService would be an extension of the base GeoCoderService. The Viewfinder model could do the work of instantiating, configuring, and orchestrating getting results from the various GeoCoderServices. No need to follow this idea specifically. I just think it would be useful to have a clear separation of concerns between the Viewfinder and the GMaps API. What are your thoughts on this?

@ianguerin
Copy link
Collaborator

I agree with not wanting to make Viewfinder model overly complex. I would argue that integrating with more services should necessitate creating a new API endpoint so that the user's browser only emits a single API call. In this way we can aggregate the search results on the backend before returning a result to the user. In this way, Viewfinder model should only ever be integrating with a single API.

I understand the concern of making Viewfinder model too closely integrated with a specific API, I think it makes sense to create a separate model for Google Maps integration, one which returns a model, lets call it Place that will contain a GeoPoint and other metadata and will persist even if we decide to adopt a different or multiple geocoding APIs in the future.

@yvonnesjy yvonnesjy moved this from Backlog to Ready in Visualization/Frontend Feb 28, 2024
@yvonnesjy yvonnesjy moved this from Ready to In Progress in Visualization/Frontend Feb 28, 2024
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 5, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 5, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
@robyngit robyngit added this to the 2.28.0 milestone Mar 5, 2024
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 11, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 13, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 13, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 14, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 14, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 14, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 15, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 15, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 15, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 19, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 19, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 19, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 19, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit to ianguerin/metacatui that referenced this issue Mar 20, 2024
Replace lat,long-only search with search for reqular query strings.

fixes NCEAS#2280
fixes NCEAS#2270
fixes NCEAS#1796
ianguerin added a commit that referenced this issue Mar 22, 2024
Replace lat,long-only search with search for reqular query strings.

fixes #2280
fixes #2270
fixes #1796
ianguerin added a commit that referenced this issue Mar 22, 2024
Replace lat,long-only search with search for reqular query strings.

fixes #2280
fixes #2270
fixes #1796
ianguerin added a commit that referenced this issue Mar 22, 2024
Replace lat,long-only search with search for reqular query strings.

fixes #2280
fixes #2270
fixes #1796
ianguerin added a commit that referenced this issue Mar 25, 2024
Replace lat,long-only search with search for reqular query strings.

fixes #2280
fixes #2270
fixes #1796
ianguerin added a commit that referenced this issue Mar 25, 2024
Replace lat,long-only search with search for reqular query strings.

fixes #2280
fixes #2270
fixes #1796
ianguerin added a commit that referenced this issue Mar 25, 2024
Replace lat,long-only search with search for reqular query strings.

fixes #2280
fixes #2270
fixes #1796
ianguerin added a commit that referenced this issue Mar 25, 2024
Replace lat,long-only search with search for reqular query strings.

fixes #2280
fixes #2270
fixes #1796
robyngit pushed a commit that referenced this issue Mar 26, 2024
@yvonnesjy
Copy link
Collaborator

yvonnesjy commented Mar 28, 2024

Documenting the following fixes that we will implement as a part of the April release (R1):

  • Update active state when focused on search field. Bug report
  • Update search button after typing into the search field. Bug report
  • Style autosuggest buttons and add hover state. Bug report
  • Add clear button (x) to the search field. Persist the search button in all cases. New mock. Bug reports
  • Reset error message in lat/long search. Bug report

@robyngit robyngit linked a pull request Mar 28, 2024 that will close this issue
ianguerin added a commit that referenced this issue Apr 11, 2024
Replace lat,long-only search with search for reqular query strings.

fixes #2280
fixes #2270
fixes #1796
ianguerin added a commit that referenced this issue Apr 11, 2024
Replace lat,long-only search with search for reqular query strings.

fixes #2280
fixes #2270
fixes #1796
@github-project-automation github-project-automation bot moved this from In Progress to Done in Visualization/Frontend Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cesium enhancement pdg Permafrost Discovery Gateway portals Anything related to portals
Projects
None yet
5 participants