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