com.foxinmy.weixin4j.message.LocationMessage Maven / Gradle / Ivy
package com.foxinmy.weixin4j.message;
import javax.xml.bind.annotation.XmlElement;
import com.foxinmy.weixin4j.request.WeixinMessage;
import com.foxinmy.weixin4j.type.MessageType;
/**
* 地理位置消息
*
* @className LocationMessage
* @author jinyu([email protected])
* @date 2014年4月6日
* @since JDK 1.6
* @see 订阅号、服务号的地理位置消息
* @see 企业号的地理位置消息
*/
public class LocationMessage extends WeixinMessage {
private static final long serialVersionUID = 2866021596599237334L;
public LocationMessage() {
super(MessageType.location.name());
}
/**
* 地理位置维度
*/
@XmlElement(name = "Location_X")
private double x;
/**
* 地理位置经度
*/
@XmlElement(name = "Location_Y")
private double y;
/**
* 地图缩放大小
*/
@XmlElement(name = "Scale")
private double scale;
/**
* 地理位置信息
*/
@XmlElement(name = "Label")
private String label;
public double getX() {
return x;
}
public double getY() {
return y;
}
public double getScale() {
return scale;
}
public String getLabel() {
return label;
}
@Override
public String toString() {
return "LocationMessage [x=" + x + ", y=" + y + ", scale=" + scale
+ ", label=" + label + ", " + super.toString() + "]";
}
}