dcfemtech / hackforgood-waba-map

DCFemTech Hack for Good 2016 - WABA Bike Map Project
MIT License
10 stars 9 forks source link

Broken buffer colors - grey instead of light blue #89

Closed alulsh closed 8 years ago

alulsh commented 8 years ago

https://github.com/dcfemtech/hackforgood-waba-map/pull/78 broke the light blue color (#56B6DB) of the buffers. Now the buffers are grey.

screenshot 2016-08-17 00 14 39

If you run the command git checkout 77925f5f0a47840dfb0663b2d78b1dbd65d0d0f0 (this checks out the https://github.com/dcfemtech/hackforgood-waba-map/commit/77925f5f0a47840dfb0663b2d78b1dbd65d0d0f0 commit) then run the serve module to run a simple HTTP server you'll see the buffers used to be light blue (#56B6DB).

screenshot 2016-08-17 00 12 09

The colors are important for https://github.com/dcfemtech/hackforgood-waba-map/issues/4 and our general ability to visualize these data effectively.

Here's the old code from site.js when the buffer color was working correctly. We'll need to re-add portions of this:

//Styles the buffer using bufferStyle variable; setGeoJSON is needed to apply the properties to the featureLayer
function loadBuffer(data) {
    var buffer = data.target;
    setProperties(buffer.getGeoJSON());
    buffer.setGeoJSON(buffer.getGeoJSON())
}

// Each buffer feature object needs to have the properties set individually
function setProperties(buffer) {
    for (var i = 0; i < buffer.features.length; i++) {
        buffer.features[i].properties = bufferStyle;
    }
}

//Add styles to bikelanes
function loadBikeLanes(data) {
    var bikeLanes = data.target;
    bikeLanes.setStyle(bikeLaneStyle);
}
hareno44 commented 8 years ago

It seems that the buffers are now #555555 at varying opacities. I'll have to look through the code and see if that hexadecimal value is lying around in there, that might be overriding #56B6DB.

alulsh commented 8 years ago

Fixed as part of the Mapbox GL JS migration! Now we are deciding on the right color for the buffers in https://github.com/dcfemtech/hackforgood-waba-map/issues/116.