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.String
GOOGLE_GEOCODING_URL
static java.lang.String
GOOGLE_MAPS_URL
-
Constructor Summary
Constructors Constructor Description GoogleMapsServiceWrapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
formatAddress(Location address)
Formats the address textual information depending on the implementationGPS
geocodeAddress(AddressData address)
Translate AddressData to IGPS using 3rd party serviceGPS
geocodeAddress(Location address)
Translate IAddress to IGPS using 3rd party serviceDistanceAndRoute
getDistanceAndRoute(GPS start, Location destination)
Get distance and route that is between start GPS location and destination addressDistanceAndRoute
getDistanceAndRoute(Location start, Location destination)
Get distance and route that is between two addressesprotected GoogleMapTools
getMapTools(java.lang.String url)
void
setGoogleMapTools(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:GeoWebServiceWrapper
Translate IAddress to IGPS using 3rd party service- Specified by:
geocodeAddress
in interfaceGeoWebServiceWrapper
- Returns:
- IGPS
- Throws:
GeoServiceWrapperException
-
geocodeAddress
public GPS geocodeAddress(AddressData address) throws GeoServiceWrapperException
Description copied from interface:GeoWebServiceWrapper
Translate AddressData to IGPS using 3rd party service- Specified by:
geocodeAddress
in interfaceGeoWebServiceWrapper
- Returns:
- IGPS
- Throws:
GeoServiceWrapperException
-
getDistanceAndRoute
public DistanceAndRoute getDistanceAndRoute(Location start, Location destination) throws GeoServiceWrapperException
Description copied from interface:GeoWebServiceWrapper
Get distance and route that is between two addresses- Specified by:
getDistanceAndRoute
in interfaceGeoWebServiceWrapper
- Parameters:
start
-Location
destination
-Location
- Returns:
DistanceAndRoute
- Throws:
GeoServiceWrapperException
-
formatAddress
public java.lang.String formatAddress(Location address) throws GeoServiceWrapperException
Description copied from interface:GeoWebServiceWrapper
Formats the address textual information depending on the implementation- Specified by:
formatAddress
in interfaceGeoWebServiceWrapper
- Parameters:
address
-Location
- Returns:
String
- Throws:
GeoServiceWrapperException
-
getDistanceAndRoute
public DistanceAndRoute getDistanceAndRoute(GPS start, Location destination) throws GeoServiceWrapperException
Description copied from interface:GeoWebServiceWrapper
Get distance and route that is between start GPS location and destination address- Specified by:
getDistanceAndRoute
in interfaceGeoWebServiceWrapper
- Parameters:
start
-GPS
destination
-Location
- Returns:
DistanceAndRoute
- Throws:
GeoServiceWrapperException
-
setGoogleMapTools
public void setGoogleMapTools(GoogleMapTools googleMapTools)
-
-