Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class Place
- Object
- Place
One geocoding result: a named place, an address or a street, and where
it is.
Constructors
public Place(String name, String displayName, LatLng location, String category, String type, String houseNumber, String road, String city, String postcode) | Creates a result. |
Methods
public String getName() | The place’s own name, empty for a bare address. |
public String getDisplayName() | The full line to show the user, name and address together. |
public LatLng getLocation() | Where the place is. |
public String getCategory() | The OpenStreetMap key that classifies the place: amenity, shop, place, highway and so on. |
public String getType() | The value of getCategory()’s key: cafe, city, residential. |
public String getHouseNumber() | The house number of the address, or empty. |
public String getRoad() | The street of the address, or empty. |
public String getCity() | The city of the address, or empty. |
public String getPostcode() | The postal code of the address, or empty. |
public String toString() | Returns a string representation of the object. |
Inherited methods
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
nameString- the place’s own name, empty for a bare address
displayNameString- the full line to show the user
locationLatLng- where the place is
categoryString- the OpenStreetMap key that classifies it,
amenityorhighwayfor example typeString- that key’s value,
cafeorresidentialfor example houseNumberString- the house number, when the place has an address
roadString- the street of the address
cityString- the city of the address
postcodeString- 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()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()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())