Roo/bootstrap/LocationPicker.js
authorEdward <edward@roojs.com>
Thu, 27 Aug 2015 02:53:41 +0000 (10:53 +0800)
committerEdward <edward@roojs.com>
Thu, 27 Aug 2015 02:53:41 +0000 (10:53 +0800)
Roo/bootstrap/LocationPicker.js

index 1833212..56fe94f 100644 (file)
@@ -165,14 +165,16 @@ Roo.extend(Roo.bootstrap.LocationPicker, Roo.bootstrap.Component,  {
         
         _this.OverlayView.setMap(this.gMapContext.map);
         
-        var overlayProjection = _this.OverlayView.getProjection();
+        
+        google.maps.event.addListener(this.gMapContext.map, 'click', function(event){
+            
+            var overlayProjection = _this.OverlayView.getProjection();
         console.log('overlayProjection...');
         console.log(overlayProjection);
         var cpx = overlayProjection.fromLatLngToContainerPixel(mouseEvent.latLng);
         console.log('cpx...');
         console.log(cpx);
         
-        google.maps.event.addListener(this.gMapContext.map, 'click', function(event){
             _this.fireEvent('mapClick', this, event);
             
         });