Skip to content

Commit

Permalink
fix(gmap-vue): add missing options on marker-clusterer constructor
Browse files Browse the repository at this point in the history
Close #255
  • Loading branch information
diegoazh committed Mar 3, 2022
1 parent 81b27a4 commit 7b4d573
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion packages/documentation/docs/guide/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,20 @@ export default {
);
}
const { map: mapInstance, markers, ...clusterOptions } = finalOptions;
const {
map: mapInstance,
markers,
algorithm,
onClusterClick,
renderer,
} = finalOptions;
this.$clusterObject = new MarkerClusterer({
map: mapInstance,
markers,
algorithm,
onClusterClick,
renderer,
});
bindProps(this, this.$clusterObject, {});
Expand Down
11 changes: 10 additions & 1 deletion packages/gmap-vue/src/components/cluster-icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,20 @@ export default {
);
}
const { map: mapInstance, markers } = finalOptions;
const {
map: mapInstance,
markers,
algorithm,
onClusterClick,
renderer,
} = finalOptions;
this.$clusterObject = new MarkerClusterer({
map: mapInstance,
markers,
algorithm,
onClusterClick,
renderer,
});
bindProps(this, this.$clusterObject, {});
Expand Down

0 comments on commit 7b4d573

Please sign in to comment.