我使用的OpenLayers來繪製一個集羣戰略地圖上的點的功能。的OpenLayers點擊選擇功能觸發功能
strategy = new OpenLayers.Strategy.Cluster();
clusters = new OpenLayers.Layer.Vector("Clusters", {
strategies: [strategy],
styleMap: new OpenLayers.StyleMap({
"default": style,
"select": {
fillColor: "#ff0000",
strokeColor: "#ffbbbb"
}
})
});
[.......]
clusters.addFeatures(features);
我還在使用SelectFeature選擇地圖上的點要素。
select = new OpenLayers.Control.SelectFeature(
clusters, {
clickout: false,
toggle: false,
hover: false
}
);
map.addControl(select);
select.activate();
clusters.events.on({"featureselected": clickPoint});
當用戶選擇羣集功能時,會彈出一個包含要選擇的功能列表。當他選擇其中一個彈出式關閉並且聚集功能保持選定狀態時。
現在出現這個問題。我希望能夠點擊羣集功能,以便彈出窗口再次出現。我能做的唯一事情就是設置切換:true,但是這個功能會被取消選中。
當用戶點擊選定的功能時,是否有辦法觸發事件?
Thx提前, 意利
THX,解決方案行之有效我! – manilly 2013-03-19 09:03:16