public class DefaultLocationMapService extends java.lang.Object implements LocationMapService
| Constructor and Description |
|---|
DefaultLocationMapService() |
| Modifier and Type | Method and Description |
|---|---|
protected GPS |
calculateGPS(java.lang.String town,
java.lang.String postalCode,
java.lang.String countryCode)
Method for calculating GPS coordinates based on address.
|
protected GeoWebServiceWrapper |
getGeoServiceWrapper() |
LocationService |
getLocationService() |
Map |
getMapOfLocations(GPS gps,
int limitLocationsCount,
BaseStoreModel baseStore)
Calculating Map, basing on number of points of interest defined by user and proper radius.
|
Map |
getMapOfLocations(java.lang.String searchTerm,
java.lang.String countryCode,
int limitLocationsCount,
BaseStoreModel baseStore)
Method looks for nearby locations for given postal code or town name and creates Map object with found data.
|
Map |
getMapOfLocationsForPostcode(java.lang.String postalCode,
java.lang.String countryCode,
int limitLocationsCount,
BaseStoreModel baseStore)
Method looks for nearest locations (points of interest) to the place defined by postal code and country, and
creates Map object with given data.
|
Map |
getMapOfLocationsForTown(java.lang.String town,
int limitLocationsCount,
BaseStoreModel baseStore)
Method looks for nearest locations (points of interest) to the place defined by city name, and creates Map object
with given data.
|
MapService |
getMapService() |
double |
getRadiusMax() |
double |
getRadiusStep() |
void |
setGeoServiceWrapper(GeoWebServiceWrapper geoServiceWrapper) |
void |
setLocationService(LocationService distanceAwareLocationService) |
void |
setMapService(MapService mapService) |
void |
setRadiusMax(double radiusMax) |
void |
setRadiusStep(double radiusStep) |
protected void |
validateInputData(java.lang.Object input,
java.lang.String message)
Validation for input parameters.
|
protected void |
validateInputData(java.lang.String input,
java.lang.String message) |
public Map getMapOfLocationsForPostcode(java.lang.String postalCode, java.lang.String countryCode, int limitLocationsCount, BaseStoreModel baseStore)
LocationMapServicegetMapOfLocationsForPostcode in interface LocationMapServicepostalCode - searching condition for locations - postal codecountryCode - searching condition for locations - country codelimitLocationsCount - number of locations to returnbaseStore - if set, method will return locations bound to the given BaseStoreModelpublic Map getMapOfLocationsForTown(java.lang.String town, int limitLocationsCount, BaseStoreModel baseStore)
LocationMapServicegetMapOfLocationsForTown in interface LocationMapServicetown - searching condition for locationslimitLocationsCount - number of locations to returnbaseStore - if set, method will return locations bound to the given BaseStoreModelpublic Map getMapOfLocations(java.lang.String searchTerm, java.lang.String countryCode, int limitLocationsCount, BaseStoreModel baseStore)
LocationMapServicegetMapOfLocations in interface LocationMapServicesearchTerm - the search term - can be postal code or town namecountryCode - the country code - country code to look for (valid if given value is postal code)limitLocationsCount - number of locations to returnbaseStore - if set, method will return locations bound to the given BaseStoreModelpublic Map getMapOfLocations(GPS gps, int limitLocationsCount, BaseStoreModel baseStore)
getMapOfLocations in interface LocationMapServicegps - coordinates of center pointlimitLocationsCount - number of places to find, defined by userbaseStore - if set, method will return locations bound to the given BaseStoreModelLocationMapServiceExceptionMapServiceExceptionprotected void validateInputData(java.lang.Object input,
java.lang.String message)
input - parameter to validatemessage - message to be thrownprotected void validateInputData(java.lang.String input,
java.lang.String message)
protected GPS calculateGPS(java.lang.String town, java.lang.String postalCode, java.lang.String countryCode)
town - searching condition for locations, name of the specified citypostalCode - searching condition for locations, postal codecountryCode - searching condition for locations, code for the countryGeoServiceWrapperExceptionprotected GeoWebServiceWrapper getGeoServiceWrapper()
public void setGeoServiceWrapper(GeoWebServiceWrapper geoServiceWrapper)
public double getRadiusStep()
public void setRadiusStep(double radiusStep)
public double getRadiusMax()
public void setRadiusMax(double radiusMax)
public MapService getMapService()
public void setMapService(MapService mapService)
public void setLocationService(LocationService distanceAwareLocationService)
public LocationService getLocationService()
Copyright © 2018 SAP SE. All Rights Reserved.