Markerclustererplus touch' click'在今天的地图更新后无法正常工作

时间:2018-02-14 06:14:05

标签: google-maps-api-3

我正在使用带有markerclustererplus的Google Maps JavaScript API。我的mouseover处理程序需要markerclustererplus。

在今天的地图更新后,click无法再针对触摸屏设备正常运行。 click适用于使用鼠标/触控板的笔记本电脑/台式机,但不再适用于触摸屏。

我尝试了两个可用的markerclustererplus库,两个都已损坏。

https://github.com/googlemaps/v3-utility-library/tree/master/markerclustererplus https://github.com/mahnunchik/markerclustererplus

我也试过了标准的markerclusterer库,它似乎也没有工作。

https://github.com/googlemaps/js-marker-clusterer

在今天的地图更新之前,一切正常。

有没有人对此有解决方法?

编辑:

我正在使用Django 1.11。在前端,除了jQuery 3.2.1之外,我不会使用任何库。

我的代码显示不多。这很标准。

markerCluster = new MarkerClusterer(map, markers, clusterOptions);

markerCluster.addListener('click', function(cluster) {
    markerClusterActivate(cluster);
});

function markerClusterActivate(cluster) {
    ... stuff that happens when cluster is clicked
}

1 个答案:

答案 0 :(得分:0)

所以这是一个解决方法,你只需回滚谷歌地图 3.30

对于vue.js项目。 https://github.com/xkjyeah/vue-google-maps/blob/v0.8.1/API.md

import Vue from 'vue'
import * as VueGoogleMaps from '~/node_modules/vue2-google-maps'

Vue.use(VueGoogleMaps, {
  load: {
    key: 'YOUR_API_KEY',
    v: 'GOOGLE_MAPS_VERSION',
    libraries: 'places' // Only if you need Autocomplete
  }
})