Class DefaultMapService
java.lang.Object
de.hybris.platform.storelocator.map.impl.DefaultMapService
- All Implemented Interfaces:
MapService
Default implementation of the MapService.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected GPSdetermineNorthEastCorner(GPS northEast, Location location) Determine north east corner for given southWest corner and location.protected GPSdetermineSouthWestCorner(GPS southWest, Location location) Determine south west corner for given southWest corner and location.get titledMapwith all the points of interest and the given radiusget titled Map centered around theGPSlocation.get titled Map centered around theGPSlocation with a given radius.getMapBoundsForMap(Map map) Gets the map bounds of the given map.protected RouteServiceprotected MapBoundsrecalculateBoundsAgainstMapCenter(GPS southWest, GPS northEast, GPS centerPosition) Recalculate map corners against map center.voidsetRouteService(RouteService routeService)
-
Field Details
-
DEFAULT_RADIUS
public static final double DEFAULT_RADIUS- See Also:
-
-
Constructor Details
-
DefaultMapService
public DefaultMapService()
-
-
Method Details
-
getMap
Description copied from interface:MapServiceget titled Map centered around theGPSlocation. Default radius 5[km] will be used. As no additional placemarks are required, returned map object that has null KML memberMap.getKml().- Specified by:
getMapin interfaceMapService- Parameters:
gps-GPStitle-String- Returns:
Map
-
getMap
Description copied from interface:MapServiceget titled Map centered around theGPSlocation with a given radius. As no additional placemarks are required, returned map object that has null KML memberMap.getKml().- Specified by:
getMapin interfaceMapService- Parameters:
gps-GPStitle-Stringradius- radius size as double- Returns:
Map
-
getMap
Description copied from interface:MapServiceget titledMapwith all the points of interest and the given radius -
getMap
Description copied from interface:MapService -
getMapBoundsForMap
Description copied from interface:MapServiceGets the map bounds of the given map. Calculations are perfomed basing on rectangular coordinates, not just a radius.- Specified by:
getMapBoundsForMapin interfaceMapService- Parameters:
map- the map to calculate bounds for- Returns:
- the calculated map bounds
-
determineSouthWestCorner
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 cornerlocation- 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
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 cornderlocation- 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 westnorthEast- the north eastcenterPosition- the center position- Returns:
- the new GPS rectangle object that contains calculated values for the corners
- Throws:
GeoLocatorException
-
getRouteService
-
setRouteService
-