Skip to content

mirrorlist template using OSM instead of Google Maps#72

Closed
poempelfox wants to merge 4 commits intovideolabs:masterfrom
poempelfox:mirrorlist-osm
Closed

mirrorlist template using OSM instead of Google Maps#72
poempelfox wants to merge 4 commits intovideolabs:masterfrom
poempelfox:mirrorlist-osm

Conversation

@poempelfox
Copy link
Contributor

This adds an alternative template for the mirrorlist using OSM instead of Google Maps.
Pros: No Google; Map can be panned and zoomed
Cons: Loads some more javascript (Leaflet) to display the map instead of using a simple image generated by googles servers.

@poempelfox
Copy link
Contributor Author

I've made a small update to this PR, fixing the copyright display and adding the blue line between the marker for the user and the selected mirror (that the googlemaps-version had).
I've added this with a different filename because it hasn't really been tested much yet, but in the long term this could possibly replace the GM-version as the default, getting rid of the requirement to get an API key just to show your mirrors...

And here's a screenshot of how this looks:
mirrorlist-osmmap2

@jbkempf
Copy link
Collaborator

jbkempf commented Feb 3, 2018

Looks good, I like it!

And I would argue that OSM should be the default.

…and use only those with a weight plus the first three without weight to calculate the initial map position.
@etix
Copy link
Collaborator

etix commented Feb 5, 2018

Great enhancement! Do you see any reason we should keep the old Google Maps around? If not, can you maybe squash your patches into one, replace the default template instead of creating a new one and finally remove the GoogleMapsAPIKey configuration from the code?

@etix etix added this to the Soon milestone Feb 5, 2018
@poempelfox
Copy link
Contributor Author

No, I don't see any reason for keeping it around in the long run - I mostly didn't directly want to overwrite it because I was cautious: This OSM-version hasn't received much testing yet, and the GM version is known to work. I cannot guarantee this will not break in some corner-cases, e.g. no mirrors at all found or users position unknown or weird browser (the map markers styling is actually done in CSS, and we all know how totally 100% consistent that works across browsers!).

I'll close this PR and make a new one. When removing the APIKey config, the whole GetMirrorMapURL() function and even the test for it in mirrors_test.go will become redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants