(CNN) -- Peter Smith was riding his bike down a particularly busy road in Austin, Texas, when, amid a frightening blur of big-truck traffic, a thought hit him:
Why wasn't there a way to find safe bike routes online?
"It was kind of terrible, because there's a lot of big trucks down there in Austin, and I was getting passed by these big Ford F-150s or whatever," he recalled. "And I was like, 'this is crazy!' "
So, like any good rabble-rouser, Smith, now 36, started a petition prodding Google to add biking directions to Google Maps.
More than 50,000 signatures later, Smith got his wish Wednesday as the Mountain View, California, company debuted biking directions alongside existing mapping features for drivers, pedestrians and people who use public transit.
Smith, who started the petition in February 2008, got an e-mail from Google on Tuesday about the addition of biking directions.
"I wanted to give you a heads up because your blog and petition was such an inspiration to the team that developed [the bike-route feature]," a Google employee wrote in the message, which Smith showed to CNN.
In the same way drivers search for the quickest car routes to their destinations, bikers now can find cycling directions that are relatively speedy and aim to be safer and less challenging for riders.
In a blog post, Google says it developed an algorithm to help its computers draw bike-appropriate routes between two locations. The computers select paths along existing bike trails, streets with bike lanes, streets with slow speeds and those with light traffic. The biking directions also try to avoid steep hills and busy intersections.
"Let's say you want to bike to work, or maybe you want to drive less and spend more time outdoors," Shannon Guymon, a Google product manager, wrote on the Official Google Blog. "Biking directions can help you find a convenient and efficient route that makes use of dedicated bike trails or lanes and avoids hills whenever possible."
The directions also tell riders how long it might take them to make a trip. That estimate "is based on a complex set of variables accounting for the type of road, terrain and turns over the course of [a] ride," Guymon writes.
Google says it has added data about bike lanes for 150 U.S. cities, and, with the help of an advocacy group called the Rails-to-Trails Conservancy, the company beefed up its maps with 12,000 miles of bike trails, which are both rural and urban.
Jennifer Kaleba, a spokeswoman for Rails-to-Trails, which turns abandoned rail lines into bike paths, said the new biking feature for Google Maps may put more bike commuters on the road.
"If it increases the number of people who commute by bike, that's great, but even better ... if this increases the number of people who are getting on a bike for the first time or maybe for the first time since they were a kid," she said.
Google isn't the first to try to put custom biking directions and routes online. Other sites, like Ride the City in New York, have made similar attempts, usually on a local level.
In his petition, Smith notes that better biking directions would make bicycling safer and would "empower world citizens to better adapt their lifestyles to face the challenges of global climate change."
Google also added a layer to Google Maps that lets cyclists explore bike trails and bike-friendly streets. That feature could be used by bikers who want to ride for recreation instead of transportation.
To turn that layer on, go to Google Maps, put your mouse on top of the white box that says "More" and then select the "Bicycling" layer.
Smith said Google's biking directions are fairly accurate. He noted that Google picked three of the four best cycling routes he uses when he rides 4½ miles to work.
He now lives in notoriously hilly San Francisco, California, and he said he is fond of the fact that the cycling directions try to avoid large hills.
But improved safety will be the biggest benefit of the new mapping feature, he said.
"If you've ever been honked at from the outside of a car, you can imagine how loud it is, and it can be very scary," he said.