[General]GPS for browser

Joined
Aug 6, 2009
Messages
2,133
Reaction score
433
Good day ragezone coders,

I will try to make it short and easy. There is USB GPS device that creates a COM port to which you can connect and read GPS status and location. I can read it in C# and probably in PHP as well(probably, didn't try).

There is also a a page that shows a google map (from my previous work) with quiet few addresses. I would love to add current location to the map as well. And there are two ways I can think of, so I need a public opinion.

Method #1:
Web page connects to C# listener via WebSocket. No need for requests from client(web page) since C# can just push data(location). Not sure how well it would perform. Possibly could update location as fast as USB GPS updates it.

Method #2:
Have web page do ajax requests to a php script which would then open com port read location and send back. Not realy sure if it can be done in php but should be. But as a con, there would be too much extra data.

Method #3:
Forgot....

Anyone can post a feedback or an opinion? I most certain that I will go with websocket but never worked with it and have no idea how well it will be supported.
 
No experience on the tools you have there, but I'm curious what your purpose is.. to broadcast the location of your server just for fun?

I will try my best to explain.

I work with delivery company. Delivery company provides API for me. I will be getting few drivers that will work for me.

As a driver myself, I found it really helpful when I can see overall view of my delivery route. Thus I am plotting route stops on a map. This is very helpful since I can plan if I wanna deliver heavy weights or specials first rather than just doing everything.

I was able to cut my time nearly in half (from 8 hours to 4 hours).
So far I have been using mappoint and some google maps. I feel like going with google maps is a huge upgrade since the tool can be used on computer, laptop, tablet, hell, even on smartphone.

Back on topic. If I can provide such tool to my drivers, they can cut their delivery times. Because they need less time to deliver, they can carry more stops, thus making more profit for them and myself.

How exactly is tool helpful? In warehouse driver receives packages. Scans and loads them. On route you have no idea what package you are looking for even if it's says 2 packages 20lb in paperwork. Once you find package(s), you have to fill out paperwork plus scan packages. Takes more time than you think.
With tool, driver can see listed stops near his location, quantity, weight and sizes (amazon and most packages come in boxes with code). From there you just get the packages, deliver and post from laptop/tablet/etc directly. No need for paperwork, scanner, etc. Tho scanner can be used still.

Since I will be having drivers I also have to monitor how they are doing on route as well as record delivery locations + driving log. This prevents future problems.

Now to coding.

Drivers can run C# program on their laptop (or use gps from tablet/phone) along with web application hosted on my server.

Setting up websocket client is piece of cake, but making websocket server in C# is pain in butt without pre-made libs.
 
Back