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

Feature-Request: Geolocation #3

Closed
mariemchtourou opened this issue Jun 12, 2020 · 5 comments
Closed

Feature-Request: Geolocation #3

mariemchtourou opened this issue Jun 12, 2020 · 5 comments
Labels
feature New feature or request wontfix This will not be worked on

Comments

@mariemchtourou
Copy link

Hi!
I wanted to know if you included a way to get geolocation without JS. I am using Symfony and I want to get my current location on my controller.
Thank you!

@bresam
Copy link
Owner

bresam commented Jun 12, 2020

Hi!
This package includes features around the Google API and Google Maps. According to my information Google does not offer geo-location tracking by IP address so I would not implement this in this package.
If I am wrong on this, I am open for further inputs and would put this on the road map accordingly.

Please let me know your thoughts.

@bresam bresam changed the title Geolocation Feature-Request: Geolocation Jun 12, 2020
@bresam bresam added the feature New feature or request label Jun 12, 2020
@mariemchtourou
Copy link
Author

I only saw this documentation: https://developers.google.com/maps/documentation/javascript/geolocation
But, it's in JS and I want to add it to my controller. Do you have a way around it?

@bresam
Copy link
Owner

bresam commented Jun 12, 2020

As they refer in the docs what geolocation is and how it works, it's only possible on client side to get detailed geolocation informations:

W3C Geolocation standard
Applications that want to perform geolocation must support the W3C Geolocation standard. Notice that the sample code above determines the user's location through the W3C navigator.geolocation property.

Some browsers use IP addresses to detect a user's location. However, it may only provide a rough estimate of a user's location. The W3C approach is the easiest and most fully-supported so it should be prioritized over other geolocation methods.

If you want to do this from server side, you have to use an API like ipstack.
Such a function wont be supported by this package because it is off-topic.

Is this answer fine for you?

@mariemchtourou
Copy link
Author

All good!
Thank you so much for your hard work!

@bresam
Copy link
Owner

bresam commented Jun 13, 2020

Thank you.

@bresam bresam closed this as completed Jun 13, 2020
@bresam bresam added the wontfix This will not be worked on label Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants