ghing / learning-collaborative-maps

Web map to help coordinate healthy relationships education in the Chicago area.
0 stars 0 forks source link

North Grand Highschool is Black and I don't know why #18

Closed Mattwalsh129 closed 8 years ago

ghing commented 8 years ago

Black is an arbitary color for when there are more than one agency doing a color at a school. Give me an alternative color and it's an easy swap.

Mattwalsh129 commented 8 years ago

So it actually is when you double click on the 'add program form' This happened the same with jamieson.

ghing commented 8 years ago

I took a look at the API response (http://learning-collaborative-maps.herokuapp.com/api/1/schools?format=geojson) and it looks like there are duplicate records for the same program. The logic is smart enough not to show separate entries for duplicate programs, but not smart enough to show the agency color when there are multiple programs from the same agency.

We should figure out why duplicate programs were created, but the logic should still be smarter since one agency could have multiple different programs at a school and the marker color should reflect their agency.

{
    type: "Feature",
    geometry: {
        type: "Point",
        coordinates: [
        "-87.735049",
        "41.911742"
        ]
    },
    properties: {
        _id: "56f43ed5803b70110081034f",
        FacilityName: "North-Grand High School",
        Address: "4338 W Wabansia Ave",
        City: "Chicago",
        Zip: "60639 4837",
        GradeServed: "9-12",
        rcdts: "150162990250825",
        programs: [
            {
                agency: "/api/1/agencies/between-friends",
                age_group: "10th Graders",
                program_type: "Dating/Partner Violence"
            },
            {
                agency: "/api/1/agencies/between-friends",
                age_group: "10th Graders",
                program_type: "Dating/Partner Violence"
            }
        ]
    }
}