Closed Bug 1022620 Opened 5 years ago Closed 5 years ago

Change map zoom setting based on available information (/user/edit page)


(Participation Infrastructure :: Phonebook, defect)

Not set


(Not tracked)



(Reporter: giorgos, Assigned: wbowling)


(Blocks 1 open bug)


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 [0] but it will be soon merged into master.

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.
Flags: needinfo?(wbowling)
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.)
Flags: needinfo?(wbowling)
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
Commit pushed to master at
[fix bug 1022620] more profile edit map improvements
- more responsive enter key
- "locate me" button
- lots of cleanup
Closed: 5 years ago
Resolution: --- → FIXED
Version: other → next
Version: next → 2014-06.1
Bumping to verified as [qa-]
OS: Linux → All
Hardware: x86_64 → All
You need to log in before you can comment on or make changes to this bug.