1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.htmlunit.javascript.host.geo;
16
17 import org.htmlunit.javascript.HtmlUnitScriptable;
18 import org.htmlunit.javascript.JavaScriptEngine;
19 import org.htmlunit.javascript.configuration.JsxClass;
20 import org.htmlunit.javascript.configuration.JsxConstructor;
21 import org.htmlunit.javascript.configuration.JsxGetter;
22
23
24
25
26
27
28
29 @JsxClass
30 public class GeolocationCoordinates extends HtmlUnitScriptable {
31
32 private double latitude_;
33 private double longitude_;
34 private double accuracy_;
35
36
37
38
39 public GeolocationCoordinates() {
40 super();
41 }
42
43 GeolocationCoordinates(final double latitude, final double longitude, final double accuracy) {
44 super();
45 latitude_ = latitude;
46 longitude_ = longitude;
47 accuracy_ = accuracy;
48 }
49
50
51
52
53 @JsxConstructor
54 public void jsConstructor() {
55 throw JavaScriptEngine.typeErrorIllegalConstructor();
56 }
57
58
59
60
61
62 @JsxGetter
63 public double getLatitude() {
64 return latitude_;
65 }
66
67
68
69
70
71 @JsxGetter
72 public double getLongitude() {
73 return longitude_;
74 }
75
76
77
78
79
80 @JsxGetter
81 public double getAccuracy() {
82 return accuracy_;
83 }
84
85 }