Взаимодействието Modify с условието pointerMove
във взаимодействието Select дава TypeError: this.a[d] is undefined (c)};l.update=function(b,c){var d=ma(c);Wd(this.a[d].slice(0,4),b)||(this.remove...
ol.js str 342, col 728)
var point_source=new ol.source.Vector();
var PointVectorLayer = new ol.layer.Vector({
source: point_source
});
var layers = [PointVectorLayer];
select_interaction = new ol.interaction.Select({
condition: ol.events.condition.pointerMove
});
selected_points=select_interaction.getFeatures();
var modify_interaction = new ol.interaction.Modify({
features: selected_points
});
var view = new ol.View({
zoom: 10,
center: [8530308.307502387,5342345.99739733]//Каскелен
});
var map = new ol.Map({
interactions: ol.interaction.defaults().extend([
select_interaction,
modify_interaction
]),
controls: [new ol.control.Zoom()],
layers: layers,
target: 'map',
view: view
});
map.on('click', function(evt){
var click_point = new ol.Feature({
geometry: new ol.geom.Point(evt.coordinate)});
point_source.addFeature(click_point);
});