如何在 Google Maps API 中将类或 ID 添加到叠加层?例子:
subOverlay.prototype.onAdd = function() {
var div = document.createElement('DIV');
div.addClass="map_marker"; // I try
this.div_ = div;
var panes = this.getPanes();
panes.overlayImage.appendChild(div);
}
但不工作:(请帮助我