-
Notifications
You must be signed in to change notification settings - Fork 284
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
Automatic map updation at user's brower #345
Comments
@jywarren @divyabaid16 @sashadev-sky any ideas? |
@ViditChitkara I would love to help out with this, sorry for the delayed reply. We should schedule a time to discuss so we can get on the same page quickly. Are you available Wednesday? |
@sashadev-sky sure we may schedule a call on Wednesday. I think the updation part is working quite smoothly in publiclab/mapknitter#805 , however, we need to discuss how to proceed on it further. |
@ViditChitkara np! You're in india? |
@themacboy thats awesome. We save everything server side in a rails database in Mapknitter https://github.com/publiclab/mapknitter. You seem pretty skilled to me! |
Yes |
@ViditChitkara maybe we can just resolve this here and we won't be that complicated.. so what I am wondering is all of this can be done in MK right? Why upstream it? We can make a new route in MK that makes an ajax call and updates the map? |
Sure, I think we did when images are being updated when the browser gets a broadcasted event (from actioncable) and currently not via an ajax request. Additionally we'll require that a similar sort of event is called when an image is added or deleted onto the map and maybe some type associated with each image like "added", "deleted" or "updated" so that while refreshing the map we get to know which images have to be deleted or added or simply updated. |
So, I think a more solid and generic implementation of the synchronizeData (in #805 pr you reviewed)method could be done. Does that make sense? |
Connecting with publiclab/mapknitter#805. The basic setup of action cable is complete over here. Along with this, a json(currently empty for testing) is broadcasted to every browser on which editing is being taken place. This broadcasting will only happen when a single user edits an image on the map. The json will be of type:-
However, we'll require that the map gets updated once this json is received by the client. We need to build a function which will take this json and update the map with the warpables and their respective nodes. Any ideas on this would be really appreciated.
The text was updated successfully, but these errors were encountered: