Skip to content

Demo project demonstrating the use of WebSockets and GoogleMaps to perform real-time tracking

Notifications You must be signed in to change notification settings

gikonyob/websockets-googlemaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Real-time Tracking with WebSockets and GoogleMaps

Websockets and Google Maps

This is a demo project demonstrating the use of WebSockets and GoogleMaps to perform real-time tracking of clients.

Installation

Make sure you have php and composer installed and that the sqlite extension for php is installed and enabled in php.ini, then run the following commands;

	git clone https://github.com/GikonyoBrian/websockets-googlemaps.git
	cd ./websockets-googlemaps/server
	composer install

Configuration and Running

You will need to get a Google Maps API key and then enable the Google Maps Javascript API. Then go to line 138 of ./client/webmap.js and replace API_KEY with the key you get.

$.getScript("https://maps.googleapis.com/maps/api/js?key=API_KEY&callback=initMap", function() {

Finally, run the following commands to start the websocket server;

	cd ./server
	php bin/track-server.php

Then run the following commands to start the http server;

	cd ./client
	sudo php -S localhost:80

Launch different browsers and go to http://localhost/websocket-googlemaps.html and register and login as different users.

About

Demo project demonstrating the use of WebSockets and GoogleMaps to perform real-time tracking

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages