TROLLEY WEBMAP

Scope

The end product of this project is a map made available on the internet that shows the real-time live location of the Perth Amboy Hometown Heritage Trolley.

Log

2024-11-11

I promise I'll get into specifics soon, but for now, I need to make a comprehensive list of what's left before launch.

2024-11-10

I've done a lot in the past few days and I will get to all of that soon, but I wanted to document a couple of key changes I've made that solved some big problems.

  1. Finally figuring out the caching issue. After so many attempts to figure this out, I finally figured out that the caching of the website is coming from CloudFlare, and not Apache or the browser. It turns out CloudFlare has a "Cache" section in the domain manager, and this is what was responsible for the page not updating immediately when I pulled the latest git repo commit from the server. I first completely purged the cache and verified that this was, in fact, the culprit. Then, I enabled "Development Mode" which bypasses the cache, and it has worked as expected since then. As I undetstand it, this is supposed to be a temporary measure so I'll have to investigate what the right course of action is, but in the meantime I am happy to have figured this out.
  2. CORS error seemingly "randomly" appearing. As it turns out, however, it was not random. I figured out that I would only get the CORS error when I visited the website with "www." prepended to it. After some finagling with the Apache site configuration, I set up a redirect for all traffic to https://perthamboytrolley.com. I will post more details on this soon.

2024-11-04

I've managed a solid amount of progress today. Let's walk through it.

2024-11-03

There is still a lot of work to do but I think I'm getting closer.

2024-10-30

Let me try to summarize what I have left to do:

2024-10-21

I've managed to get some, but not a whole lot, more progress over the last days:

2024-10-17, 2024-10-16, 2024-10-15, 2024-10-13

By this point, I've had this project on my plate for more than a few months, progressively chipping away at the research part of it but never really bringing it to a point where I can confidently say I know what I have to do.

Let me break down the components of this project in order to describe the research I've done to this point and what is left (which is everything, basically):

References

Reference Material

  1. YouTube - Real time location tracker app on leafletjs
  2. Trillium Transit
  3. Vine Transit Interactive System Map
  4. Perth Amboy Trolley Canva Page
  5. GitHub - busTrackingGps
  6. GitHub - MiamiTrolleyInfo

Traccar

  1. Traccar - Troubleshooting
  2. Traccar - Supported Devices
  3. Vehicle device tracker (or how the death of Automatic prompted me to find another way to exercise total control over my data and my OBD2 ports)
  4. Install Traccar on DigitalOcean VPS
  5. Traccar - API Reference
  6. Traccar - API
  7. GitHub - traccar - config
  8. Traccar - Configuration File

Leaflet

  1. GitHub - Leaflet Realtime
  2. Leaflet Examples
  3. Leaflet - Quick Start Guide
  4. Reddit - Which tool (leaflet, OpenLayers etc..) would you recommend for a web map which allows users to change the attribute of vector shapes?

CORS

  1. Traccar - CORS Configuration
  2. MDN - Access-Control-Allow-Origin
  3. MDN - upgrade-insecure-requests
  4. StackOverflow - How does the 'Access-Control-Allow-Origin' header work?

Freematics

  1. Freematics ONE Developer Guide

Fetch API

  1. MDN - async function
  2. MDN - Using the Fetch API