-
Notifications
You must be signed in to change notification settings - Fork 1
/
ucGxGooglePlace.xml
246 lines (227 loc) · 17 KB
/
ucGxGooglePlace.xml
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<?xml version="1.0" encoding="utf-8"?>
<ExportFile>
<KMW>
<MajorVersion>4</MajorVersion>
<MinorVersion>0</MinorVersion>
<Build>140712</Build>
</KMW>
<Source kb="c44767b6-13ef-49f5-8f32-1d4cd33d7f06" username="MARIO\mario" UNCPath="\\MARIO\C$\KBase\MeuRestauranteBackoffice">
<Version guid="5560f3f2-fec8-459c-a7f6-3867b83da0c2" name="MeuRestauranteBackoffice" />
</Source>
<Objects>
<Object parent="PlacesGoogle" parentType="00000000-0000-0000-0000-000000000008" parentGuid="c87cb2a5-35c2-4954-aa65-ccbe4b3edc76" user="MARIO\mario" versionDate="2020-06-06T16:01:09.0000000Z" lastUpdate="2020-06-06T14:03:50.0000000Z" checksum="7dc1e1fcc982b90d87569735c02aae43" fullyQualifiedName="ucGxPlaceGoogle" moduleGuid="afa47377-41d5-4ae8-9755-6f53150aa361" guid="30d4c0ad-3daf-4587-8b79-f2a5047ec8e8" name="ucGxPlaceGoogle" type="562f4793-aabe-449f-8821-fc77e550698e" description="uc Gx Place Google">
<Part type="3dd92fe7-b095-44d3-9fa0-8488fa3f0c67">
<Source><![CDATA[]]></Source>
<Properties><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Part>
<Part type="8e9e4a7c-a4d3-4c36-8e8e-fb6702402f63">
<Source><![CDATA[<Definition auto='false'>
<Property Name="AttachControlID" Type="string" Default=""/>
<Property Name="Json" Type="string" Default=""/>
<Property Name="ApiKEY" Type="string" Default=""/>
<Event Name="Confirmed" On="Click"/>
<Script Name="Load" When="BeforeShow">
myplace = this;
//transformei a string em unicode pois assim garanto que o gx não irá dar problema se eu colocar a url neste fonte
//basicamente é a url que consta na aba documentation deste objeto
myplace.googlescript = "\u0068\u0074\u0074\u0070\u0073\u003a\u002f\u002f\u006d\u0061\u0070\u0073\u002e\u0067\u006f\u006f\u0067\u006c\u0065\u0061\u0070\u0069\u0073\u002e\u0063\u006f\u006d\u002f\u006d\u0061\u0070\u0073\u002f\u0061\u0070\u0069\u002f\u006a\u0073\u003f\u006b\u0065\u0079\u003d"
myplace.googlescript += myplace.ApiKEY
myplace.googlescript += "\u0026\u006c\u0069\u0062\u0072\u0061\u0072\u0069\u0065\u0073\u003d\u0070\u006c\u0061\u0063\u0065\u0073"
</Script>
<Script Name="AfterLoad" When="AfterShow">
$.getScript(myplace.googlescript, function(){
myplace._initAutocomplete();
});
</Script>
<script name="_initAutocomplete">
myplace.GeoLocate();
// Create the autocomplete object, restricting the search predictions to
// geographical location types.
myplace.autocomplete = new google.maps.places.Autocomplete(document.getElementById(myplace.AttachControlID), {types: ['geocode']});
// Avoid paying for data that you don't need by restricting the set of
// place fields that are returned to just the address components.
myplace.autocomplete.setFields(['address_component']);
// When the user selects an address from the drop-down, populate the
// address fields in the form.
myplace.autocomplete.addListener('place_changed', myplace._fillInAddress);
</script>
<script name="_fillInAddress">
// Get the place details from the autocomplete object.
var place = myplace.autocomplete.getPlace();
myplace.Json = JSON.stringify(place);
//Executa o evento, avisando a interface que um endereço foi selecionado
myplace.Confirmed();
</script>
<script Name="GeoLocate">
//Caso o usuário autorize o browser a obter sua localização, já irá fazer um filtro nos endereços próximos
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
function(position) {
var geolocation = {
lat: position.coords.latitude,
lng: position.coords.longitude
};
if (google){
var circle = new google.maps.Circle({center: geolocation, radius: position.coords.accuracy});
myplace.autocomplete.setBounds(circle.getBounds());
}
});
}
</script>
</Definition>]]></Source>
<Properties><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Part>
<Part type="babf62c5-0111-49e9-a1c3-cc004d90900a">
<InnerHtml><![CDATA[<SPAN style='FONT-SIZE: 12px; FONT-FAMILY: Consolas, "Lucida Console", "Courier New", monospace; WHITE-SPACE: pre; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(209,151,127); FONT-STYLE: normal; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(36,36,36); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>"https://maps.googleapis.com/maps/api/js?key=APIKEY&libraries=places"</SPAN>]]></InnerHtml>
<Properties><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Part>
<Properties><Property><Name>Name</Name><Value>ucGxPlaceGoogle</Value></Property><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Object>
<Object parent="PlacesGoogle" parentType="00000000-0000-0000-0000-000000000008" parentGuid="c87cb2a5-35c2-4954-aa65-ccbe4b3edc76" user="DESKTOP-1PP854A\Felipe Neves" versionDate="2020-06-06T16:01:09.0000000Z" lastUpdate="2020-06-06T02:13:53.0000000Z" checksum="85a23a57e056ff02223023de37299837" fullyQualifiedName="PlaceControlExample" moduleGuid="afa47377-41d5-4ae8-9755-6f53150aa361" guid="6f7a1e79-5654-42d1-b751-90bccf4f40c2" name="PlaceControlExample" type="c9584656-94b6-4ccd-890f-332d11fc2c25" description="Place Control Example">
<Part type="d24a58ad-57ba-41b7-9e6e-eaca3543c778">
<Source><![CDATA[<GxMultiForm rootId="1" version="html:15.0.0;layout:16.0.0"><Form id="1" type="layout"><detail><layout><table controlName="MainTable" tableType="Responsive" responsiveSizes="[]"><row><cell><data attribute="&EnderecoGoogle" /></cell></row><row><cell><data attribute="&Json" /></cell></row><row><cell><ucw gxControlType="-8682046" PATTERN_ELEMENT_CUSTOM_PROPERTIES="<Properties><Property><Name>ControlName</Name><Value>ucGxPlaceGoogle1</Value></Property></Properties>" /></cell></row></table></layout></detail></Form></GxMultiForm>]]></Source>
<Properties><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Part>
<Part type="9b0a32a3-de6d-4be1-a4dd-1b85d3741534">
<Source><![CDATA[]]></Source>
<Properties><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Part>
<Part type="c44bd5ff-f918-415b-98e6-aca44fed84fa">
<Source><![CDATA[Event Start
ucGxPlaceGoogle1.AttachControlID = &EnderecoGoogle.InternalName //Sua variável
ucGxPlaceGoogle1.ApiKEY = '' //Sua API KEY Google Places
ucGxPlaceGoogle1.GeoLocate() //Filtra os endereços, de acordo com sua localização
Endevent
Event ucGxPlaceGoogle1.Confirmed
//Endereço Selecionado, é retornado um Json
&Json = ucGxPlaceGoogle1.Json
EndEvent
]]></Source>
<Properties><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Part>
<Part type="763f0d8b-d8ac-4db4-8dd4-de8979f2b5b9">
<Source><![CDATA[]]></Source>
<Properties><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Part>
<Part type="e4c4ade7-53f0-4a56-bdfd-843735b66f47">
<Variable Name="EnderecoGoogle">
<Documentation />
<Properties><Property><Name>Name</Name><Value>EnderecoGoogle</Value></Property><Property><Name>EmptyAsNull</Name><Value>Yes</Value></Property><Property><Name>ATTCUSTOMTYPE</Name><Value>bas:VarChar</Value></Property><Property><Name>Length</Name><Value>60</Value></Property><Property><Name>Decimals</Name><Value>0</Value></Property><Property><Name>AttMaxLen</Name><Value>60</Value></Property><Property><Name>AttAvgLen</Name><Value>0</Value></Property><Property><Name>AttCollection</Name><Value>False</Value></Property><Property><Name>AUTONUMBER</Name><Value>False</Value></Property><Property><Name>AUTONUMBER_START</Name><Value>1</Value></Property><Property><Name>AUTONUMBER_STEP</Name><Value>1</Value></Property><Property><Name>AUTONUMBER_FORREPLICATION</Name><Value>True</Value></Property><Property><Name>idDATEFORMAT</Name><Value>idDATEFORMAT_SHORT</Value></Property><Property><Name>ControlType</Name><Value>Edit</Value></Property></Properties>
</Variable>
<Variable Name="Json">
<Documentation />
<Properties><Property><Name>Name</Name><Value>Json</Value></Property><Property><Name>ATTCUSTOMTYPE</Name><Value>bas:LongVarChar</Value></Property></Properties>
</Variable>
<Properties><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Part>
<Part type="ad3ca970-19d0-44e1-a7b7-db05556e820c">
<Help>
<HelpItem>
<Language>88313f43-5eb2-0000-0028-e8d9f5bf9588-Portuguese</Language>
<Content />
</HelpItem>
</Help>
<Properties><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Part>
<Part type="babf62c5-0111-49e9-a1c3-cc004d90900a">
<Properties />
</Part>
<Properties><Property><Name>Name</Name><Value>PlaceControlExample</Value></Property><Property><Name>IsMain</Name><Value>True</Value></Property><Property><Name>IntegratedSecurityPermissionPrefix</Name><Value>PlaceControlExample</Value></Property><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Object>
<Object parent="PlacesGoogle" parentType="00000000-0000-0000-0000-000000000008" parentGuid="c87cb2a5-35c2-4954-aa65-ccbe4b3edc76" user="MARIO\mario" versionDate="2020-06-04T01:15:15.0000000Z" lastUpdate="2020-06-03T20:40:29.0000000Z" checksum="95d9c4eac08bb5a8e6b23b4d360145ac" fullyQualifiedName="SdtPlacesGoogle" moduleGuid="afa47377-41d5-4ae8-9755-6f53150aa361" guid="2d1ec422-9b84-4ee0-bf9e-d91714c0ac1f" name="SdtPlacesGoogle" type="447527b5-9210-4523-898b-5dccb17be60a" description="">
<Part type="5c2aa9da-8fc4-4b6b-ae02-8db4fa48976a">
<Level Name="SdtPlacesGoogle">
<LevelInfo guid="ce84616a-ccad-44d2-b37d-7b7a74d1d693" name="SdtPlacesGoogle" type="a76e9340-bdb9-445d-8f81-cfd4ddd0b0f3" description="Sdt Places Google" user="MARIO\mario">
<Properties><Property><Name>Name</Name><Value>SdtPlacesGoogle</Value></Property></Properties>
</LevelInfo>
<Level Name="address_components">
<LevelInfo guid="493275a1-c86c-4bef-8280-989d2b4164e7" name="address_components" type="a76e9340-bdb9-445d-8f81-cfd4ddd0b0f3" description="address_components" user="MARIO\mario">
<Properties><Property><Name>Name</Name><Value>address_components</Value></Property><Property><Name>AttCollection</Name><Value>True</Value></Property></Properties>
</LevelInfo>
<Item guid="da1db9a5-30ed-485e-a95c-766bde9aaf02" name="long_name" type="f76e9340-bdb9-445d-8f81-cfd4ddd0b0f3" description="long_name" user="MARIO\mario">
<Properties><Property><Name>Name</Name><Value>long_name</Value></Property><Property><Name>ATTCUSTOMTYPE</Name><Value>bas:VarChar</Value></Property><Property><Name>Length</Name><Value>100</Value></Property><Property><Name>Decimals</Name><Value>0</Value></Property><Property><Name>AttMaxLen</Name><Value>100</Value></Property><Property><Name>AttAvgLen</Name><Value>0</Value></Property><Property><Name>AttCollection</Name><Value>False</Value></Property></Properties>
</Item>
<Item guid="994aba14-8a92-49f0-a8e9-21737508e1c9" name="short_name" type="f76e9340-bdb9-445d-8f81-cfd4ddd0b0f3" description="short_name" user="MARIO\mario">
<Properties><Property><Name>Name</Name><Value>short_name</Value></Property><Property><Name>ATTCUSTOMTYPE</Name><Value>bas:VarChar</Value></Property><Property><Name>Length</Name><Value>100</Value></Property><Property><Name>Decimals</Name><Value>0</Value></Property><Property><Name>AttMaxLen</Name><Value>100</Value></Property><Property><Name>AttAvgLen</Name><Value>0</Value></Property><Property><Name>AttCollection</Name><Value>False</Value></Property></Properties>
</Item>
<Item guid="ac9564c5-e61b-49f1-b020-4b7be9e9275d" name="types" type="f76e9340-bdb9-445d-8f81-cfd4ddd0b0f3" description="types" user="MARIO\mario">
<Properties><Property><Name>Name</Name><Value>types</Value></Property><Property><Name>ATTCUSTOMTYPE</Name><Value>bas:VarChar</Value></Property><Property><Name>Length</Name><Value>100</Value></Property><Property><Name>Decimals</Name><Value>0</Value></Property><Property><Name>AttMaxLen</Name><Value>100</Value></Property><Property><Name>AttAvgLen</Name><Value>0</Value></Property><Property><Name>AttCollection</Name><Value>True</Value></Property></Properties>
</Item>
</Level>
</Level>
<Properties><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Part>
<Part type="babf62c5-0111-49e9-a1c3-cc004d90900a">
<Properties />
</Part>
<Properties><Property><Name>Name</Name><Value>SdtPlacesGoogle</Value></Property><Property><Name>Description</Name><Value /></Property><Property><Name>IsDefault</Name><Value>False</Value></Property></Properties>
</Object>
</Objects>
<Dependencies>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Object" Id="562f4793-aabe-449f-8821-fc77e550698e">
<Properties Name="User Control" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Part" Id="3dd92fe7-b095-44d3-9fa0-8488fa3f0c67">
<Properties Name="Screen Template" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Part" Id="8e9e4a7c-a4d3-4c36-8e8e-fb6702402f63">
<Properties Name="Properties" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Part" Id="babf62c5-0111-49e9-a1c3-cc004d90900a">
<Properties Name="Documentation" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Object" Id="c9584656-94b6-4ccd-890f-332d11fc2c25">
<Properties Name="Web Panel" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Part" Id="d24a58ad-57ba-41b7-9e6e-eaca3543c778">
<Properties Name="Web Form" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Part" Id="9b0a32a3-de6d-4be1-a4dd-1b85d3741534">
<Properties Name="Rules" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Part" Id="c44bd5ff-f918-415b-98e6-aca44fed84fa">
<Properties Name="Events" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Part" Id="763f0d8b-d8ac-4db4-8dd4-de8979f2b5b9">
<Properties Name="Conditions" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Part" Id="e4c4ade7-53f0-4a56-bdfd-843735b66f47">
<Properties Name="Variables" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Part" Id="ad3ca970-19d0-44e1-a7b7-db05556e820c">
<Properties Name="Help" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Object" Id="447527b5-9210-4523-898b-5dccb17be60a">
<Properties Name="Structured Data Type" PackageName="GenexusBL" />
</Reference>
<Reference Package="3ea7e1c6-b849-4df9-931a-070171a8a2f0" Type="Part" Id="5c2aa9da-8fc4-4b6b-ae02-8db4fa48976a">
<Properties Name="Structure" PackageName="GenexusBL" />
</Reference>
</Dependencies>
<ObjectsIdentityMapping>
<ObjectIdentity Type="c804fdbd-7c0b-440d-8527-4316c92649a6" Name="WorkWithPlusTheme" parent="">
<Guid>aee46b45-2628-44e2-94fd-9a50fd96f0cc</Guid>
</ObjectIdentity>
<ObjectIdentity Type="00000000-0000-0000-0000-000000000008" Name="PlacesGoogle" parent="">
<Guid>c87cb2a5-35c2-4954-aa65-ccbe4b3edc76</Guid>
</ObjectIdentity>
<ObjectIdentity Type="c9584656-94b6-4ccd-890f-332d11fc2c25" Name="WorkWithPlusMasterPage" parent="WWPBaseObjects">
<Guid>b6137e3d-e1b6-4abd-ac21-ebcaf02fc458</Guid>
</ObjectIdentity>
<ObjectIdentity Type="c88fffcd-b6f8-0000-8fec-00b5497e2117" Name="WWPBaseObjects" parent="">
<Guid>f952860a-9553-4095-82c8-dedaadd8cf64</Guid>
</ObjectIdentity>
<ObjectIdentity Type="ecececec-dfe0-4a57-ae8f-c6e31b0dcbc0" Name="Default" parent="">
<Guid>0d384266-b2ff-4572-af75-b208281cbf88</Guid>
</ObjectIdentity>
<ObjectIdentity Type="d4876646-98dd-419b-8c1c-896f83c48368" Name="Form" parent="">
<Guid>d5ef9926-a55b-5eb1-ac93-2211cfeeb656</Guid>
</ObjectIdentity>
<ObjectIdentity Type="d4876646-98dd-419b-8c1c-896f83c48368" Name="Attribute" parent="">
<Guid>7f83da99-bc71-5230-bf17-0352ce27c129</Guid>
</ObjectIdentity>
<ObjectIdentity Type="d4876646-98dd-419b-8c1c-896f83c48368" Name="Table" parent="">
<Guid>784008a4-3c1e-563a-9723-453ef4d698c9</Guid>
</ObjectIdentity>
</ObjectsIdentityMapping>
</ExportFile>