Package com.massifmaps.geocoding
Class GeocodingRequest
java.lang.Object
com.massifmaps.geocoding.GeocodingRequest
A geocoding request describing text-based query and other optional constraints.
-
Constructor Summary
ConstructorsConstructorDescriptionGeocodingRequest(Projection projection, String query) Constructs a new GeocodingRequest object from a projection and a string-based query. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to the specified object.getCustomParameter(String param) Returns the custom parameter value of the request.Returns the location attribute of the request.
The matching address near the specified location (up to a specified radius) are preferred.floatReturns the location radius attribute of the request (in meters).Returns the projection of the request.getQuery()Returns the text-based query of the request.inthashCode()Returns the hash value of this object.voidsetCustomParameter(String param, Variant value) Sets a custom parameter value for the the request.voidsetLocation(MapPos pos) Sets the location attribute of the request.
The matching address near the specified location (up to a specified radius) are preferred.voidsetLocationRadius(float radius) Sets the location radius attribute of the request.
The default is 0, which means that location based ranking is not applied.toString()Creates a string representation of this request object, useful for logging.
-
Constructor Details
-
GeocodingRequest
Constructs a new GeocodingRequest object from a projection and a string-based query.- Parameters:
projection- The projection to use for the result and location data.query- The text-based query.
-
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
getQuery
Returns the text-based query of the request.- Returns:
- The text-based query of the request.
-
getProjection
Returns the projection of the request.- Returns:
- The projection of the request.
-
getLocation
Returns the location attribute of the request.
The matching address near the specified location (up to a specified radius) are preferred.- Returns:
- The location attribute of the request.
-
setLocation
Sets the location attribute of the request.
The matching address near the specified location (up to a specified radius) are preferred.- Parameters:
pos- The new location for the request.
-
getLocationRadius
public float getLocationRadius()Returns the location radius attribute of the request (in meters).- Returns:
- The location radius attribute of the request in meters.
-
setLocationRadius
public void setLocationRadius(float radius) Sets the location radius attribute of the request.
The default is 0, which means that location based ranking is not applied.- Parameters:
radius- The location radius attribute of the request in meters.
-
getCustomParameter
Returns the custom parameter value of the request.- Parameters:
param- The name of the parameter to return.- Returns:
- The value of the parameter. If the parameter does not exist, empty variant is returned.
-
setCustomParameter
Sets a custom parameter value for the the request.- Parameters:
param- The name of the parameter. For example, "ranking.location_sigma".value- The new value for the parameter.
-
toString
Creates a string representation of this request object, useful for logging.
-