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

geo.helper.geocode raw flag logic #57

Open
asarapas opened this issue Aug 24, 2018 · 4 comments
Open

geo.helper.geocode raw flag logic #57

asarapas opened this issue Aug 24, 2018 · 4 comments

Comments

@asarapas
Copy link

Hi, I'm trying to get google raw object from "locate" method.
Looking at the code, geocode method:

response = options.raw
                ? response
                : geoHelper.formatGeocodeResults(response.results);

options.raw will always be undefined. Should it not be conf.raw, that way we could set this flag in the Google Configuration:

               geoLocator.config({
                    language: "en",
                    google: {
                        version: "3",
                        key: key
                    },
                    raw: true
                });

Ideally raw should be attribute of the options, but this probably would require more rework to pass it to geocode method

@onury
Copy link
Owner

onury commented Aug 24, 2018

Hi. raw option is only used with Google API methods. So it'd be better under options.google.raw for globally pre-setting it.

But .locate() does not make use of any Google APIs. It primarily uses HTML5 Geolocation API so it has no raw option.

@onury onury added the question label Aug 24, 2018
@onury
Copy link
Owner

onury commented Aug 24, 2018

Sorry, I think you mean when you enable addressLookup option for .locate()..
Sure. I'll mark this as feature-request until I have the time.

@asarapas
Copy link
Author

Yes, correct. I would like to keep address lookup logic in your side, but standard address parsing does not suit our needs.
Maybe another option would be to allow override "Address/location parser" formatGeocodeResults method?

@asarapas
Copy link
Author

asarapas commented Aug 1, 2019

Can you please review pull request and approve it or provide comments so issue could be completed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants