Giter Site home page Giter Site logo

Comments (6)

tog22 avatar tog22 commented on August 22, 2024

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 #17 .)

from eahub.

haryshwaran avatar haryshwaran commented on August 22, 2024

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.

from eahub.

tog22 avatar tog22 commented on August 22, 2024

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> &mdash; ' +
                    'Map data {attribution.OpenStreetMap}',
       subdomains: 'abcd'         
     }).addTo(map);

from eahub.

haryshwaran avatar haryshwaran commented on August 22, 2024

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 &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
                    '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
                    'Imagery &copy <a href="http://mapbox.com">Mapbox</a>'
     }).addTo(map);

from eahub.

haryshwaran avatar haryshwaran commented on August 22, 2024

code added to all pages and attributions has been fixed

from eahub.

OAGr avatar OAGr commented on August 22, 2024

👍

from eahub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.