X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fgooglemap%2Fgooglemap.js;h=326bf92b0806aac4555198e94accd0fb540ba127;hb=f2cd8cf9eeefd7c1d546ee41d7862ee9016a20c4;hp=94e92442597b5858954f32efd90c44aedb4c2e1c;hpb=f4331c700e8d1d577323c2e9cb6e3d4531453f70;p=myslice.git diff --git a/plugins/googlemap/googlemap.js b/plugins/googlemap/googlemap.js index 94e92442..326bf92b 100644 --- a/plugins/googlemap/googlemap.js +++ b/plugins/googlemap/googlemap.js @@ -29,9 +29,10 @@ $this.data('markerCluster', null); $this.data('markers', []); - var myLatlng = new google.maps.LatLng(34.397, 150.644); + console.log ("lat=" + options.latitude + " long=" + options.longitude + " and zoom=" + options.zoom); + var myLatlng = new google.maps.LatLng(options.latitude, options.longitude); var myOptions = { - zoom: 2, + zoom: options.zoom, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } @@ -135,8 +136,8 @@ 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; }