examples/bootstrap/LocationPicker.js
[roojs1] / examples / bootstrap / LocationPicker.js
1
2
3 Roo.example = Roo.example || {};
4
5 Roo.example.locationpicker = new Roo.XComponent({
6     part     :  ["layout","viewpanel"],
7     order    : '001-viewpanel',
8     region   : '',
9     parent   : '#bootstrap',
10     name     : "unnamed module",
11     disabled : false, 
12     permname : '', 
13     _tree : function()
14     {
15         
16         this.parent = {
17             el : new Roo.bootstrap.Body()
18         }
19         this.parent.el.layout = false;
20         this.parent.el.render(document.body);
21         
22         var _this = this;
23         var MODULE = this;
24         
25         return {
26             xtype: 'Body',
27             xns: Roo.bootstrap,
28             items :
29             [
30                 {
31                     xtype : 'Container',
32                     xns : Roo.bootstrap,
33                     cls : 'col-md-12',
34                     style : 'margin-bottom:20px;'
35                     items : [
36                         {
37                             xtype : 'LocationPicker',
38                             xns: Roo.bootstrap,
39                             style : 'width:500px; height: 400px; border: 1px solid #000;',
40                             latitude : 46.15242437752303,
41                             longitude : 2.7470703125,
42                             radius : 300,
43                             listeners : {
44                                 render : function (_self) {
45                                     _this.picker = _self;
46                                 }
47                             }
48                         }
49                     ]
50                 },
51                 {
52                     xtype : 'Container',
53                     xns : Roo.bootstrap,
54                     cls : 'col-md-12',
55                     items : [
56                         {
57                             xtype : 'Column',
58                             xns: Roo.bootstrap,
59                             md : 3,
60                             items : [
61                                 {
62                                     xtype : 'Input',
63                                     xns: Roo.bootstrap,
64                                     fieldLabel : 'Latitude'
65                                 }
66                             ]
67                         },
68                         {
69                             xtype : 'Column',
70                             xns: Roo.bootstrap,
71                             md : 3,
72                             items : [
73                                 {
74                                     xtype : 'Input',
75                                     xns: Roo.bootstrap,
76                                     fieldLabel : 'Longitude'
77                                 }
78                             ]
79                         }
80                     ]
81                 }
82             ]
83         }
84     }
85 });