1

I've been working on the implementation of an edit the position of a point functionality. I use leaflet and geoserver and give the possibility to the user to change the location of a point. It works as expected but its a bit slow. As you can see in the image, although the WMS point has moved correctly, the WFS point is still in the old position. It takes some time (approx. one minute) in order to be displayed correctly.

Any ideas why this is happening?

enter image description here

EDIT

This is how I implement the edit. I actually send a POST request using Python Requests library. The XML of the POST request looks like this:

<wfs:Transaction service="WFS" version="1.1.0"
  xmlns:ogc="http://www.opengis.net/ogc"
  xmlns:wfs="http://www.opengis.net/wfs"
  xmlns:gml="http://www.opengis.net/gml">
 <wfs:Update typeName="geonode:{{ layer_name }}">
  <wfs:Property>
   <wfs:Name>the_geom</wfs:Name>
    <wfs:Value>
     <gml:Point>
       <gml:pos>{{ coords }}</gml:pos>
     </gml:Point>
    </wfs:Value>
  </wfs:Property>
 <ogc:Filter>
   <ogc:FeatureId fid="{{ coords }}"/>
  </ogc:Filter>
 </wfs:Update>
</wfs:Transaction>
  • 2
    Your client might cache it, have you tried requesting the point from another "clean" client? QGIS can be useful for testing or even straight tools like the manual HTTP request via your browser, wget or curl or maybe OGR. – bugmenot123 Dec 22 '16 at 10:36
  • Yes you must be right. Its related with browser caching. How do you deal with this issue? Refreshing the cache manually is a no go. – user1919 Dec 22 '16 at 10:41
  • 1
    Can you show how you are implementing the edit? – BradHards Dec 22 '16 at 10:42
  • @BradHards I have edited my question. – user1919 Dec 22 '16 at 10:49
  • 1
    That would be easier if you show the client side code. The WFS-T request XML is really about changing the server state, and can't change the render side on the client. – BradHards Dec 22 '16 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.