Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Created November 1, 2012 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wboykinm/3995260 to your computer and use it in GitHub Desktop.
Save wboykinm/3995260 to your computer and use it in GitHub Desktop.
Diff of orphaned tooltip_buffer code
- var tooltip = this.getTooltip(feature, context);
+
+
+ tooltip_buffer.push(feature); //20120312-ALaing- Add feature to the feature array.
+ // tooltipbuffer = tooltip_buffer.unique();
+
+
+ var tooltip_html =""; // 201203012-ALaing- Create string for HTML display.
+
+ // // Loop over each value in the array.
+ // $.each(
+ // ,
+ // function( intIndex, objValue ){
+
+ // // Create a new LI HTML element out of the
+ // // current value (in the iteration) and then
+ // // add this value to the list.
+ // tooltip_html += "<li>" + objValue + "</li>" ;
+ // };
+
+
+ var tooltip = this.getTooltip(tooltip_html, context); // ALaing-20120312-Changed feature->tooltip_text
+
tooltip.className += ' wax-popup';
- tooltip.innerHTML = feature;
+
+
+ // ALaing-20120312-Changed feature->tooltip_text
+ tooltip_html += tooltip_buffer.join("<hr />");
+ tooltip.innerHTML = tooltip_html;
+
var close = document.createElement('a');
close.href = '#close';
close.className = 'close';
- close.innerHTML = 'Close';
+ close.innerHTML = '';
tooltip.appendChild(close);
var closeClick = wax.util.bind(function(ev) {
+ tooltip_buffer=[]; // ALaing-20120312-clear map's click feed
this.hideTooltip(tooltip);
this._currentTooltip = undefined;
ev.returnValue = false; // Prevents hash change.
if (ev.stopPropagation) ev.stopPropagation();
if (ev.preventDefault) ev.preventDefault();
return false;
}, this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment