All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Explore the source code of the class Location.java

package com.antonioaltieri.telegram.botapi.types;

import com.google.gson.annotations.SerializedName;

/**
 * This object represents a point on the map.
 *
 * @see https://core.telegram.org/bots/api#location
 */
public class Location {

    @SerializedName("longitude")
    private float longitude;

    @SerializedName("latitude")
    private float latitude;

    /**
     * @return Longitude as defined by sender
     */
    public float getLongitude() {
        return longitude;
    }

    /**
     * @return Latitude as defined by sender
     */
    public float getLatitude() {
        return latitude;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Location{");
        sb.append("longitude=").append(longitude);
        sb.append(", latitude=").append(latitude);
        sb.append('}');
        return sb.toString();
    }
}