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.
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:
We should only change cities when the zoom is close enough.
We probably need some tie breaking mechanism.