There are many analytics tools available in PostGIS, so buffering may seem a bit dull. On the other hand, it is a common example and it is simple enough to let us focus on how to use it in web realms. Thanks to that, we can quickly demonstrate a simple logic that can later be scaled into some more sophisticated tools.
Our buffer functionality is almost the same as the delete functionality. It uses the same type of interaction - select interaction - but instead of asking the user for a confirmation, it prompts the user to input a buffer size in degrees. Once the data is collected, a POST request is sent to the server, which replies with a WKT encoded buffer geometry.