• Attn: If you were on the old forum, you may have to reset your password!

We are aware the maps are not currently working

domvar

Administrator
Hi Dom,

A long time ago I built some software into the forum to generate the maps automatically from the metbox database using the free google maps service. It was a fair amount of effort when I had free time and was programming behind the scenes on the forum a lot - so it was concurrent with building the Metbox database machinery (to support Banzai/Alan's research).
Unfortunately google withdrew the free map service some time ago, and all the maps have been offline since then.
I think there's an open source thing called Open Map View or something similar which might do something similar with some programming - if it still exists, but I've not had the time to delve into it.

So unfortunately there isn't a quick fix.
I'm hoping I may have some more time to work on these things in the new year.

Best,
Crispin
 
Found "Leaflet"

which  uses OpenStreetMap


https://leafletjs.com/


If the mods could setup the base page as  shown in the examples on their site which seems to be London
( needs leaflet.css, leaflet.js )
then it should just be a case of adding additional markers for each box like this:



L.marker([51.510178, -0.18798]).addTo(map)
   .bindPopup('Box F13
Bayswater Road')
   .openPopup();



This adds a marker (marker-icon.png) at the correct Longitude/Latitude ( for the 'Chase' Box )

Marker like this:

marker-icon.png

Clicking on the marker brings up box number and street name.

Would be nice to change marker to a Mk4, Mk 5 or Post depending on type but thats icing on the cake.

I'd be prepared, for London Met Boxes, to create and add the above code snippets if thats possible ( or pass them on somehow )
 
This looks like it might be just what we need! Thanks!
I'd found Open Street Map, but leaflet.js looks like it should make that a lot easier to work with.

I have family arriving today for the holidays, but with luck I can find some time to work on this soon.
I don't like to make promises I can't keep, but it might possibly happen before the new year if it turns out not to have any serious stumbling blocks.

Thanks for the offer of help - it looks like there's all the information there that I need - at least so far. :)

Cheers,
Crispin
 
Thanks a lot Crispin.

Here's a few to start with:

L.marker([51.510178, -0.18798]).addTo(map)
   .bindPopup('Box F13
Bayswater Road')
   .openPopup();


L.marker([51.539129, -0.1425]).addTo(map)
   .bindPopup('Box N1
Camden Town Station')
   .openPopup();


L.marker([51.543703, -0.152446]).addTo(map)
   .bindPopup('Box S48
Chalk Farm Roundhouse')
   .openPopup();


L.marker([51.666839, -0.25453]).addTo(map)
   .bindPopup('Box S64
Well End Road')
   .openPopup();


L.marker([51.672715, -0.238792]).addTo(map)
   .bindPopup('Box F13
Barnet By-Pass')
   .openPopup();


L.marker([51.434103, -0.224512]).addTo(map)
   .bindPopup('Box V23
Wimbledon Common')
   .openPopup();


L.marker([51.475757, -0.23921]).addTo(map)
   .bindPopup('Box V20
Castelnau & Ferry Road')
   .openPopup();


L.marker([51.532939, -0.320674]).addTo(map)
   .bindPopup('Box X41
Western Avenue')
   .openPopup();


L.marker([51.527269, -0.342507]).addTo(map)
   .bindPopup('Box T66
Ruislip Road East')
   .openPopup();


L.marker([51.649485, -0.060757]).addTo(map)
   .bindPopup('Box Y49
Southbury Road')
   .openPopup();


L.marker([51.483207, -0.32658]).addTo(map)
   .bindPopup('Box T56
Syon Lane')
   .openPopup();


L.marker([51.540493, 0.098668]).addTo(map)
   .bindPopup('Box K5
Westrow Drive')
   .openPopup();


L.marker([51.58161, 0.000327]).addTo(map)
   .bindPopup('Box J14
Wood Street')
   .openPopup();

L.marker([51.419295, -0.147328]).addTo(map)
   .bindPopup('Box W29
Mitcham Lane')
   .openPopup();

L.marker([51.543866, 0.078251]).addTo(map)
   .bindPopup('Box K4
Ilford Lane')
   .openPopup();

L.marker([51.342774, -0.016522]).addTo(map)
   .bindPopup('Box Z49
Salcot Crescent')
   .openPopup();

L.marker([51.45163, 0.178592]).addTo(map)
   .bindPopup('Box R34
Crayford Bridge')
   .openPopup();

L.marker([51.32083, -0.138268]).addTo(map)
   .bindPopup('Box Z9
Brighton Road')
   .openPopup();

L.marker([51.43347, -0.513793]).addTo(map)
   .bindPopup('Box T68
Staines Market square')
   .openPopup();

L.marker([51.665532, -0.199079]).addTo(map)
   .bindPopup('Box S60
Kitts End Road')
   .openPopup();

L.marker([51.655752, 0.039327]).addTo(map)
   .bindPopup('Box J38
Epping New Road')
   .openPopup();

L.marker([51.480668, -0.452306]).addTo(map)
   .bindPopup('Box T69a
Heathrow North Box')
   .openPopup();

L.marker([51.607723, -0.000247]).addTo(map)
   .bindPopup('Box J22
The Avenue, Highams Park')
   .openPopup();

L.marker([51.514892, -0.195388]).addTo(map)
   .bindPopup('Box F12
Westbourne Grove')
   .openPopup();


L.marker([51.487419, -0.195544]).addTo(map)
   .bindPopup('Box B5
West Brompton Station')
   .openPopup();


 
I'll give it go. But we don't need to enumerate them manually, I built some server-side machinery to generate the map automatically from the coordinates stored in the database, so its just a matter of pulling the software pieces together... The maps were never populated by hand.
 
Are thats good.

I placed all my above locations accurately on OpenMap to check they worked also some of the locations by description were wrong and all the above were derived from either where I remembered the Boxes to be or by looking at photos as at least Epping was wrong and Southbury Road also.

I've attched some icons that may be of use. SJA arrows, a MK4 and MK5 that I scaled down from photos I've taken.

sja-arrow-icon-49x39-light-blue.png

sja-arrow-icon-49x39-dark-blue.png

mk4-icon-49x23.png

mk5-49x22-icon.png

These may or may not be of any use. The default icon can be changed and also from the documentation its not too difficult to use custom markers.
 
Complete Mapping of all items in Database, using a bit of "grep" and 'C', inc Posts and Mk5:

From S66 Barnet in the North. To Kingswood W49 in the South, Staines Market T68 in the West to Erith R32 in the East.

Screenshot_2019-12-29 Police Box Map.png

Screenshot_2019-12-29 Police Box Map(1).png

Crispin, I can send you the HTML, its 65kbytes. Think its too much for PM ?
 
This is a magnificent effort - and many thanks for the info via PM.

What I possibly failed to make clear above is that the maps are automatically generated from the database on the fly, so there's no HTML file kept on the server with 600 map coordinates in it - it all comes directly from the database whenever you visit the map page. This way the map is always up-to-date and the info is always in one place.
I haven't actually looked at the code I wrote to do this since 2013, so I'm going to have to re-familiarize myself with that... :o
The info about how to get the map to show with any marker on it all is the piece I needed - many thanks for that.

My holiday visitors have departed now, and we're still catching up with tasks around the house, but I'm hoping to get to the maps here soon. Bear with me.
 
updated Post Icon:

box-posts-2png.png

icon here:

pst-icon-43x9.png

and icon code here:

var pstIcon = L.icon({
   iconUrl: 'pst-icon-43x9.png',
   iconSize: [9, 43],
   iconAnchor: [5, 42],
   popupAnchor: [0, -42]
});

MK4 and Mk5 Box icons in earlier posts above

Hope this helps.
 
White Boxes have no known picture ( apart from perhaps Britain From Above )

Blue Boxes = good known image as of posting date:

all-boxes-1k-png.png
 
Back
Top