Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUG location map doesn't always seem to be centring on/showing the correct location #159

Open
gwestwood opened this issue Jan 15, 2024 · 8 comments
Assignees
Labels
Template Change Required There is a bug in a template or a change proposal

Comments

@gwestwood
Copy link
Contributor

There seems to be an issue with the maps to show the LUG location. Several reports of it showing or centring on completely different parts of the country

@JonTheNiceGuy
Copy link
Member

This was because this information was provided by someone generously adding a "best guess" given the details provided. It probably should be reviewed on the next pass!

@gwestwood
Copy link
Contributor Author

gwestwood commented Jan 15, 2024

It's more than that, as per #143, Shropshire is showing a map that doesn't even include the part of the country where Telford is (and I had updated the co-ordinates to be the mentioned pub, but they weren't that far out):
Shropshire Map

@hollymcr
Copy link

+1 (peterboro LUG).

Every page I checked showed the same map centred on North Pennines AONB - not a bad place to be centred but not much use from a LUG map POV.

@gwestwood gwestwood added the Template Change Required There is a bug in a template or a change proposal label Jan 15, 2024
@JonTheNiceGuy
Copy link
Member

Ahhhhh... actually, I did get billed (admittedly, £0.01) by Google for the use of their Maps API. I wonder if my card was rejected and they've turned off rendering? :) Perhaps we should revisit using another mapping provider?

@gwestwood
Copy link
Contributor Author

I'd certainly be happy to look at other providers. Maybe OpenStreetMap? I've not looked at what their API is like though to know how easy it would be to use.

@hollymcr
Copy link

OpenStreetMap wiki gives a straightforward way to generate an iFrame containing a map, from there "all" you need is a set of coordinates per LUG, although you need that whatever mapping you use.

@gwestwood
Copy link
Contributor Author

@hollymcr Thanks. Looking at their website, they recommend the use of https://leafletjs.com. Their API is at https://leafletjs.com/reference.html. I might have a play with it at the weekend to see how we could implement it for the LUG mapping.

@hollymcr
Copy link

That seems unnecessarily complex (albeit that having played a bit with leaflet in the past it's fun to play with).

According to the OSM wiki it says to just embed the HTML generated by the share option on the OSM website. So the code for the Peterborough LUG would be something like:
<iframe width="425" height="350" src="https://www.openstreetmap.org/export/embed.html?bbox=-2.3703002929687504%2C51.83577752045248%2C2.2164916992187504%2C53.36038708103963&amp;layer=mapnik" style="border: 1px solid black"></iframe><br/><small><a href="https://www.openstreetmap.org/#map=9/52.6047/-0.0769">View Larger Map</a></small>
.. with the coordinates changing per LUG (I don't know what sort of resolution the map should be at but I'm assuming that other LUGs, like ours, only really need to show where the town is, we don't have a physical address within it)

I'm sure it could be tweaked with markers etc if needed. But the end result ought to be a template to which some map coords are applied per LUG.

@gwestwood gwestwood self-assigned this Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Template Change Required There is a bug in a template or a change proposal
Projects
None yet
Development

No branches or pull requests

3 participants