CodeforAustralia / school-finder

:eyes: Find schools by location
https://education.nsw.gov.au/school-finder
GNU General Public License v3.0
17 stars 7 forks source link

weird map jiggle #298

Closed techieshark closed 7 years ago

techieshark commented 7 years ago

Search by school name for 'Helensburgh Public School', show nearby secondary schools, then click on map and drag up so you can pan the view and see the south. The map should show the south but it jerks back up north, perhaps to keep the secondary markers in view.

Rustuma commented 7 years ago

It's because of the high zoom in that particular scenario. Not sure how to fix that

Rustuma commented 7 years ago

@Lilith-Palmer - has some feedback

Lilith-Palmer commented 7 years ago

@techieshark Similar behavior is also occurring when an icon is close to the frame or filter box. Seems too jumpy - mapbox seemed to use a smaller buffer

techieshark commented 7 years ago

Yeah @Lilith-Palmer good catch. I think that's a different issue (in terms of the code needed to fix it) but it's a valid point (worth opening a new ticket for it).

One difference you might notice (which made mapbox seem less jumpy) is that if a marker is near the schools filter map control and you mouse over it, the marker's popup label appears in a separate layer beneath the filter box. So rather than automatically pan the map so the label can fit, it will be partly obscured by the filter box.

image

I think not moving the marker is a little more usable, since (a) there is enough unobscured text on the label that can a user can still figure out if that's what they want and can click on it, and (b) the part under the schools filter is just readable anyway due to the slight transparency. Here's another example:

image

The other factor that makes the google map seem more jerky is that when the map does move, it pans faster than the mapbox map defaulted to.

Lilith-Palmer commented 7 years ago

@techieshark Yes I did notice the different panning style. Google is very quick, hence it appears to be jumping around. I think it is the kind of behavior users may quickly learn/adapt too, but would be good to minimize. I'll get a new issue up.