View Javadoc
1   package com.foxinmy.weixin4j.message.event;
2   
3   import java.io.Serializable;
4   
5   import javax.xml.bind.annotation.XmlElement;
6   
7   import com.foxinmy.weixin4j.type.EventType;
8   
9   /**
10   * 弹出地理位置选择器的事件推送
11   * 
12   * @className MenuLocationEventMessage
13   * @author jinyu(foxinmy@gmail.com)
14   * @date 2014年9月30日
15   * @since JDK 1.6
16   * @see <a
17   *      href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140454&token=&lang=zh_CN">订阅号、服务号的弹出地理位置选择事件推送</a>
18   * @see <a
19   *      href="http://qydev.weixin.qq.com/wiki/index.php?title=%E6%8E%A5%E6%94%B6%E4%BA%8B%E4%BB%B6#.E5.BC.B9.E5.87.BA.E5.9C.B0.E7.90.86.E4.BD.8D.E7.BD.AE.E9.80.89.E6.8B.A9.E5.99.A8.E7.9A.84.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81">企业号的弹出地理位置选择事件推送</a>
20   */
21  public class MenuLocationEventMessage extends MenuEventMessage {
22  
23  	private static final long serialVersionUID = 145223888272819563L;
24  
25  	public MenuLocationEventMessage() {
26  		super(EventType.location_select);
27  	}
28  
29  	/**
30  	 * 发送的位置消息
31  	 */
32  	@XmlElement(name = "SendLocationInfo")
33  	private LocationInfo locationInfo;
34  
35  	public LocationInfo getLocationInfo() {
36  		return locationInfo;
37  	}
38  
39  	/**
40  	 * 地理位置信息
41  	 * 
42  	 * @className LocationInfo
43  	 * @author jinyu(foxinmy@gmail.com)
44  	 * @date 2015年3月29日
45  	 * @since JDK 1.6
46  	 * @see
47  	 */
48  	public static class LocationInfo implements Serializable {
49  
50  		private static final long serialVersionUID = 4904181780216819965L;
51  
52  		/**
53  		 * 地理位置维度
54  		 */
55  		@XmlElement(name = "Location_X")
56  		private double x;
57  		/**
58  		 * 地理位置经度
59  		 */
60  		@XmlElement(name = "Location_Y")
61  		private double y;
62  		/**
63  		 * 地图缩放大小
64  		 */
65  		@XmlElement(name = "Scale")
66  		private double scale;
67  		/**
68  		 * 地理位置信息
69  		 */
70  		@XmlElement(name = "Label")
71  		private String label;
72  		/**
73  		 * 朋友圈POI的名字,可能为空
74  		 */
75  		@XmlElement(name = "Poiname")
76  		private String poiname;
77  
78  		public double getX() {
79  			return x;
80  		}
81  
82  		public double getY() {
83  			return y;
84  		}
85  
86  		public double getScale() {
87  			return scale;
88  		}
89  
90  		public String getLabel() {
91  			return label;
92  		}
93  
94  		public String getPoiname() {
95  			return poiname;
96  		}
97  
98  		@Override
99  		public String toString() {
100 			return "LocationInfo [x=" + x + ", y=" + y + ", scale=" + scale
101 					+ ", label=" + label + ", poiname=" + poiname + "]";
102 		}
103 	}
104 
105 	@Override
106 	public String toString() {
107 		return "MenuLocationEventMessage [locationInfo=" + locationInfo + ", "
108 				+ super.toString() + "]";
109 	}
110 }