cosmetic
[unfold.git] / plugins / googlemap / googlemap.js
index 94e9244..62e1d6f 100644 (file)
@@ -29,9 +29,9 @@
             $this.data('markerCluster', null);
             $this.data('markers', []);
 
-            var myLatlng = new google.maps.LatLng(34.397, 150.644);
+            var myLatlng = new google.maps.LatLng(options.latitude, options.longitude);
             var myOptions = {
-              zoom: 2,
+              zoom: options.zoom,
               center: myLatlng,
               mapTypeId: google.maps.MapTypeId.ROADMAP
             }
            instance_.closest('.need-spin').spin(false);
 
 
-            if (!rows) {
-                alert('error');
+            if (rows === undefined || !rows || rows.length==0) {
+               messages.warning ("Empty result in googlemap.update_map - nothing to show");
                 return;
             }