My favorites | Sign in
Project Logo
             
New issue | Search
for
| Advanced search | Search tips
Issue 92: LabeledMarker and MarkerManager don't worke well together (this.div_ is undefined)
1 person starred this issue and may be notified of changes. Back to list
Status:  FixedInRelease
Owner:  ----
Closed:  Mar 2009
Type-Defect
Class-LabeledMarker
Fixed-1.4


Sign in to add a comment
 
Reported by gerpres, Mar 06, 2009
What steps will reproduce the problem?
1. add a LabeledMarker which is outside of the current viewport to a
MarkerManager. Call marker.hide() on the new marker. (marker is still not
in viewport).

What is the expected output? What do you see instead?
js-error: this.div_ is undefined

What version of the product are you using? On what operating system?
MarkerManager 1.1
LabeledMarker 1.3 r933
Comment 1 by pamela.fox, Mar 08, 2009
Hi gerpres-

Can you try changing your LabeledMarker applyLabelVisibility_ function to the 
following, and let me know if it fixes it?
LabeledMarker.prototype.applyLabelVisibility_ = function () {
  if ((!this.isHidden()) && this.labelVisibility_ && this.div_) {
    this.div_.style.display = 'block';
  } else {
    this.div_.style.display = 'none';
  }
};

Labels: Type-Defect Class-LabeledMarker
Comment 2 by gerpres, Mar 09, 2009
this would not work, because if the div is undefined, this code would try to access
the div in the else-block.

the change should look something like this:
if(this.div_){
	  if ((!this.isHidden()) && this.labelVisibility_) {
		    this.div_.style.display = 'block';
		  } else {
		    this.div_.style.display = 'none';
		  }
  }

cu
Comment 3 by pamela.fox, Mar 26, 2009
Thanks, good catch.
Status: FixedInDev
Comment 4 by pamela.fox, Mar 26, 2009
Committed fix in r965.
Comment 5 by pamela.fox, Jun 23, 2009
(No comment was entered for this change.)
Status: FixedInRelease
Labels: Fixed-1.4
Sign in to add a comment

Hosted by Google Code