You're driving along the highway, maybe exceeding the speed limit, when your iPhone calls out to you: "Police often hide here."

Glancing at the phone, you see a road map that pinpoints your exact location and, very close to it, an icon of a police car. It's time to ease the pedal from the metal.

This is why you've downloaded "Trapster," one of several "apps" — programs available for the Apple iPhone — that can help users get a leg up on the law.

If you're a blackjack player, there's an iPhone app you can use to count cards — a neat little trick that will help you beat the odds in a casino.

One added feature is that it can also can help you obtain a room in a Nevada prison and stay free for six years. (It isn't illegal to count cards, but it's illegal in Nevada to use a device to count cards.)

If you're a marijuana smoker, yet another app will show you where you can find it and buy it — with a doctor's prescription, of course.

• Click here for FOXNews.com's Personal Technology Center.

• Got tech questions? Ask our experts at FoxNews.com's Tech Q&A.

The most popular of these apps is "Trapster," with 1.5 million users. The free program uses the GPS receiver built into new iPhones to track a driver's location and warn of nearby speed traps and red light cameras. It's also available for phones running Google Android and some BlackBerries.

Drivers can add new locations to the app by hitting buttons to mark speed traps and red light cameras for other drivers. Users can also rate the accuracy of speed trap reports, which helps weed out fake inputs.

The app potentially can help users speed or run lights more often. Nonetheless, police are largely supportive of Trapster, because they hope it will get users to slow down.

"Anything that gets people to slow down on the highway, or drive in a more responsible manner, is a good thing," said Corinne Geller, public relations manager for the Virginia State Police.

She said the state itself uses that logic to announce some red light cameras and speed-limit enforcement areas.

"We don't hide," Geller said.

Radar detectors are illegal in many states, but the iPhone app is perfectly legal because it doesn't actually detect a radar signal. It simply relies on user input to pinpoint spots where police often hide to catch speeders.

In Washington, D.C., Police Chief Cathy Lanier was quoted earlier this month in the Washington Examiner saying that using Trapster was a "cowardly tactic" to avoid police.

But a D.C. police spokeswoman says the chief was misquoted, and the department has no opinion on the application.

She also noted that a list of the District's red-light cameras is publicly available on its Web site: http://mpdc.dc.gov/mpdc/cwp/view,a,1240,q,548257,mpdcNav_GID,1552,mpdcNav,|31885|.asp

Trapster's creator, Pete Tenereillo, says that he hopes the application will get drivers to slow down.

"It's a possibility that someone would use it to try to speed up between speed traps," he said. "But honestly, this is user-generated content, and I don't know how many people would be that confident that the only speed traps are the ones that are marked in Trapster. I would love it if they were."

If you can avoid running through red lights and getting stopped for speeding, you can drive to your local casino and fire up another iPhone app — "A Black Jack Card Counter," a $4.99 program that has gaming institutions on edge.

The app allows users to record the cards played and includes a "stealth mode" that turns the screen off while allowing users to continue hitting the buttons to record cards.

It has the potential to make users a lot of money.

"If you stick to the basic strategy for blackjack, the house has a small advantage," the program's creator, Travis Yates, writes in the program's description. "But if you can keep count of the number of high and low ranked cards in the pack, you can gain a small advantage.... This small advantage, around 1%, over a long period of time can result in huge wins."

But there is a downside.

"I would not recommend using this app in a casino as you could get into a lot of trouble," Yates writes.

In Nevada, for instance, using an electronic device to keep track of cards played in a casino is a category B felony with a maximum penalty of six years in prison and a $10,000 fine, as outlined here: http://leg.state.nv.us/nrs/NRS-465.html#NRS465Sec088

The Nevada Gaming Control Board sent a letter earlier this year warning casinos in the state of the app's existence.

Jerry Markling, chief of the Nevada Gaming Control Board's enforcement division, told FOXNews.com that nobody has been prosecuted for using the app.

He added that the program's stealth mode "certainly makes one wonder what the real intent is," but he said that he would not fault Apple for allowing the program, given that it could have uses outside of a casino.

Other iPhone applications called "Cannabis" and "iPot” help users find medical marijuana dispensaries.

The Cannabis program also lists local advocacy groups and lawyers — a feature that could come in handy since all marijuana, even in states that allow its use for medical purposes, is illegal under federal law.

But it's easy to violate, as U.S. Attorney General Eric Holder says he has no plans to prosecute marijuana dispensaries operating legally under state laws.

Users certainly have no trepidation about posting their comments on Apple's forums.

"Works as promised," an iPhone owner in the San Francisco area wrote about iPot. "Learned about a new dispensary in Bernal Heights."

An Apple spokeswoman declined to comment on all of these applications.