-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cWebGoogleMaps.pkg
99 lines (81 loc) · 2.84 KB
/
cWebGoogleMaps.pkg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Use cWebBaseControl.pkg
Struct tGoogleMapsShowRoute
String[] waypoints
End_Struct
Class cWebGoogleMaps is a cWebBaseControl
Procedure Construct_Object
Forward Send Construct_Object
Set psJSClass to "WebGoogleMaps"
Set pbShowLabel to False
Set piColumnSpan to 0
Set pbFillHeight to True
{ WebProperty=Client }
Property Number pnInitialCenterLat
{ WebProperty=Client }
Property Number pnInitialCenterLng
{ WebProperty=Client }
Property Integer piZoom
{ WebProperty=Client }
Property Boolean pbServerOnClick False
{ WebProperty=Client }
Property String psClientOnClick ""
{ WebProperty=Client }
Property Boolean pbServerOnRightClick False
{ WebProperty=Client }
Property String psClientOnRightClick ""
End_Procedure
Procedure End_Construct_Object
Forward Send End_Construct_Object
WebPublishProcedure OnClick
WebPublishProcedure OnRightClick
End_Procedure
Procedure PanTo Number nLat Number nLng
String[] aParams
Move nLat to aParams[0]
Move nLng to aParams[1]
Send ClientAction "panTo" aParams
End_Procedure
Procedure SetCenter Number nLat Number nLng
String[] aParams
Move nLat to aParams[0]
Move nLng to aParams[1]
Send ClientAction "setCenter" aParams
End_Procedure
Procedure AddMarker Number nLat Number nLng String sTitle String sInfoText String sIcon
String[] aParams
Move nLat to aParams[0]
Move nLng to aParams[1]
Move sTitle to aParams[2]
Move sInfoText to aParams[3]
If (num_arguments > 4) Begin
Move sIcon to aParams[4]
End
Send ClientAction "addMarker" aParams
End_Procedure
Procedure Geolocate
Send ClientAction "geolocate"
End_Procedure
// Needs Directions API enabled
Procedure ShowRoute String sOrigin String sDestination String[] saWaypoints
String[] aParams
tGoogleMapsShowRoute stExtraData
tWebValueTree stVT
Move sOrigin to aParams[0]
Move sDestination to aParams[1]
If (num_arguments > 2) Begin
Move saWaypoints to stExtraData.waypoints
ValueTreeSerializeParameter stExtraData to stVT
End
Send ClientAction "showRoute" aParams stVT
End_Procedure
Procedure ResetMap
WebSet piZoom to (piZoom(Self))
Send ClientAction "initializeMap"
End_Procedure
{ MethodType=Event }
Procedure OnClick Number nLat Number nLng Integer iClientX Integer iClientY
End_Procedure
{ MethodType=Event }
Procedure OnRightClick Number nLat Number nLng Integer iClientX Integer iClientY
End_Procedure
End_Class