Roo/bootstrap/LocationPicker.js
authoredward <edward@roojs.com>
Tue, 13 Oct 2015 09:30:12 +0000 (17:30 +0800)
committeredward <edward@roojs.com>
Tue, 13 Oct 2015 09:30:12 +0000 (17:30 +0800)
Roo/bootstrap/LocationPicker.js

index 14910e1..dfa41d8 100644 (file)
@@ -179,39 +179,39 @@ Roo.extend(Roo.bootstrap.LocationPicker, Roo.bootstrap.Component,  {
         
         this.gMapContext = this.GMapContext();
         
-//        this.initOverlayView();
-//        
-//        this.OverlayView = new Roo.bootstrap.LocationPicker.OverlayView(this.gMapContext.map);
-//        
-//        var _this = this;
-//                
-//        google.maps.event.addListener(this.gMapContext.marker, "dragend", function(event) {
-//            _this.setPosition(_this.gMapContext.marker.position);
-//        });
-//        
-//        google.maps.event.addListener(this.gMapContext.map, 'click', function(event){
-//            _this.fireEvent('mapClick', this, event);
-//            
-//        });
-//
-//        google.maps.event.addListener(this.gMapContext.map, 'rightclick', function(event){
-//            _this.fireEvent('mapRightClick', this, event);
-//            
-//        });
-//        
-//        google.maps.event.addListener(this.gMapContext.marker, 'click', function(event){
-//            _this.fireEvent('markerClick', this, event);
-//            
-//        });
-//
-//        google.maps.event.addListener(this.gMapContext.marker, 'rightclick', function(event){
-//            _this.fireEvent('markerRightClick', this, event);
-//            
-//        });
-//        
+        this.initOverlayView();
+        
+        this.OverlayView = new Roo.bootstrap.LocationPicker.OverlayView(this.gMapContext.map);
+        
+        var _this = this;
+                
+        google.maps.event.addListener(this.gMapContext.marker, "dragend", function(event) {
+            _this.setPosition(_this.gMapContext.marker.position);
+        });
+        
+        google.maps.event.addListener(this.gMapContext.map, 'click', function(event){
+            _this.fireEvent('mapClick', this, event);
+            
+        });
+
+        google.maps.event.addListener(this.gMapContext.map, 'rightclick', function(event){
+            _this.fireEvent('mapRightClick', this, event);
+            
+        });
+        
+        google.maps.event.addListener(this.gMapContext.marker, 'click', function(event){
+            _this.fireEvent('markerClick', this, event);
+            
+        });
+
+        google.maps.event.addListener(this.gMapContext.marker, 'rightclick', function(event){
+            _this.fireEvent('markerRightClick', this, event);
+            
+        });
+        
         this.setPosition(this.gMapContext.location);
-//        
-//        this.fireEvent('initial', this, this.gMapContext.location);
+        
+        this.fireEvent('initial', this, this.gMapContext.location);
     },
     
     initOverlayView: function()
@@ -272,7 +272,7 @@ Roo.extend(Roo.bootstrap.LocationPicker, Roo.bootstrap.Component,  {
             title: this.markerTitle,
             draggable: this.draggable
         });
-        Roo.log(_marker);
+        
         return {
             map: _map,
             marker: _marker,