Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

[FEATURE] Google places search #105

Merged
merged 8 commits into from Jun 4, 2020
Merged

[FEATURE] Google places search #105

merged 8 commits into from Jun 4, 2020

Conversation

AtherBilal
Copy link
Contributor

@AtherBilal AtherBilal commented May 29, 2020

PR Safety Checklist:

  • Added the task to the appropriate release doc under Enhancements or Bug Fixes
  • Bump package.json & package-lock.json version numbers to appropriate release
  • (optional) All external API changes have been documented
  • (optional) Build docs: npm run docs

Quick Description of Changes (+ screenshots for ui changes):

Added a component to search Google places, then center and zoom to the place, lastly it will add a point on the place

GooglePlacesSearch.propTypes = {
/** reference to Openlayers map object */
map: PropTypes.object.isRequired,
apiKey: PropTypes.string.isRequired
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add comment on how to get API key

Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

const classes = useStyles()

const DataLoader = (searchString) => {
return fetch(`https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=${searchString}&inputtype=textquery&fields=geometry&key=${apiKey}`)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Get formatted address for title

@stazrad stazrad added enhancement New feature or request team reviewed 👀 PR reviewed by maintainers labels Jun 4, 2020
@stazrad stazrad added this to the v1.0 milestone Jun 4, 2020
@stazrad stazrad merged commit 860cb14 into master Jun 4, 2020
@stazrad stazrad deleted the google-places-search branch June 4, 2020 20:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request team reviewed 👀 PR reviewed by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants