Speed limits API

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
PATHA 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_KEYYour API key provided by Navmii



Response

Elements
pointsArray of Point objects
features

Array of Feature objects

unitsKPH or MPH. Represents measurement units for speed limits

Response objects

Point

Elements
xLongitude of the point
y

Latitude of the point

spSpeed limit on the road which is the point snapped to

Feature

Elements
indexIndex of the feature in the features array of the response
geometry

Geometry of the feature as encoded polyline string (https://developers.google.com/maps/documentation/utilities/polylinealgorithm)

nameName of the feature
attrsArray 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 - ramp
4 - 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 request

https://mapsdk.navmii.com/api/speedLimits?path=51.52623,-0.07635|51.52626,-0.0745&units=MPH&key=YOUR_API_KEY



Sample response

{  
   "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"
}