diff --git a/source/Ox.UI/js/Map/Map.js b/source/Ox.UI/js/Map/Map.js index da145bec..452732f3 100644 --- a/source/Ox.UI/js/Map/Map.js +++ b/source/Ox.UI/js/Map/Map.js @@ -774,11 +774,11 @@ Ox.Map = function(options, self) { // gets the largest place at latlng that would fit in bounds var callback = arguments.length == 3 ? callback : bounds, bounds = arguments.length == 3 ? bounds : null; - self.$loadingIcon.start(); + self.$loadingIcon && self.$loadingIcon.start(); self.geocoder.geocode({ latLng: latlng }, function(results, status) { - self.$loadingIcon.stop(); + self.$loadingIcon && self.$loadingIcon.stop(); if (status == google.maps.GeocoderStatus.OK) { if (bounds) { Ox.forEach(results.reverse(), function(result, i) { @@ -810,11 +810,11 @@ Ox.Map = function(options, self) { } function getPlaceByName(name, callback) { - self.$loadingIcon.start(); + self.$loadingIcon && self.$loadingIcon.start(); self.geocoder.geocode({ address: name }, function(results, status) { - self.$loadingIcon.stop(); + self.$loadingIcon && self.$loadingIcon.stop(); if (status == google.maps.GeocoderStatus.OK) { callback(new Ox.MapPlace(parseGeodata(results[0]))); }