We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41ff9d8 commit 2711befCopy full SHA for 2711bef
src/marker-collection.ts
@@ -135,11 +135,18 @@ export class MarkerCollection<TUserData extends object = object> {
135
}
136
137
138
+ setAttributes(attributes: Partial<Attributes<TUserData>>) {
139
+ this.markerAttributes_ = attributes;
140
+
141
+ for (const marker of this.markers_.values()) {
142
+ marker.setAttributes(attributes);
143
+ }
144
145
146
protected generateKey(record: TUserData): string {
147
if (!this.key_) {
148
// if we don't have a key-function, we use a WeakMap to store
149
// generated keys and issue a warning when updating.
-
150
let key = this.generatedKeyCache_.get(record);
151
if (!key) {
152
key = Math.random().toString(36).slice(2);
0 commit comments