* Fires when OverlayView Draw
* @param {Roo.bootstrap.LocationPicker} this
*/
- OverlayViewHide : true
+ OverlayViewHide : true,
+ /**
+ * @event loadexception
+ * Fires when load google lib failed.
+ * @param {Roo.bootstrap.LocationPicker} this
+ */
+ loadexception : true
});
};
initial: function()
{
+ if(typeof(google) == 'undefined' || typeof(google.maps) == 'undefined'){
+ this.fireEvent('loadexception', this);
+ return;
+ }
+
if(!this.mapTypeId){
this.mapTypeId = google.maps.MapTypeId.ROADMAP;
}
getGmapContext: function()
{
- return this.gMapContext
+ return (typeof(this.gMapContext) == 'undefined') ? false : this.gMapContext;
},
GMapContext: function()
disableDoubleClickZoom: this.disableDoubleClickZoom,
scrollwheel: this.scrollwheel,
streetViewControl: this.streetViewControl,
-// radius: this.radius,
locationName: this.locationName,
draggable: this.draggable,
enableAutocomplete: this.enableAutocomplete,
- enableReverseGeocode: this.enableReverseGeocode,
+ enableReverseGeocode: this.enableReverseGeocode
});
var _marker = new google.maps.Marker({