Hacker News new | ask | show | jobs
by borgatov 3928 days ago
First of all thanks for the feedback, I always love when critics are useful. I try to go point by point. We took a conscious decision disabling the scrolling wheel as zoom in/out because otherwise it would have triggered too many "refine searches". In addition today the search is even slower due to the huge traffic we're getting and it's definitely something we should work on. But I agree, the map is definitely something we should work on.

Regarding the landing page I think it's still a speed problem, but I'll take a closer look to this.

Thanks again.

2 comments

> We took a conscious decision disabling the scrolling wheel as zoom in/out because otherwise it would have triggered too many "refine searches".

Tip: Any operation that's reliant on mouse events should be throttled or debounced -- they are just too noisy. For mapping, I have done debounces as long as two seconds without the delay being obvious. I suspect due to the style of user interaction in combination with the loading animations from the map itself.

really appreciated - it's somewhat debounced already, but it seems to be not quite right... I'd be curious to hear about how you went about debouncing (what time delays on which specific actions, zoom, moving the map)
Option one: Use the built-in `idle` event on the top-level map object. This basically does all the debouncing for you, though I don't remember off the top of my head whether this event happens before or after the `tilesloaded` event. The distinction would only be important if you want to wait for the map to visually update before displaying the results.

Option two: I think for your use case just listening on the single `bounds_changed` event will do what you want. That should trigger for all types of map movement or zooming. For the callback, use a closure which clears and sets a timeout event with the desired debounce time; no need to overcomplicate it. Then it's just tuning the delay until it hits that sweet spot between firing too often and obvious visual delays.

Perhaps disable refining searches and instead have a button refines. This could allow users to scroll idiomatically and save on unnecessary traffic.
We're already exploring some options, and this is definitely one of them.
Great to hear, best of luck!