私はトウを持っていますol.interaction.Selectを1回クリックするともう1回ダブルクリックします。をクリックしてダブルクリックして、インタラクションの選択を解除します。OpenLayers 3
var selectDoubleClick = new ol.interaction.Select({
multi: true,
condition: ol.events.condition.doubleClick,
style: function(feature) {
//stuff here;
}
return feature;
}
selectDoubleClick.on('select',function(event) {
//stuff here
}
var selectSingleClick = new ol.interaction.Select({
multi: true,
condition: ol.events.condition.singleClick,
style: function(feature) {
//stuff here
}
return feature;
}
selectSingleClick.on('select',function(event) {
//stuff here
}
しかし、ダブルクリックの選択を解除するには、地図で2回クリックする必要があります。ワンクリックでダブルクリックを解除する方法はありますか?
ダブルクリックには両方を割り当て、 'return feature;'はどこに置いたのか分かりません。それはスタイル関数の中にあるべきですか?あなたのマップがどのように見えるのかわからないので、私たちがあなたのために生き生きとした例を提供できますか? – Icarus
はい、真のイカルス、私の間違いですが、エラーは続いています。ダブルクリックで選択した機能を選択解除すると、2回のクリックで選択解除する必要があります。 –