The Official RunTrackr Blog

Main menu:


Improving search with suggestions

Search is the most important feature. If you can’t find what you’re looking for, it might as well not exist. So today, we’re rolling out a small, but useful feature that allows you to search for routes better: Suggestions.

The Google Maps API we use is very robust and good in finding the location you’ve searched for. However, sometimes it returns multiple matches or suggestions for commonly-used names for locations, like “Whitfield” or “Belleville”. Before, when this happened, you got a somewhat nasty-looking message like this:

This was basically using a JavaScript window.alert and it isn’t very user-friendly. Besides being bad since it interrupts your work flow, the look & feel of the dialog will not be consistent with the UI of your site, since the browser generally determines the appearance of the alert windows. (In particular, Opera presents an alert window that looks very exotic, but all of the browsers have this to some degree) This is why many web applications opt to use their own UI for notification, even when it involves a more complex solution.

To fix that we now display the suggestions directly under the search field if the need arises. Let’s say you search for “Belleville”. Instead of getting that nasty pop-up alert box, you now get something a little more soothing:

Clicking any of the suggestions sets the location to that one. Neat and simple – the way all software should be.

Write a comment