0

이 문제는 삼성 Galaxy S4 표준 인터넷 브라우저 (Android 브라우저)에서만 발생하는 것으로 보입니다. 클러스터를 클릭하거나 컨트롤을 사용하여 확대하면 첫 번째 클러스터의 이미지가지도에 남아 있습니다.Samsung Galaxy s4의 Markercluster가 줌/클릭시 마커를 제거하지 않습니다.

마커를 제거하고 다시 시도했지만 거의 성공하지 못했습니다. Google에서 검색했지만 유용하지 않은 사람이 누구나이 문제에 대한 해결책을 갖고 있습니까?

편집 : 이미지를 참조하십시오.

Captures 편집 2 : 다음은 내가 시도한 것입니다.

google.maps.event.addListener(map, 'zoom_changed', function() { 
    if (mapMarkers.length > 1) { 
     for (var i = 0; i < mapMarkers.length; i++) { 
      mapMarkers[i].setVisible(false); 
      mapMarkers[i].setVisible(true); 
     } 
    } 
}); 

google.maps.event.addListener(map, 'clusterclick', function() { 
    if (mapMarkers.length > 1) { 
     for (var i = 0; i < mapMarkers.length; i++) { 
      mapMarkers[i].setVisible(false); 
      mapMarkers[i].setVisible(true); 
     } 
    } 
}); 
+0

가 downvoter 감사를, 귀하의 의견은 매우 – Cammy

답변

1

동일한 문제가 발생하여 다음과 같이 나타났습니다. https://code.google.com/p/google-maps-utility-library-v3/issues/detail?id=309. 무엇 내 상황에 근무하는 markercluster.js의 unminified 버전을 편집했다 :

/** 
* Adding the cluster icon to the dom. 
* @ignore 
*/ 
ClusterIcon.prototype.onAdd = function() { 

    this.div_ = document.createElement('DIV'); 
    if (this.visible_) { 
     var pos = this.getPosFromLatLng_(this.center_); 
     this.div_.style.cssText = this.createCss(pos); 
     this.div_.innerHTML = this.sums_.text; 
    } 
    // added this else statement 
    else { 
     this.hide(); 
    } 

    var panes = this.getPanes(); 
    panes.overlayMouseTarget.appendChild(this.div_); 

    var that = this; 
    google.maps.event.addDomListener(this.div_, 'click', function() { 
     that.triggerClusterClick(); 
    }); 
}; 
+1

최고 평가하고,이 죽은 문제가 될 것이라고 생각 : 나는 그것이 시도주지! – Cammy