Main Content

Dynamic maps / geographics in PHP

Archive - Originally posted on "The Horse's Mouth" - 2008-08-13 11:53:35 - Graham Ellis

I've been doing some work with log file / exception report analysis over the past few days, with a geographic slant. And I've come to the conclusion that a picture paints a thousand words ... or even more!

Do you prefer a listing of log file data - in this first case of trains that are shorter than they should be, not running their (full) route or lack catering ...

Affected trains:
13:05 Falmouth Docks to 13:29 Truro
12:38 Looe to 13:08 Liskeard
12:37 Truro to 13:00 Falmouth Docks
12:08 Liskeard to 12:37 Looe
11:50 Falmouth Docks to 12:14 Truro
11:40 Looe to 12:07 Liskeard
(etc - 30 lines or more ---)


I know that I personally prefer to see a quick graphic to tell me - at a glance - where there are issues, with a option to provide the full gory detail where it's needed - first down to a list of specific service and then, if one service is of especial relevance, to a pop such as the one to the right of this paragraph.

Let me give you some links.

If you're interested in the data on these diagrams and want to see it regularly, have a look at the First Great Western Coffee Shop where the diagram appears on the top left of each page, and at our details page where you can see the text (and get links to popups too!) if you want to look in depth.

If you're interested in using this technology yourself, you can see the source code of the detail page here and the source code for the dynamic image in PHP here.

For readers who would like to use the technology, but don't yet have the knowledge / background to do so without serious help, can I point you towards our PHP Programming course, and / or our PHP Techniques Workshop where you can pick up that knowledge.




The examples above came about as a result of various work / experimentation we're doing internally to help with out marketing - keeping an eye on where abouts our web site visitors are browsing from. You've seen some sample outputs from that work earlier on these pages - but here are some more:



The use of dots of different colours to differentiate them, and sizes (to give an idea of the numbers of hits) are very informative - and again they are somwthing we can help you with if you want to do something like this.