Class ReverseGeocodingRequest

java.lang.Object
com.massifmaps.geocoding.ReverseGeocodingRequest

public class ReverseGeocodingRequest extends Object
A reverse geocoding request describing search location.
  • Constructor Details

    • ReverseGeocodingRequest

      public ReverseGeocodingRequest(Projection projection, MapPos location)
      Constructs a new ReverseGeocodingRequest object from a projection and location.
      Parameters:
      projection - The projection to use for the result and location data.
      location - The location of the query.
  • Method Details

    • equals

      public boolean equals(Object obj)
      Checks if this object is equal to the specified object.
      Overrides:
      equals in class Object
      Parameters:
      obj - The reference object.
      Returns:
      True when objects are equal, false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash value of this object.
      Overrides:
      hashCode in class Object
      Returns:
      The hash value of this object.
    • getLocation

      public MapPos getLocation()
      Returns the location of the query.
      Returns:
      The location of the query.
    • getSearchRadius

      public float getSearchRadius()
      Returns the search radius (in meters).
      Returns:
      The search radius in meters.
    • setSearchRadius

      public void setSearchRadius(float radius)
      Sets the search radius (in meters).
      The default search radius is 100 meters.
      Parameters:
      radius - The new search radius in meters.
    • getProjection

      public Projection getProjection()
      Returns the projection of the query.
      Returns:
      The projection of the query.
    • getCustomParameter

      public Variant getCustomParameter(String param)
      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

      public void setCustomParameter(String param, Variant value)
      Sets a custom parameter value for the the request.
      Parameters:
      param - The name of the parameter.
      value - The new value for the parameter.
    • toString

      public String toString()
      Creates a string representation of this request object, useful for logging.
      Overrides:
      toString in class Object
      Returns:
      The string representation of this request object.