Map harder, map faster.
For our fourth Hackathon, once again, we mapped hard and we mapped fast. And, once again, one of the projects has already made its way to production: we now have about 2,200 rest areas on our map. (As a parent who road trips with three young children, this is a Pretty Big Deal.) We also focused on polishing up a couple things we worked on last week, and hope to get them out to production this week.
Polishing POI Spread
During last week’s Hackathon, we were able to greatly improve the spread of POIs along a given route. This week, we made the following tweaks to improve it even further:
- We increased the number of segments we break the route into from five to ten, giving us the ability to surface more POIs along the route. It’s a simple, but very effective change.
- We’re now using our internal POI ranking system in order to ensure we surface the best possible POIs we can.
We’re pretty happy with the way this turned out and can’t wait to release it into the wild.
Polishing I.P. Geolocation
We had to address some performance issues to get the large dataset into a workable format and that came down to taking better advantage of the location indices available in PostGIS. The import takes about an hour to add more than 1.6 million I.P. locations. There was an issue of duplicates; we wanted to network prefixes to individual cities, but our dataset included multiple IP addresses in the same network prefix. We might be able to dig into this further and make better use of the dupes, but for now we toss them to the curb.
For production use, we’ll use this data to more quickly locate the user. Users who engage our geolocation map control will be “zoomed” to the predicted location while the browser navigator requests permission and tries to get a better location. We also added the ability to our map state URLs that will allow us to share map states that zoom to the user’s location. It will also use the geo I.P. data on the server to load a centered map before trying to use the browser navigator to increase the accuracy.
We’re also hoping to ship these changes this week.
Behind the Scenes
We also dug into a couple of Big Things we’ve been wanting to dig into for a while: upgrading to Rails 4 and moving to server-side React rendering for place cards in our discovery layers. Both of these undertakings deserve—demand?—their own blog posts,—keep an eye on this space!