GeoServer not displaying WFS-T data

المشرف العام

Administrator
طاقم الإدارة
I am developing an application using OpenLayers 3 that allows users to add,edit, and delete points as a WFS-T.

I am using postgis for database creation and geoserver for hosting the data.

Currently, when the user creates a new point it is saving to the database and displayed on screen. However, after reloading the application, only the points that were created using postgis are loading. Even though the points and their geometry are located in the database, any point created using the application disappears.

The code I am using to add points:

case 'addshow': interaction = new ol.interaction.Draw({ type: 'Point', geometryName: 'geom', source: vectorSource }); map.addInteraction(interaction); interaction.on('drawend', function(e) { var feature = e.feature; feature.set('location', $('#locname').val()); feature.set('date', $('#showdate').val()); var cntrlongdeg = parseInt($('#longdegrees').val()); var cntrlongmin = (parseFloat($('#longdecmin').val())/60); var cntrlatdeg = parseInt($('#latdegrees').val()); var cntrlatmin = (parseFloat($('#latdecmin').val())/60); if (cntrlongmin > 1) { cntrlongmin = (cntrlongmin - 1); } else if(cntrlatmin > 1) { cntrlatmin = (cntrlatmin - 1); } if(cntrlongdeg < 0) { var newpt = [(cntrlongdeg-cntrlongmin),(cntrlatdeg+cntrlatmin)]; } else if (cntrlatdeg < 0) { var newpt = [(cntrlongdeg+cntrlongmin),(cntrlatdeg-cntrlatmin)]; } else { var newpt = [(cntrlongdeg+cntrlongmin),(cntrlatdeg+cntrlatmin)]; } feature.set('geom', new ol.geom.Point(ol.proj.transform(newpt, 'EPSG:4326', 'EPSG:3857'))); WFStransaction('insert', feature); });Thanks in advanced for any suggestions.



أكثر...
 
أعلى