CoastalResilienceNetwork / GeositeFramework

Mapping Framework powering TNC Coastal Resilience programs
http://maps.coastalresilience.org/network/
GNU General Public License v3.0
13 stars 10 forks source link

Set minZoom on map #1151

Closed fungjj92 closed 5 years ago

fungjj92 commented 5 years ago

Overview

TNC reported a bug (see #1142 for gif) whereby switching from a regional to a global view in the map made the map very tiny, offset, and cut off. Very odd.

From the best of my investigation, it seems like a mixture of problems some our code, some behind the scenes ESRI map CSS. A quick fix that seemed to work was setting a minimum zoom on the map such that we can't zoom out enough to encounter the issue. This seems like an overall positive move because there's no use to see the map so zoomed out and we avoid black space views like:

screen shot 2018-10-29 at 11 58 17 am

Connects #1142

Demo

bug1142

Notes

Even though this is a Task 4 contract bug fix, I based and pointed this branch at the static site feature branch for easier testing. If we would rather cherry-pick the commit onto master, I can do that.

Testing Instructions

There's a lot of ways you could test this. Here's two easier ones:

From the GeositeFramework repo:

Static site build from the geosite-framework-build repo, static-site branch:

You shouldn't see the issue anymore, and the minzoom should be enforced with no detriment to the map.

fungjj92 commented 5 years ago

Cherry-picked the commit onto develop in #1152. Prefer that PR over this one.