I was able to configure the interaction.
Documents for ol.interaction.Modify ( http://ol3js.org/en/master/apidoc/ol.interaction.Modify.html ) not Metion is one event that fires when a function is modified.
Unlike, for example, for ol.interaction.Draw ( http://ol3js.org/en/master/apidoc/ol.interaction.Draw.html ), which works well.
I need to update the coordinates in the database when the function was changed.
How to set up a listener?
I have found a solution.
: http://boundlessgeo.com/2014/06/openlayers-editing-wfs-t/
, ( ). .
:
// get the features from the select interaction var selected_features = select_interaction.getFeatures(); // when a feature is selected... selected_features.on('add', function(event) { // get the feature var feature = event.element; // ...listen for changes on it feature.on('change', function(event) { // got it! }); });
: http://codepen.io/barbalex/pen/fBpyb
, , :
feature.once('change', function(bool) {if (bool) {document.getElementById('my_input_text').value='feature changed'}})
" " 'on', , , .
Source: https://habr.com/ru/post/1548273/More articles:How to run the Mule export studio equivalent in a script? - muleРежим Emacs Evil и режим org-mode - emacsOptgroup in DropDownlistFor MVC 4? - c #Partial data frame transfer - rCSS javascript deleteRule property - javascriptUsing regex expression in python - pythonClient side ConnectionAbortedError: [WinError 10053] while waiting for s.recv (4096) response - pythonHow to make JTable cells inaccessible for editing, but selectable - javarow index is always -1 displayed in JTable - javaJQuery CORS query dies in preflight OPTIONS query in FireFox - jqueryAll Articles