Class GoogleMapsServiceWrapper
- java.lang.Object
-
- de.hybris.platform.storelocator.impl.GoogleMapsServiceWrapper
-
- All Implemented Interfaces:
GeoWebServiceWrapper
public class GoogleMapsServiceWrapper extends java.lang.Object implements GeoWebServiceWrapper
Wrapper that performs communication with google geo-location services.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGOOGLE_GEOCODING_URLstatic java.lang.StringGOOGLE_MAPS_URL
-
Constructor Summary
Constructors Constructor Description GoogleMapsServiceWrapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringformatAddress(Location address)Formats the address textual information depending on the implementationGPSgeocodeAddress(AddressData address)Translate AddressData to IGPS using 3rd party serviceGPSgeocodeAddress(Location address)Translate IAddress to IGPS using 3rd party serviceDistanceAndRoutegetDistanceAndRoute(GPS start, Location destination)Get distance and route that is between start GPS location and destination addressDistanceAndRoutegetDistanceAndRoute(Location start, Location destination)Get distance and route that is between two addressesprotected GoogleMapToolsgetMapTools(java.lang.String url)voidsetGoogleMapTools(GoogleMapTools googleMapTools)
-
-
-
Field Detail
-
GOOGLE_MAPS_URL
public static final java.lang.String GOOGLE_MAPS_URL
- See Also:
- Constant Field Values
-
GOOGLE_GEOCODING_URL
public static final java.lang.String GOOGLE_GEOCODING_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMapTools
protected GoogleMapTools getMapTools(java.lang.String url)
-
geocodeAddress
public GPS geocodeAddress(Location address) throws GeoServiceWrapperException
Description copied from interface:GeoWebServiceWrapperTranslate IAddress to IGPS using 3rd party service- Specified by:
geocodeAddressin interfaceGeoWebServiceWrapper- Returns:
- IGPS
- Throws:
GeoServiceWrapperException
-
geocodeAddress
public GPS geocodeAddress(AddressData address) throws GeoServiceWrapperException
Description copied from interface:GeoWebServiceWrapperTranslate AddressData to IGPS using 3rd party service- Specified by:
geocodeAddressin interfaceGeoWebServiceWrapper- Returns:
- IGPS
- Throws:
GeoServiceWrapperException
-
getDistanceAndRoute
public DistanceAndRoute getDistanceAndRoute(Location start, Location destination) throws GeoServiceWrapperException
Description copied from interface:GeoWebServiceWrapperGet distance and route that is between two addresses- Specified by:
getDistanceAndRoutein interfaceGeoWebServiceWrapper- Parameters:
start-Locationdestination-Location- Returns:
DistanceAndRoute- Throws:
GeoServiceWrapperException
-
formatAddress
public java.lang.String formatAddress(Location address) throws GeoServiceWrapperException
Description copied from interface:GeoWebServiceWrapperFormats the address textual information depending on the implementation- Specified by:
formatAddressin interfaceGeoWebServiceWrapper- Parameters:
address-Location- Returns:
String- Throws:
GeoServiceWrapperException
-
getDistanceAndRoute
public DistanceAndRoute getDistanceAndRoute(GPS start, Location destination) throws GeoServiceWrapperException
Description copied from interface:GeoWebServiceWrapperGet distance and route that is between start GPS location and destination address- Specified by:
getDistanceAndRoutein interfaceGeoWebServiceWrapper- Parameters:
start-GPSdestination-Location- Returns:
DistanceAndRoute- Throws:
GeoServiceWrapperException
-
setGoogleMapTools
public void setGoogleMapTools(GoogleMapTools googleMapTools)
-
-