Closed m2xilon closed 10 months ago
I was not using this correctly for my case, solved by explicitly defining algorithm.
<MarkerCluster
:options="{
algorithm,
}"
@click="onclickFunc($event)"
>
<GmapMarker
v-for=....
import { SuperClusterAlgorithm } from '@googlemaps/markerclusterer'
setup() {
return {
algorithm: new SuperClusterAlgorithm({
radius: 40,
maxZoom: 19,
generateId: false
}),
}
MarkerCluster does not cluster locations when zoom is high enough (zoom: 17 and higher for me). This is observable in the MarkerCluster example with just one addition: duplicate any location in the locations object in setup. MarkerCluster at zoom 16 MarkerCluster at zoom 17
Use case: multi-story buildings. Different floors for companies but same address. When zoomed in only one of the markers shows. If you were to use InfoWindow any click events would be for a single marker. This used to work in Vue 2 GmapCluster with
grid-size
prop and@click
listener like so: <GmapCluster :grid-size="1" :zoom-on-click="zoom < 17" @click="zoom >= 17 ? openLocationPopupMulti($event) : undefined"Any input on this is appreciated, cheers