com.foxinmy.weixin4j.message.event.MenuLocationEventMessage Maven / Gradle / Ivy
package com.foxinmy.weixin4j.message.event;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlElement;
import com.foxinmy.weixin4j.type.EventType;
/**
* 弹出地理位置选择器的事件推送
*
* @className MenuLocationEventMessage
* @author jinyu([email protected])
* @date 2014年9月30日
* @since JDK 1.6
* @see 订阅号、服务号的弹出地理位置选择事件推送
* @see 企业号的弹出地理位置选择事件推送
*/
public class MenuLocationEventMessage extends MenuEventMessage {
private static final long serialVersionUID = 145223888272819563L;
public MenuLocationEventMessage() {
super(EventType.location_select);
}
/**
* 发送的位置消息
*/
@XmlElement(name = "SendLocationInfo")
private LocationInfo locationInfo;
public LocationInfo getLocationInfo() {
return locationInfo;
}
/**
* 地理位置信息
*
* @className LocationInfo
* @author jinyu([email protected])
* @date 2015年3月29日
* @since JDK 1.6
* @see
*/
public static class LocationInfo implements Serializable {
private static final long serialVersionUID = 4904181780216819965L;
/**
* 地理位置维度
*/
@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;
/**
* 朋友圈POI的名字,可能为空
*/
@XmlElement(name = "Poiname")
private String poiname;
public double getX() {
return x;
}
public double getY() {
return y;
}
public double getScale() {
return scale;
}
public String getLabel() {
return label;
}
public String getPoiname() {
return poiname;
}
@Override
public String toString() {
return "LocationInfo [x=" + x + ", y=" + y + ", scale=" + scale
+ ", label=" + label + ", poiname=" + poiname + "]";
}
}
@Override
public String toString() {
return "MenuLocationEventMessage [locationInfo=" + locationInfo + ", "
+ super.toString() + "]";
}
}