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

Google API Key should be optional #127

Closed
cbellone opened this issue Jun 18, 2016 · 9 comments
Closed

Google API Key should be optional #127

cbellone opened this issue Jun 18, 2016 · 9 comments

Comments

@cbellone
Copy link
Member

see #126

@bunsenmcdubbs
Copy link
Contributor

Is anyone working on this right now? If not, I wouldn't mind taking a look in the next 1-3 weeks

@cbellone
Copy link
Member Author

cbellone commented Jul 6, 2016

Hi @bunsenmcdubbs,
thank you, that would be highly appreciated.

Please note that on dev environment, there is no call made to the google maps server API (geolocation / timezone), as the DefaultLocationManager is not enabled.

@bunsenmcdubbs
Copy link
Contributor

I'm going to experiment and play with it tomorrow but I think this is very promising: http://www.intertech.com/Blog/spring-4-conditional-bean-configuration/

Using this instead of or with the Profile annotation to switch between DefaultLocationManager and MockLocationManager

bunsenmcdubbs added a commit to bunsenmcdubbs/alf.io that referenced this issue Jul 10, 2016
@bunsenmcdubbs
Copy link
Contributor

6a909bd does not work. see my comment

bunsenmcdubbs added a commit to bunsenmcdubbs/alf.io that referenced this issue Jul 16, 2016
@bunsenmcdubbs
Copy link
Contributor

@cbellone what do you think of my approach in 40daea0?

If there is no API key then we use the MockLocationManager. I'm going to take a look at removing maps in the front end as well. Do you have any suggestions?

bunsenmcdubbs added a commit to bunsenmcdubbs/alf.io that referenced this issue Jul 16, 2016
@cbellone
Copy link
Member Author

Hi Andrew,

Apologies for the delay.

I don't think that we can use the MockLocationManager in a production
environment.
The problem is that the MockLocationManager always returns "Europe/Zurich"
as time zone for the event, and that would be simply wrong in most cases.

I think we could do the following:

  1. If google maps server api key is missing, enable the "event time zone"
    field (select? Input + autocompletion?) on the GUI

  2. change the return type for all methods in the LocationManager interface
    from T to Optional, and return Optional.empty() in case of error or
    missing key

  3. modify the event validation/insert process accordingly (if geocode or
    getTimezone return empty, then validate and use the "event time zone" input
    value)

How does it sound?

Il 16-lug-2016 4:31 PM, "Andrew Dai" notifications@github.com ha scritto:

@cbellone https://github.com/cbellone what do you think of my approach
in 40daea0
bunsenmcdubbs@40daea0
?

If there is no API key then we use the MockLocationManager. I'm going to
take a look at removing maps in the front end as well. Do you have any
suggestions?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#127 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADOoAun66uj0kytU0dFW0hVFLlar8UeXks5qWOs8gaJpZM4I47c_
.

@bunsenmcdubbs
Copy link
Contributor

@cbellone Unfortunately I won't be able to work on this for a while. My organization has found another solution. I am still interested in staying involved but I'll have to take a step back for the next month or so.

@cbellone
Copy link
Member Author

cbellone commented Aug 5, 2016

Hi @bunsenmcdubbs ,
don't worry, and thank you very much for your help.
Hope to hear from you soon :)
Celestino

@syjer
Copy link
Member

syjer commented Nov 22, 2018

has been implemented some time ago :)

@syjer syjer closed this as completed Nov 22, 2018
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

3 participants