ParkingReformNetwork / parking-lot-map

Interactive map showing how much of downtowns are dominated by parking
https://parkingreform.org/parking-lot-map/
MIT License
1 stars 5 forks source link

Dragging map to city should pull up its scorecard #112

Closed Eric-Arellano closed 11 months ago

Eric-Arellano commented 1 year ago

Right now, you can only pull up a city scorecard by using the city toggle or the URL. That's not as interactive.

To fix this, we would record a bounding box for each city. Then have code like this:

var cityBounds = [
    [southWestLat, southWestLng], 
    [northEastLat, northEastLng]
];
var mapViewBounds = map.getBounds();
if (mapViewBounds.intersects(cityBounds)) {
    // Load city data
}

We should only change cities when the zoom is close enough.

We probably need some tie breaking mechanism.

tunglinn commented 1 year ago

Will start with clicking to change cities (setMaptoCity).

There's something odd with the FeatureLayer of Birmingham, AL.