i have a WFS point layer published in Geoserver that i am displaying on open layers I can access attributes in the form of labels using the following code. I want to edit a particular attribute.Also i want to change the style of the edited point based on that attribute value.

var sourceWFS = new ol.source.Vector({
    loader: function (extent) {
        $.ajax('http://localhost:8080/geoserver/workspace/ows?', {
            type: 'GET',
            data: {
                service: 'WFS',
                version: '1.1.0',
                request: 'GetFeature',
                typename: 'layer',
                srsname: 'EPSG:3857',
                bbox: extent.join(',') + ',EPSG:3857'

        }).done(function (response) {
    strategy: ol.loadingstrategy.tile(ol.tilegrid.createXYZ()),
    strategy: ol.loadingstrategy.bbox,
    projection: 'EPSG:3857',
var selectStyle = new ol.style.Style({ 

    stroke: new ol.style.Stroke({
        color: 'rgba(0,0,0,1.0)',
        width: 1
    fill: new ol.style.Fill({
        color: 'rgba(0,0,0,0.5)'
    text: new ol.style.Text({
         scale: 2,
         color: 'red',



var interactionSelect = new ol.interaction.Select({

style: function(feature) {

        return selectStyle;



0 Answers