BETHPAGE - Google and the federal government are teaming up in an effort to prevent accidents involving vehicles at railroad crossings.

Google Maps is adding a feature that will alert drivers when they're approaching a railroad crossing while using the popular mapping app.

Federal rail officials hope the extra warning will prevent drivers from colliding with trains or accidentally turning onto the tracks.

The new alerts would cover the nation's quarter-million rail crossings, some of which may only have passive warning signs.

For now, Google Maps will be the only software that will show rail crossing alerts. However, rail officials say they hope that standalone GPS companies and other mapping apps will add the alerts as well.