Closed Bug 1022620 Opened 5 years ago Closed 5 years ago
Change map zoom setting based on available information (/user/edit page)
Steps to reproduce: 1. Go to /user/edit 2. Search for "Greece" 3. Select Greece 4. Region and City must be empty and set to "Not save". Map has a Country Level Zoom 5. Save profile 6. Go to /user/edit 7. Map has a Region level Zoom Expected behavior: * Zoom level should be relevant to the available information: 1. If only Country is set, then Map Zoom should be Country level 2. If region is set, then zoom should be region 3. If city is set, then zoom should be city (or region?) This bug is for code which is still in pull request  but it will be soon merged into master.  https://github.com/mozilla/mozillians/pull/968
Wray knows more about the zooming stuff than I do, so I'll point him at this bug. I do know there aren't really things like "country level zoom", "region level zoom", etc. You need bounding boxes to zoom to, but mapbox doesn't always return good data here, so there's a lot of guessing involved in our current zoom code by necessity.
I made a small improvement today. Since the latitude and longitude for results usually comes back with more accurate placement than the bounds, I can center the map on that. In cases where the bounds are so wide that the zoom is pushed way way out, Andrei is right. There's nothing I can do. It's the fault of Mapbox's returned bounding boxes. (Fiji (Eastern Fiji more specifically) is the absolute worst as it is both tiny and crosses the prime meridian.)
OK let's go with what we can go best. Wray please go ahead and pull request your improvement, I'm assigning this bug to you. This is not blocking the upcoming geoloc release.
Assignee: nobody → wbowling
Status: NEW → ASSIGNED
Commit pushed to master at https://github.com/mozilla/mozillians https://github.com/mozilla/mozillians/commit/a4367e6c2b4c53c0110b6bd17c4dc1cce7721474 [fix bug 1022620] more profile edit map improvements - more responsive enter key - "locate me" button - lots of cleanup
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Bumping to verified as [qa-]
Status: RESOLVED → VERIFIED
OS: Linux → All
Hardware: x86_64 → All
You need to log in before you can comment on or make changes to this bug.