Closed haryshwaran closed 9 years ago
Everything about the map is in (or accessible via Javascript linked from) the HTML source of the pages it's on, e.g. http://effectivealtruismhub.com/map (and http://effectivealtruismhub.com/groups and http://effectivealtruismhub.com/ ). So you can fix it with a local copy of that. The map points included in that HTML source are generated elsewhere, but you don't need to worry about that.
(Currently they're generated at ea...hub dot com /sites/effectivealtruismhub.com/scripts/map-exports/ea-profiles.php pending someone taking on https://github.com/tog22/eahub/issues/17 .)
The Map tiles returned 404s from Mapbox which is why they were greyed out. A new Map box account was created to replace the tile provider for leaflet.js. The map now displays properly at the dev site.
Deployed fix by @haryshwaran which was to paste in this code:
L.tileLayer('https://api.tiles.mapbox.com/v4/shared-ea-account.ee9fbb54/{z}/{x}/{y}.png?access_token=pk.eyJ1Ijoic2hhcmVkLWVhLWFjY291bnQiLCJhIjoiM2M3YjdmNzcwNDg1MmM5YjliMzIyNThkZTc2OWJjMWUifQ.-QAdcCLKxJZr8dtAofvdsw',{
maxZoom: 18,
attribution:
'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> — ' +
'Map data {attribution.OpenStreetMap}',
subdomains: 'abcd'
}).addTo(map);
attributions need to be fixed and subdomains can be removed, please use this code instead of the above one.
L.tileLayer('https://api.tiles.mapbox.com/v4/shared-ea-account.ee9fbb54/{z}/{x}/{y}.png?access_token=pk.eyJ1Ijoic2hhcmVkLWVhLWFjY291bnQiLCJhIjoiM2M3YjdmNzcwNDg1MmM5YjliMzIyNThkZTc2OWJjMWUifQ.-QAdcCLKxJZr8dtAofvdsw',{
maxZoom: 18,
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
'Imagery © <a href="http://mapbox.com">Mapbox</a>'
}).addTo(map);
code added to all pages and attributions has been fixed
:+1:
The groups tagged on the map are visible but the map itself is missing showing only a grey Background.