Showing results for 
Search instead for 
Did you mean: 

GoogleApiKey not used in GoogleMapTools

Former Member
0 Kudos


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"?>
  <error_message>You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console:</error_message>;

How can we make sure that the configured googleApiKey (set in as described here is used in that case?

We're running hybris 5.2

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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}}"/>

Also change the spring bean:

 <alias alias="geoServiceWrapper" name="googleMapsGeoServiceWrapper"/>

Answers (0)