map-chat icon indicating copy to clipboard operation
map-chat copied to clipboard

help

Open Blobme opened this issue 8 years ago • 3 comments

Hi, I'm trying to recreate it with no success. I did like you with mysite.github.io/map where I upload the static file using git.

And I'm using OpenShift cloud to host the server : so I have Vert.x 2.1 on it and now what I have to do ? upload ChatVerticle.java and run it? I tried on Putty command to run the server : java ChatVerticle.java but it's not working or do I have to edit vertx.env to add ChatVerticle.java?

Just need some clue

Thanks for you help PS ; sorry for my bad english

Blobme avatar Jun 19 '16 01:06 Blobme

Hi @franck38170 , First I see that http://franck38170.github.io/map-chat/ redirects to an https page which will be a problem if you do not enable wss on the server (Which the current ChatVerticle.java code does not support)

Other than that you will make sure that you have the Java JDK bin directory is on your PATH and follow these instructions to install vertx on you PATH http://vertx.io/vertx2/install.html . Go to the server folder and run the server with this command: vertx run ChatVerticle.java

idoco avatar Jun 19 '16 12:06 idoco

hello, Thanks it's all good I got it working. But I have another problem: Example User 1 (PC) goes on map and his geolocation is displayed User 2 (android phone) goes on map and his geolocation is displayed

User 1: geolocation of user 2 appears at the same time as the other (so I have 2 blue points) User 2: only its own geolocation appears

So user 2 never see User 1 except if User 1 send a message to User 2 then the blue point appears.

Do you have an idea for all geolocations appear? Using the session or a database?

Blobme avatar Jun 22 '16 13:06 Blobme

Hi @franck38170 , This is actually by design. After a user connects to the server, it publishes an empty message just to notify the existing users of its location. This is why users connecting after other users already connected and published their initial empty message will not see them until they will send another message.

If you want to fix that, you can change the UI code to send an empty message every minute or so if no other message was sent by the user; And if you will write me a pull request with this change I can merge it to the main branch :smile:

idoco avatar Jun 22 '16 13:06 idoco