X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fgooglemap%2Fstatic%2Fjs%2Fgooglemap.js;h=3d1875717376d16164437374d7b9f445fa9a46ee;hb=dfa0e7671a6c8363cc0531bace287d638bc1d510;hp=118cfa6012876bf446d640c783c4e959b058735b;hpb=d549b83164f10793e799da646e6704844607f190;p=unfold.git diff --git a/plugins/googlemap/static/js/googlemap.js b/plugins/googlemap/static/js/googlemap.js index 118cfa60..3d187571 100644 --- a/plugins/googlemap/static/js/googlemap.js +++ b/plugins/googlemap/static/js/googlemap.js @@ -8,339 +8,416 @@ * - infowindow is not properly reopened when the maps does not have the focus */ -googlemap_debug=true; -googlemap_debug_detailed=false; +GOOGLEMAP_BGCOLOR_RESET = 0; +GOOGLEMAP_BGCOLOR_ADDED = 1; +GOOGLEMAP_BGCOLOR_REMOVED = 2; (function($){ + // events that happen in the once-per-view range + var debug=false; + debug=true; + + // this now should be obsolete, rather use plugin_debug in plugin.js + // more on a on-per-record basis + var debug_deep=false; + // debug_deep=true; + var GoogleMap = Plugin.extend({ - init: function(options, element) { - if (googlemap_debug) messages.debug("GoogleMap.init"); + /************************************************************************** + * CONSTRUCTOR + **************************************************************************/ + + init: function(options, element) + { this._super(options, element); /* Member variables */ - // query status - this.received_all = false; - this.received_set = false; - this.in_set_buffer = []; - // key -> { marker, checked } - this.map_markers = {} + /* we keep a couple of global hashes + * lat_lon --> { marker,