js-markerclusterer icon indicating copy to clipboard operation
js-markerclusterer copied to clipboard

addMarker does not update cluster number

Open Tukkan opened this issue 3 years ago • 8 comments

When adding new marker to the clusterer (at least when clusterer is not visible, map is zoomed in), then zooming out to show clusters, the marker seems not to be counted in the cluster.

// SuperClusterAlgorithm
clusterer.addMarker(marker);
clusterer.render(); // optional?

Tukkan avatar Feb 10 '22 10:02 Tukkan

@Tukkan Thank you for opening this issue. 🙏 Please check out these other resources that might be applicable:

This is an automated message, feel free to ignore.

jpoehnelt avatar Feb 10 '22 10:02 jpoehnelt

Google, it's been 5 months. When are you going to fix this?

Youk2022 avatar Jul 16 '22 19:07 Youk2022

Getting issues too when loading the website:

js?v=3&language=nl&libraries=places,drawing&key=AIzaSyCB5INXV0cEMf0y741bCvlSC2MG-veEhPQ:268 google.maps.event.addDomListener() is deprecated, use the standard addEventListener() method instead: https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener The feature will continue to work and there is no plan to decommission it.

Sintmacro avatar Aug 15 '22 08:08 Sintmacro

WHEN U GONNA FIX THIS????

lafllamme avatar Jan 19 '23 15:01 lafllamme

I figured I could help look into this, but I can't reproduce the issue.

Can you provide a minimal reproducible example of this happening? @lafllamme

nora-soderlund avatar Jan 19 '23 16:01 nora-soderlund

@nora-soderlund I am using the MarkerClusterer inside a Vue 2 Application. Adding the to my app instance gives me massive warning like @Sintmacro mentioned.


   <gmap-cluster
                      :zoomOnClick="true"
                      :averageCenter="true"
                      :minimumClusterSize="2"
                      :gridSize="20"
                      :enableRetinaIcons="true"
                      :styles="clusterStyles"
                  >
                      <!-- items location marker-->
                      <gmap-custom-marker
                          :key="m.uid"
                          v-for="(m, index) in items"
                          :marker="{lat: m.latitude, lng:m.longitude}"
                          :clickable="true"
                          :draggable="false"
                          :z-index="showByIndex === index ? 1000 : 1"
                          @click.native="center = {lat: m.latitude, lng:m.longitude}"
                          @mouseover.native="showItem(m, index)"
                          @mouseout.native="hideItem()"
                      >
                          <!--    icon items and info window                    -->
                          <div class="gmap-marker-icon-container">
                              <component
                                  :is="icons[m.category] ? icons[m.category] : icons['default']"
                                  :fillColor="setColorPin(m,index)"
                                  :strokeColor="colorOptions.defaultWhite"
                              />
                              <div class="info-window"
                                   v-if="showByIndex === index">
                                  <p>{{ m.name }}</p>
                              </div>
                          </div>
                      </gmap-custom-marker>
                  </gmap-cluster>

I receive: google.maps.event.addDomListener() is deprecated, use the standard addEventListener() method instead: https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener The feature will continue to work and there is no plan to decommission it.and don't know how to prevent or catch this.

lafllamme avatar Jan 23 '23 14:01 lafllamme

@lafllamme please use this issue or refer to one of the other technical support forums found at https://developers.google.com/maps/support

This issue is for the original “addMarker does not update cluster count”.

nora-soderlund avatar Jan 23 '23 14:01 nora-soderlund

@Sintmacro please take care to delete the API key above and replace it in any projects that use it.

wangela avatar Aug 09 '23 23:08 wangela