Interface GeoCoordinateService

All Known Implementing Classes:
DefaultGeoCoordinateService

public interface GeoCoordinateService
Operations that involve converting addresses to geographic coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    getDistanceBetweenAddresses(com.broadleafcommerce.fulfillment.common.domain.Address address1, com.broadleafcommerce.fulfillment.common.domain.Address address2, String radiusUnit)
    Determine the distance between two given addresses.
    void
    hydrateAddressCoordinates(com.broadleafcommerce.fulfillment.common.domain.Address address)
    Compute and set the latitude and longitude of the given Address t
  • Method Details

    • hydrateAddressCoordinates

      void hydrateAddressCoordinates(com.broadleafcommerce.fulfillment.common.domain.Address address)
      Compute and set the latitude and longitude of the given Address t
      Parameters:
      address - The Address 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 given addresses. 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, either
              MILE
              
      or
              KILOMETER
              
      .
      Returns:
      The distance between the two given Addresses, in the unit specified. Returns null if distance cannot be determined.