1
マーカーがあるレイヤーとポリラインを持つレイヤーがあります。マーカーはポリラインの最後にあります。私は、ポリラインの終わり(オーバーラップ)に同期するマーカーをドラッグするのが好きです。Openlayers 3同じ位置にある2つの異なるレイヤーから2つのフィーチャーを選択してください
var features = new ol.Collection();
var featureOverlay = new ol.layer.Vector({source: new ol.source.Vector({features: features}),style:styles});
featureOverlay.setMap(map);
var markers = new ol.Collection();
var markerOverlay = new ol.layer.Vector({source: new ol.source.Vector({features: markers}),style:styles});
markerOverlay.setMap(map);
var modify = new ol.interaction.Modify({features: features});
map.addInteraction(modify);
var modifyn = new ol.interaction.Modify({features: markers});
map.addInteraction(modifyn);
これは同期していません。ポリラインの終わりとマーカーを別々にドラッグする必要があります。
どうすれば両方同時にドラッグできますか?
ありがとうございます! Andreas。