Код: Выделить всё
strategies: [new OpenLayers.Strategy.Fixed(), new OpenLayers.Strategy.Cluster({distance: 50, threshold: 3}) ],
Код: Выделить всё
strategies: [new OpenLayers.Strategy.Fixed(), new OpenLayers.Strategy.Cluster({distance: 50, threshold: 3}) ],
Код: Выделить всё
function onSelect(evt) {
feature = evt.feature;
if (feature.cluster){
popupText = feature.cluster[0].attributes.place;
}
popup = new OpenLayers.Popup.FramedCloud("featurePopup",
feature.geometry.getBounds().getCenterLonLat(),
new OpenLayers.Size(100,100),
popupText,
null, true, onPopupClose);
feature.popup = popup;
popup.feature = feature;
map.addPopup(popup, true);
}
Сейчас этот форум просматривают: нет зарегистрированных пользователей и 2 гостя