Request
A request for speed limits must be sent via HTTPS, and takes the following form:
...
Request
A request for speed limits must be sent via HTTPS, and takes the following form:
https://mapsdk.navmii.com/api/speedLimits?path=PATH&units=UNITS&key=API_KEY
Parameters | |
---|---|
PATH | A list of latitude/longitude pairs representing a path. Latitude and longitude values must be separated by commas. Latitude/longitude pairs must be separated by the pipe character: "|". When you supply the path parameter, the API first snaps the path to the most likely road traveled by a vehicle, then determines the speed limit for the relevant road segment. |
UNITS | KPH - kilometers per hour MPH - miles per hour |
API_KEY | Your API key provided by Navmii |
...
Response
Elements | |
---|---|
points | Array of Point objects |
features | Array of Feature objects |
units | KPH or MPH. Represents measurement units for speed limits |
Response objects
Point
Elements | |
---|---|
x | Longitude of the point |
y | Latitude of the point |
sp | Speed limit on the road which is the point snapped to |
Feature
Elements | |
---|---|
index | Index of the feature in the features array of the response |
geometry | Geometry of the feature |
name | Name of the feature |
attrs | Array of Attribute objects |
Attribute
Elements | |
---|---|
frc | Functional road class of the feature. Possible values: 0 - motorway (Highway) 1 - trunk (A-Class/Expressway) 2 - primary road (B-Class road) 3 - secondary road (Major city road) 4 - tertiary road (Common city road) 5 - unclassified road (Small city road) 6 - residential road (Residential or service road) 7 - pedestrian/unpaved road |
sp | Array of SpeedLimit objects |
fow | Form of way of the feature. Possible values: 10 - ramp4 - roundabout 1 - motorway 0 - common road |
isInCity | Indicates if the feature is inside a built-up area 0 - outside 1 - inside |
SpeedLimit
Elements | |
---|---|
posted | Speed limit specified by the road sign |
national | Speed limit defined by the national law |
...
...
Sample response
Code Block | ||
---|---|---|
|
...
| ||
{ "points":[ |
...
{ "x":-0.07635, |
...
"y":51.52623, |
...
"sp":20 |
...
}, { "x":-0.0745, |
...
"y":51.52626, |
...
"sp":20 |
...
} ], "features":[ |
...
{ "index":0, |
...
"geometry":"ivnyHp}Md@oF", |
...
"name":" |
...
Calvert Avenue", "sp":{ |
...
"posted":20, |
...
"national":30 |
...
}, "attrs":{ |
...
"frc":3, |
...
"isInCity":1 |
...
} }, { "index":1, |
...
"geometry":"cunyH`vMEAGEIIIMEKCOCS?U@M", |
...
"name":" |
...
Arnold Circus", "sp":{ |
...
"posted":20, |
...
"national":30 |
...
}, "attrs":{ |
...
"frc":3, |
...
"fow":"roundabout", |
...
"isInCity":1 |
...
} }, { "index":2, |
...
"geometry":"qvnyHlrM?ABQFQFMHIBA", |
...
"name":" |
...
Arnold Circus", "sp":{ |
...
"posted":20, |
...
"national":30 |
...
}, "attrs":{ |
...
"frc":3, |
...
"fow":"roundabout", |
...
"isInCity":1 |
...
} } ], "units":"MPH" |
...
} |