X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fgooglemap%2Fstatic%2Fjs%2Fgooglemap.js;h=424b3aad6f979a76584dc2e1c1c7be2c8befeb7f;hb=7e0af7840da289a7fdf17bc0f8ced1d20b48556e;hp=8cb652f48ec268ff9940b24a36a5082504653cb8;hpb=f3b60376826a28db2d4d7e6fdf41276f57b951ed;p=unfold.git diff --git a/plugins/googlemap/static/js/googlemap.js b/plugins/googlemap/static/js/googlemap.js index 8cb652f4..424b3aad 100644 --- a/plugins/googlemap/static/js/googlemap.js +++ b/plugins/googlemap/static/js/googlemap.js @@ -154,7 +154,7 @@ googlemap_debug_detailed=false; // this record is *in* the slice new_record: function(record) { - if (googlemap_debug_detailed) messages.debug ("new_record"); + if (googlemap_debug_detailed) messages.debug ("new_record"); if (!(record['latitude'])) return false; // get the coordinates @@ -162,33 +162,33 @@ googlemap_debug_detailed=false; var longitude=unfold.get_value(record['longitude']); var lat_lon = latitude + longitude; - // check if we've seen anything at that place already - // xxx might make sense to allow for some fuzziness, - // i.e. consider 2 places equal if not further away than 300m or so... - var marker_s = this.by_lat_lon [lat_lon]; - if ( marker_s == null ) { - marker_s = this.create_marker_struct (this.object, latitude, longitude); - this.by_lat_lon [ lat_lon ] = marker_s; - this.arm_marker(marker_s.marker, this.map); - } + // check if we've seen anything at that place already + // xxx might make sense to allow for some fuzziness, + // i.e. consider 2 places equal if not further away than 300m or so... + var marker_s = this.by_lat_lon [lat_lon]; + if ( marker_s == null ) { + marker_s = this.create_marker_struct (this.object, latitude, longitude); + this.by_lat_lon [ lat_lon ] = marker_s; + this.arm_marker(marker_s.marker, this.map); + } - // now add a line for this resource in the marker - // xxx should compute checked here ? - // this is where the checkbox will be appended - var ul=marker_s.ul; - var checkbox = this.create_record_checkbox (record, ul, false); - if ( ! this.key in record ) return; + // now add a line for this resource in the marker + // xxx should compute checked here ? + // this is where the checkbox will be appended + var ul=marker_s.ul; + var checkbox = this.create_record_checkbox (record, ul, false); + if ( ! this.key in record ) return; var key_value = record[this.key]; - // see XXX BACKSLASHES - //var hrn = this.escape_id(key_value).replace(/\\/g, ''); - var hrn = key_value; + // see XXX BACKSLASHES + //var hrn = this.escape_id(key_value).replace(/\\/g, ''); + var hrn = key_value; this.by_hrn[hrn] = { - checkbox: checkbox, - // xxx Thierry sept 2013 - // xxx actually we might have just used a domid-based scheme instead of the hash - // since at this point we only need to retrieve the checkbox from an hrn - // but I was not sure enough that extra needs would not show up so I kept this in place - // xxx not sure these are actually useful : + checkbox: checkbox, + // xxx Thierry sept 2013 + // xxx actually we might have just used a domid-based scheme instead of the hash + // since at this point we only need to retrieve the checkbox from an hrn + // but I was not sure enough that extra needs would not show up so I kept this in place + // xxx not sure these are actually useful : value: key_value, record: record, }