Reputation: 1078
I am working on a GPS app that reads in a vehicle's speed at a given location. Based on that current speed I would like to determine whether or not the vehicle is driving over the speed limit. Are there any API's available (for free or otherwise) that provide speed limits for a given coordinate on a google road map?
Upvotes: 1
Views: 1909
Reputation: 46365
A quick google search turned up the following page
https://groups.google.com/forum/#!topic/wikispeedia/Th0aI4Hby-c
which says it can be done with a query like this:
I hope this helps.
EDIT the people responsible for this data have a wiki at
http://en.wikipedia.org/wiki/Wikispeedia
There I found another link of the form
which did indeed return something that looked like speed data in the vicinity:
<markers>
<marker label="" lat="35.19800509" lng="-89.56761047" mph="45" kph="0" cog="180" alt_meters="0.00"/>
<marker label="prasad" lat="35.19800509" lng="-89.56761047" mph="45" kph="0" cog="45" alt_meters="0.00"/>
<marker label="prasad" lat="35.19800509" lng="-89.56761047" mph="45" kph="0" cog="45" alt_meters="0.00"/>
<marker label="prasad" lat="35.19800509" lng="-89.56761047" mph="0" kph="0" cog="45" alt_meters="0.00"/>
<marker label="durga prasad" lat="35.19800509" lng="-89.56761047" mph="90" kph="0" cog="45" alt_meters="0.00"/>
<marker label="" lat="35.19786153" lng="-89.56760511" mph="45" kph="0" cog="180" alt_meters="0.00"/>
<marker label="" lat="35.19636122" lng="-89.56752062" mph="60" kph="0" cog="180" alt_meters="0.00"/>
</markers>
It will take some parsing... but I hope this gets you started.
The best solution is the complete code given at
https://code.google.com/p/speedlimit/
for an app that computes the speed limit where you are... they make the source code available, so that should be pretty easy.
Upvotes: 1