Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

fix(geolocation-permission): expose method to toggle useDeviceLocation #636

Merged
merged 1 commit into from Nov 9, 2018

Conversation

JonathanMontane
Copy link
Contributor

@JonathanMontane JonathanMontane commented Nov 8, 2018

Summary

Google recommends not to ask for geolocation permission on page load but on user input.

This means that we need to have a way to modify the useDeviceLocation parameter outside of the instantiation step so that we can set it to true on user inputs.

Result

  • expose a setUseDeviceLocation in places that allows you to modify the useDeviceLocation code after instantiation.

On page load (tracking icon is not showing):
image
image

On pin click:
image

After pin click (tracking icon is showing):
image
image

Copy link
Contributor

@raphi raphi left a comment

Choose a reason for hiding this comment

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

LGTM however the Netlify demo is broken, can you check it out?
Also, it would be good to add in a few examples the option useDeviceLocation and explain that it highly increase the relevancy of search.

@JonathanMontane JonathanMontane merged commit d405e31 into master Nov 9, 2018
@JonathanMontane JonathanMontane deleted the fix/geolocation-permission branch November 9, 2018 12:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants