Google Eases Searching Within Routes in Google Maps Apps

Google has added RouteBoxer to the Open Source Utility Libraries for the JavaScript Maps API v2 and v3. This makes it easier for apps utilizing the Maps API to search along a route.

“A common operation in Maps API applications is to search a spatial database for locations within a certain distance of a point,” says Thor Mitchell, Maps API Product Manager. “It can also be useful to offer search along a route, for example to find hotels, restaurants, or service stations on a long journey.”

“However if your spatial database does not support corridor queries this can be difficult to implement efficiently,” adds Thor. “For example searching around every vertex of a route will generate a large number of queries which overlap, while also leaving gaps in coverage between widely spaced vertices.”

Documentation for implementation can be found here. There are essentially ten steps, which are illustrated neatly on that page.

By Chris Crum

Chris Crum is a staff writer and content coordinator for iEntry.

Leave a comment