Question

For now we are using google map v3, after we upgraded firefox 26.0, the marks cannot be loaded I set many alerts and compared them between Chrome and firefox 26.0, I found here is a variable this.ready_ cannot be assigned a value(true) in firefox 26.0 , that is this method cannot be called below

MarkerClusterer.prototype.onAdd = function() {
  alert("enter MarkerClusterer.prototype.onAdd!");
  this.setReady_(true);
};
MarkerClusterer.prototype.setReady_ = function(ready) {
  alert("enter setReady!");
  if (!this.ready_) {
    this.ready_ = ready;
    alert("will enter createClusters_() in setReady_");
    this.createClusters_();
  }
};

I tried to find where does call onAdd for pinpoint the issue, however, it called by google itself, here is stack call

MarkerClusterer.onAdd     MarkerClusterer.js:225
mG                        VM148:1
anonymous function      %7Bmain,places%7D.js:11

Thank you by advance! Jason

Was it helpful?

Solution

I have fixed this issue, the problem was from MarkerClusterer.js, someone commentted these 2 lines below leads to this issue(just comment them off will be ok), hope it is also helpful for others. in MarkerClusterer.js MarkerClusterer.prototype.setupStyles_ = function() { if (this.styles_.length) { return; } // for (var i = 0, size; size = this.sizes[i]; i++) { this.styles_.push({ url: this.imagePath_ + '.' + this.imageExtension_, height: 36, width: 43 // }); }

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top