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

Geocoding Service #1694

Closed
ghost opened this issue Jul 23, 2019 · 5 comments
Closed

Geocoding Service #1694

ghost opened this issue Jul 23, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented Jul 23, 2019

Issue description
Provide a geocoding service which will provide lat/lngs for an address request.

DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 1, 2019
- add geocoder service
- add interfaces to support geocoder request and response

implements sebholstein#1694
@DefJunx
Copy link
Contributor

DefJunx commented Oct 1, 2019

@doom777 i've done a very basic implementation of this, and I also still have to make test cases for it.

Before proceeding though, could you look at the commit and tell me if that's what you had in mind with this issue?

@ghost
Copy link
Author

ghost commented Oct 1, 2019

Looks good, just how are you preventing calls to geocode, before googleGeocoderInstance is instantiated?

@DefJunx
Copy link
Contributor

DefJunx commented Oct 1, 2019

@doom777 I'm not right now, and that's clearly a problem. What would be a good preferred way to implement that?

EDIT: I have implemented a basic guard to check if the instance is defined or not.

DefJunx referenced this issue in DefJunx/angular-google-maps Oct 2, 2019
- add initial test implementation

implements SebastianM#1694
DefJunx referenced this issue in DefJunx/angular-google-maps Oct 2, 2019
- Fix wrong geocodeMock jest function

implements SebastianM#1694
@ghost
Copy link
Author

ghost commented Oct 2, 2019

Usually the way we solve this is by storing a promise of a member, and not an instance. That way, all calls can be delayed until it's initialized.

DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 2, 2019
- avoid method being called without google being initialized
- Add geocoder interface

Implements sebholstein#1694
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 2, 2019
- Changed geocoder service structure

Implements sebholstein#1694
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 2, 2019
- add geocoder object as private observable
to follow style of other services

Implements sebholstein#1694
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 2, 2019
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 3, 2019
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 3, 2019
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 3, 2019
- Change geocoder from observable to promise
- Fix enum to match Google

Implements sebholstein#1694
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 3, 2019
- Fix tests
- Add failure test

Implements sebholstein#1694
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 9, 2019
- Remove unused methods from imports

Implements sebholstein#1694
@DefJunx
Copy link
Contributor

DefJunx commented Oct 11, 2019

@doom777 I think I'm finally done with this issue (#1743), and am somewhat satisfied about the result. Please let me know what you think about it, I'm definitely up for improvement and criticism.

DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 17, 2019
- add geocoder service
- add interfaces to support geocoder request and response
- add test cases

Implements sebholstein#1694
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 17, 2019
- add geocoder service
- add interfaces to support geocoder request and response
- add test cases

Implements sebholstein#1694
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 17, 2019
- add geocoder service
- add interfaces to support geocoder request and response
- add test cases

Implements sebholstein#1694
DefJunx referenced this issue in DefJunx/angular-google-maps Oct 17, 2019
- add initial test implementation

implements SebastianM#1694
DefJunx referenced this issue in DefJunx/angular-google-maps Oct 17, 2019
- Fix wrong geocodeMock jest function

implements SebastianM#1694
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 17, 2019
- avoid method being called without google being initialized
- Add geocoder interface

Implements sebholstein#1694
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 17, 2019
- Changed geocoder service structure

Implements sebholstein#1694
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 17, 2019
- add geocoder object as private observable
to follow style of other services

Implements sebholstein#1694
DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Oct 17, 2019
ghost pushed a commit that referenced this issue Oct 18, 2019
- add geocoder service
- add interfaces to support geocoder request and response
- add test cases

Implements: #1694
@ghost ghost closed this as completed Oct 18, 2019
pertsenga pushed a commit to pertsenga/angular-google-maps that referenced this issue Nov 6, 2019
- add geocoder service
- add interfaces to support geocoder request and response
- add test cases

Implements: sebholstein#1694
This issue was closed.
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

1 participant