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.voidhydrateAddressCoordinates(com.broadleafcommerce.fulfillment.common.domain.Address address) Compute and set thelatitudeandlongitudeof the givenAddresst
-
Method Details
-
hydrateAddressCoordinates
void hydrateAddressCoordinates(com.broadleafcommerce.fulfillment.common.domain.Address address) Compute and set thelatitudeandlongitudeof the givenAddresst- Parameters:
address- TheAddressfor 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, eitherMILEorKILOMETER.- Returns:
- The distance between the two given Addresses, in the unit specified. Returns null if distance cannot be determined.
-