CartoDB / carto-react

CARTO for React packages
https://docs.carto.com/react/
MIT License
38 stars 16 forks source link

[RFC] Save custom geometries created with the SpatialFilter #476

Closed efernandezleon closed 2 years ago

efernandezleon commented 2 years ago

Target Use Case

A very common feature requested by customers in PS is the ability to create custom geometries to filter data and then, reuse those geometries later to apply the filters. Right now, the functionality of creating a custom geometry is built thanks to the FeatureSelectionLayer, but the shape is lost once the user removes it. This RFC exposes the need to provide the user the ability to save this shape with a name to be used in the following sessions.

Implementation Proposal

A possible implementation could be to assign a name to the geojson of the drawn shape and store in a remote component through a specific API. This API should provide the CRUD actions to operate with this entities.

Another possible implementation could be store those custom geometries in the local storage of the browser. The cons here is that you won't share these geometries with others users in the app, but the main pro is related to lack of a specific backend for this.

padawannn commented 2 years ago

https://github.com/CartoDB/carto-react/issues/480#issuecomment-1268539697

alasarr commented 2 years ago

For me, this is a duplicate of https://github.com/CartoDB/carto-react/issues/482#issuecomment-1285703532.

The spatial filter should be treated as any other filter.

I'm closing this issue @efernandezleon, feel free to reopen if needed