A city police union is threatening legal action unless Google shuts down an app feature that lets users track the locations of police officers.

Google's Waze app works like a GPS. In addition of warning about police locations, it can also alert other users about parked police vehicles, traffic cameras and accidents.

But the president of the Sergeant's Benevolent Association believes the app puts the safety of officers at risk.

In a letter to Google, Ed Mullins wrote, "The simple convenience to WAZE users in avoiding traffic tickets pales in comparison to the risk of assassination or major crime, no matter how tenuous that risk might seem in any given situation."

Mullins tells the Daily News that the man who shot and killed Detectives Rafael Ramos and Wenjian Liu in December had the app on his phone.

We've reached out to Google for a response to the letter.