mirrorlist template using OSM instead of Google Maps#72
mirrorlist template using OSM instead of Google Maps#72poempelfox wants to merge 4 commits intovideolabs:masterfrom
Conversation
…m mirrorstats.html originally, so should be corrected there too!)
|
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). |
|
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.
|
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 |
|
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. |

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.