1 package com.foxinmy.weixin4j.message;
2
3 import javax.xml.bind.annotation.XmlElement;
4
5 import com.foxinmy.weixin4j.request.WeixinMessage;
6 import com.foxinmy.weixin4j.type.MessageType;
7
8
9
10
11
12
13
14
15
16
17
18
19
20 public class LocationMessage extends WeixinMessage {
21
22 private static final long serialVersionUID = 2866021596599237334L;
23
24 public LocationMessage() {
25 super(MessageType.location.name());
26 }
27
28
29
30
31 @XmlElement(name = "Location_X")
32 private double x;
33
34
35
36 @XmlElement(name = "Location_Y")
37 private double y;
38
39
40
41 @XmlElement(name = "Scale")
42 private double scale;
43
44
45
46 @XmlElement(name = "Label")
47 private String label;
48
49 public double getX() {
50 return x;
51 }
52
53 public double getY() {
54 return y;
55 }
56
57 public double getScale() {
58 return scale;
59 }
60
61 public String getLabel() {
62 return label;
63 }
64
65 @Override
66 public String toString() {
67 return "LocationMessage [x=" + x + ", y=" + y + ", scale=" + scale
68 + ", label=" + label + ", " + super.toString() + "]";
69 }
70 }