Class DefaultMapService

java.lang.Object
de.hybris.platform.storelocator.map.impl.DefaultMapService
All Implemented Interfaces:
MapService

public class DefaultMapService extends Object implements MapService
Default implementation of the MapService.
  • Field Details

  • Constructor Details

    • DefaultMapService

      public DefaultMapService()
  • Method Details

    • getMap

      public Map getMap(GPS gps, String title)
      Description copied from interface: MapService
      get titled Map centered around the GPS location. Default radius 5[km] will be used. As no additional placemarks are required, returned map object that has null KML member Map.getKml().
      Specified by:
      getMap in interface MapService
      Parameters:
      gps - GPS
      title - String
      Returns:
      Map
    • getMap

      public Map getMap(GPS gps, String title, double radius)
      Description copied from interface: MapService
      get titled Map centered around the GPS location with a given radius. As no additional placemarks are required, returned map object that has null KML member Map.getKml().
      Specified by:
      getMap in interface MapService
      Parameters:
      gps - GPS
      title - String
      radius - radius size as double
      Returns:
      Map
    • getMap

      public Map getMap(GPS gps, double radius, List<Location> poi, String title)
      Description copied from interface: MapService
      get titled Map with all the points of interest and the given radius
      Specified by:
      getMap in interface MapService
      Parameters:
      gps - GPS
      radius - radius size as double
      poi - List of Location
      title - String
      Returns:
      Map
    • getMap

      public Map getMap(GPS center, double radius, List<Location> poi, String title, Location routeTo)
      Description copied from interface: MapService
      Returns the Map that contains list of POIs and a route from the center GPS location to the 'routeTo' Location
      Specified by:
      getMap in interface MapService
      Parameters:
      center - GPS
      radius - radius size as double
      poi - List of Location
      title - String
      routeTo - Location
      Returns:
      Map
    • getMapBoundsForMap

      public MapBounds getMapBoundsForMap(Map map)
      Description copied from interface: MapService
      Gets the map bounds of the given map. Calculations are perfomed basing on rectangular coordinates, not just a radius.
      Specified by:
      getMapBoundsForMap in interface MapService
      Parameters:
      map - the map to calculate bounds for
      Returns:
      the calculated map bounds
    • determineSouthWestCorner

      protected GPS determineSouthWestCorner(GPS southWest, Location location)
      Determine south west corner for given southWest corner and location. If location is outside south west corner the corner coordinates will be expanded to contain location.
      Parameters:
      southWest - the south west bounds corner
      location - the location that will be assured to be placed inside the rectangle
      Returns:
      the new GPS corner location that will contain given location
      Throws:
      GeoLocatorException
    • determineNorthEastCorner

      protected GPS determineNorthEastCorner(GPS northEast, Location location)
      Determine north east corner for given southWest corner and location. If location is outside south west corner the corner coordinates will be expanded to contain location.
      Parameters:
      northEast - the north east bounds cornder
      location - the location that will be assured to be placed inside the rectangle
      Returns:
      the new GPS corner location that will contain given location
      Throws:
      GeoLocatorException - the geo locator exception
    • recalculateBoundsAgainstMapCenter

      protected MapBounds recalculateBoundsAgainstMapCenter(GPS southWest, GPS northEast, GPS centerPosition)
      Recalculate map corners against map center. Map corners are cal
      Parameters:
      southWest - the south west
      northEast - the north east
      centerPosition - the center position
      Returns:
      the new GPS rectangle object that contains calculated values for the corners
      Throws:
      GeoLocatorException
    • getRouteService

      protected RouteService getRouteService()
    • setRouteService

      public void setRouteService(RouteService routeService)