Websockets with maps

Hi I have this code,
https://snippet.webix.com/tclb4qt0
What I need is to load my markers with web sockets because Sellers will change their position in the map in real time. Please help me and thanks!

Just some comments, not an answer to the question:

  1. When asking for help, it’s good practice to reduce your code to the minimum necessary for the people helping you to understand the problem. Including 7 map markers with real-looking data, event handlers, and a bunch of other things, is not necessary. Try to reduce the problem to the essence: “How do I load data using WebSockets”. Remember that your post can be seen by many people, who will have to spend time understanding the code. Not only is it polite to reduce that time for them, it’s also to your advantage: many people might just give up when they see they have to deal with 100+ lines of code from a person they don’t know.

  2. Show us what you’ve tried to so far. Have you read the post on WebSockets? Have you tried applying the techniques described there? Where did you get stuck?

  3. Try using up-to-date ES coding conventions, and a linter. For example, the code has many vars that should be consts, and it’s randomly indented.

  4. Using localized variable names is bad practice. In case someone needs to work on the code and they don’t understand that language, that’s a problem. Like it or not, the universal language, especially in programming, is English.

  5. You don’t need to contort a URL with $proxy to simulate loading data into the DataCollection. You can use the data property like this.

Hey @Hellekin, honestly the best help on implementing real-time updates using WebSockets would be reading this article (the one already linked above). The examples provided are quite clear and straightforward.

If you are having issues implementing some part of the code, or you are getting unexpected errors, please tell us about your experience and we will try to help you out.