-1
を上書きせずにマーカークラスターにカスタム画像を追加します。ページ)。は、私は、マップマーカーのクラスタを追加し、次のjQueryコードを持っているマーカー
私の問題は、クラスタにデフォルトで添付された画像がないことです。
私は、次の操作を行うことができます
var options = 'an image path';
markerCluster = new MarkerClusterer(map,markers,options);
しかし選択肢が三番目のパラメータであるとして、私は効果的に二番目のパラメータを上書きします。マーカを上書きせずにMarkerClusterにイメージを設定する方法はありますか?デフォルトでは
(function() {
var address = response[key]["address"];
$.getJSON('http://maps.googleapis.com/maps/api/geocode/json?address='+response[key]["post_code"]+'&sensor=false', null, function (data) {
var p = data.results[0].geometry.location
var latlng = new google.maps.LatLng(p.lat, p.lng);
var Marker = new google.maps.Marker({
position: latlng,
map: map,
content: address
});
markerCluster.addMarker(Marker);
google.maps.event.addListener(Marker, 'click', function() {
infowindow.setContent(this.content);
infowindow.open(map, this);
});
});
})();
問題を示す[最小、完全、テスト済みおよび読み取り可能な例](http://stackoverflow.com/help/mcve)を入力してください。どのように 'markerCluster'を作成していますか?空の配列を持つマーカーを追加する前に作成する必要があります。 – geocodezip