Fleet tracking operations module
Vehicle Fleet Tracking
VelocityFleet Cache, Leaflet Map & Van Overlay
The Brief
The vehicle fleet tracking module adds live van visibility to the private tracker map without treating phones as tracking devices. A scheduled VelocityFleet poller pulls device positions into a private JSON cache, then the tracker map validates and displays the current-day vans as an overlay for authorised users.
Challenge
The operations team needed van visibility inside the same map used for tracker jobs, but the vehicle locations had to stay separate from job assignment, subcontractor access and public pages. The map also needed to avoid stale coordinates and invalid locations before rendering them.
Data Flow
A polling script calls VelocityFleet, normalises each vehicle into registration, latitude, longitude, driver, speed, ignition, heading, address and updated time fields, then writes the result to a private cache file. The map page reads that cache rather than calling VelocityFleet directly on every page load.
Access Control
The tracker map checks the logged-in email before exposing van locations. Subcontractors do not see vehicle positions unless the business has matching VelocityFleet vehicle or device data for them, and the van overlay does not assign work.
Map Rendering
Only vehicle positions updated today are kept. Coordinates are validated to be within Ireland, cleaned into a JavaScript VANS payload, and rendered by Leaflet as custom van markers. The sidebar list lets a user select a vehicle and centre the map on it.
Vehicle Popup
Each marker popup shows the practical operational details: registration, driver, speed, ignition, heading, address, updated time and a Google Maps directions link. This makes the overlay useful for dispatch context without mixing vehicle state into tracker job records.
Freshness
The page includes a JSON refresh path, but the scheduled refresh currently reloads the whole map page. In practice, van freshness depends on how often the VelocityFleet poller updates the private cache and how often the tracker map reloads or refreshes.
Outcome
The tracker now shows jobs and vehicles in one operational map while keeping the systems cleanly separated: jobs remain jobs, vans remain a location overlay, and the VelocityFleet integration can be monitored independently through the cache and poller.
Project Screens
The public portfolio screenshots are privacy-safe mockups based on the live workflow, showing how cached VelocityFleet positions appear as a van overlay on the tracker map.
Not getting enquiries?
Book a Free Website Review
Need a fixed price?
Get a Website Quote
Need a developer partner?
Become a Partner
GET IN TOUCH
Phone
085 839 2935
websites.dublin@gmail.com
Harbour view,
Sallins,
Co.Kildare,
Ireland,