Class Place

java.lang.Object
com.codename1.maps.geocoding.Place

public final class Place extends Object
One geocoding result: a named place, an address or a street, and where it is.
  • Constructor Details

    • Place

      public Place(String name, String displayName, LatLng location, String category, String type, String houseNumber, String road, String city, String postcode)

      Creates a result. Every string may be empty but none is null.

      Parameters
      • name: the place's own name, empty for a bare address
      • displayName: the full line to show the user
      • location: where the place is
      • category: the OpenStreetMap key that classifies it, amenity or highway for example
      • type: that key's value, cafe or residential for example
      • houseNumber: the house number, when the place has an address
      • road: the street of the address
      • city: the city of the address
      • postcode: the postal code of the address
  • Method Details

    • getName

      public String getName()
      The place's own name, empty for a bare address.
    • getDisplayName

      public String getDisplayName()
      The full line to show the user, name and address together.
    • getLocation

      public LatLng getLocation()
      Where the place is.
    • getCategory

      public String getCategory()
      The OpenStreetMap key that classifies the place: amenity, shop, place, highway and so on.
    • getType

      public String getType()
      The value of getCategory()'s key: cafe, city, residential.
    • getHouseNumber

      public String getHouseNumber()
      The house number of the address, or empty.
    • getRoad

      public String getRoad()
      The street of the address, or empty.
    • getCity

      public String getCity()
      The city of the address, or empty.
    • getPostcode

      public String getPostcode()
      The postal code of the address, or empty.
    • toString

      public String toString()
      Description copied from class: Object
      Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
      Overrides:
      toString in class Object