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

Enable search box geocoder provider selection #2224

Merged
merged 3 commits into from
Jan 22, 2019

Conversation

jesusbotella
Copy link
Contributor

@jesusbotella jesusbotella commented Jan 18, 2019

This PR allow us to select the geocoding provider for the search box overlay in Builder by injecting geocodingConfiguration variable containing the needed configuration into window scope.

Mirror PR from cartodb: CartoDB/cartodb#14622
Related to #2223.

@@ -67,11 +67,13 @@ var Search = View.extend({
},

_initializeGeocoder: function () {
this.geocoderService = this.options.geocoderService || DEFAULT_GEOCODER;
const injectedGeocoderConfig = this._getGeocodingInfoFromConfig();
Copy link
Contributor

Choose a reason for hiding this comment

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

The only thing that tingles my spidey sense is the mix of configurations.

I can get the provider from the injected config but the token can be undefined and then I go directly for the window property... those combinations.

That won't break the code but if a configuration is wrong perhaps it makes it harder to debug.

@jesusbotella jesusbotella merged commit fd5b298 into master Jan 22, 2019
@jesusbotella jesusbotella deleted the 2223-searchbox-provider branch January 22, 2019 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants