-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Support for Drop a Pin #477
Comments
Kind of related to the comparison mode and #482 (comment). I feel we should add some kind of new concept in carto for react, some kind of custom views that includes a preset of layers and widgets |
After some conversation and a bit of analysis with @thedae , I'm going to summarize all the data I have and some of my thoughts in terms of proposals and recommendations: The use case for this feature seems clear. Basically, the user clicks on a point in the map and the app will show a sidebar with some widgets showing the data for the catchment area. In addition, the user will be able to select how the catchment area is calculated (size of the buffer area, time for the isochrone, etc). This is the basic use of this feature, the thing turns complex when through this feature we want to cover the comparative mode (#479). In this scenario, the issue comes because the different points and their area can be in different locations, very far from others, not allowing the use of the current implementation based on the viewport to get the features. With that, we have the following subcases: Single drop a pinThis is the very basic use of this feature. The API will provide a React component to be used in the C4R app, and different widgets will take their data through a spatial filter based on the viewport. I think, there is no challenge here to do that. An example of the widget declaration can be as follow: <DropAPinWidget // or DropAPinView
source='assets' // the base source that activates this feature when the user clicks on
methods=['buffer','isoline','isochrone'] // more config related with how this component will work
/> The declaration of this component will draw the following UI element and the app will show a sidebar with the widgets. Multiple drop a pinThis is the complex use of this feature that includes multiple catchment areas and where each one provide data to different widgets. The alternatives to accomplish this feature in terms of getting the data are:
Apart of these methods to send the geometry, the backend strategy faces the challenge of how to send multiples areas for multiples widgets. In a tipical case of 3 areas to be compared and 5 widgets, this will need 15 requests to show the comparative data in the widgets.
|
Target Use Case
In products like Site Selection or CPG, there is a feature called Drop a Pin that provides the ability to pin a point in the map through a geometry based on a buffer or isochrone to get some insights into this catchment area.
Implementation Proposal
To cover this feature, Carto4React could include this component as a widget with some options like:
The text was updated successfully, but these errors were encountered: