Interface GeoCoordinateService
- All Known Implementing Classes:
DefaultGeoCoordinateService
public interface GeoCoordinateService
Operations that involve converting addresses to geographic coordinates.
-
Method Summary
Modifier and TypeMethodDescriptiongetDistanceBetweenAddresses
(com.broadleafcommerce.fulfillment.common.domain.Address address1, com.broadleafcommerce.fulfillment.common.domain.Address address2, String radiusUnit) Determine the distance between two givenaddresses
.void
hydrateAddressCoordinates
(com.broadleafcommerce.fulfillment.common.domain.Address address) Compute and set thelatitude
andlongitude
of the givenAddress
t
-
Method Details
-
hydrateAddressCoordinates
void hydrateAddressCoordinates(com.broadleafcommerce.fulfillment.common.domain.Address address) Compute and set thelatitude
andlongitude
of the givenAddress
t- Parameters:
address
- TheAddress
for which to determine geographic coordinates.
-
getDistanceBetweenAddresses
@Nullable Double getDistanceBetweenAddresses(com.broadleafcommerce.fulfillment.common.domain.Address address1, com.broadleafcommerce.fulfillment.common.domain.Address address2, String radiusUnit) Determine the distance between two givenaddresses
. Returns null if the distance cannot be determined.- Parameters:
address1
- The first location of the measurement.address2
- The second location of the measurement.radiusUnit
- The unit of measure for the returned value, eitherMILE
orKILOMETER
.- Returns:
- The distance between the two given Addresses, in the unit specified. Returns null if distance cannot be determined.
-