Giter Site home page Giter Site logo

Comments (3)

marionnewlevant avatar marionnewlevant commented on June 19, 2024

This is the data in the json file that causes the problem. It doesn't always show Coos Bay, just whichever one was hovered over just before.

    {
      "properties": {
        "source": "events",
        "affiliate": false,
        "name": "Women's March for Action",
        "eventDate": "1/20/2017",
        "eventLink": "https://www.facebook.com/events/169175637014466/",
        "location": "Eugene, OR",
        "host": "Women's March for Action",
        "contactName": "",
        "contactEmail": "",
        "facebook": "https://www.facebook.com/Womens-March-for-Action-418414951908677/",
        "twitter": "",
        "instagram": "",
        "motpLink": "http://marchonthepolls.org/event/Womens-March-Eugene"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          -123.0951,
          44.0505
        ]
      },
      "type": "Feature"
    },

from marchon-map.

marionnewlevant avatar marionnewlevant commented on June 19, 2024

Almost for sure the problem is that that eventDate is in the past.
Here is showFeature:

    showFeature: function showFeature(feature) {
      const props = feature.properties;

      props.mailto = 'mailto:' + props.contactEmail;
      if (props.eventDate) {
        props.eventMeta = _.find(this.events, function(ev) {
          return ev.location === props.location && !ev.past;
        });
      }
      this.activeGroup = props;
    },

The feature has an eventDate (in the past), but it doesn't exist in this.events (which filters out events in the past), so we get props.eventMeta = undefined, and then we crash (and render the previous popup).

from marchon-map.

marionnewlevant avatar marionnewlevant commented on June 19, 2024

Still failing at assigning github issues to me, but I have a plan to fix this:

  1. consider recently past events as current
  2. filter out distant past events entirely

from marchon-map.

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.