on 10-12-2015 3:44 PM
Hi
We realised that when using the DefaultStoreFinderService the underlying Google Geocode Api Call made by the de.hybris.platform.storelocator.impl.GoogleMapTools.class doesn't use the configured "googleApiKey" and we therefore often receive the following Response for the REST Call in GoogleMapTools.geocodeAddress(addressData)
<?xml version="1.0" encoding="UTF-8"?>
<GeocodeResponse>
<status>OVER_QUERY_LIMIT</status>
<error_message>You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/</error_message>;
</GeocodeResponse>
How can we make sure that the configured googleApiKey (set in project.properties as described here https://wiki.hybris.com/display/accdoc/Store+Locator+Configuration#StoreLocatorConfiguration-Storefr...) is used in that case?
We're running hybris 5.2
Better late than never! You should configure spring bean in {yourExtension}-spring.xml:
<alias name="customGoogleMapTools" alias="googleMapTools"/>
<bean id="customGoogleMapTools" parent="defaultGoogleMapTools"
class="de.hybris.platform.storelocator.impl.GoogleMapTools" scope="prototype">
<property name="googleKey" value="${googleApiKey:#{null}}"/>
</bean>
Also change the spring bean:
<alias alias="geoServiceWrapper" name="googleMapsGeoServiceWrapper"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.