Match GPS coordinates to the road network
map_match.match(**kwargs) -> MapMatchResult { features, matchings, type }
POST/api/v1/map-match
Match GPS coordinates to the road network
Match GPS coordinates to the road network
require "plaza"
plaza = Plaza::Client.new(
api_key: "My API Key",
environment: "local" # defaults to "production"
)
map_match_result = plaza.map_match.match(
coordinates: [{lat: 48.8566, lng: 2.3522}, {lat: 48.857, lng: 2.353}, {lat: 48.8575, lng: 2.354}]
)
puts(map_match_result){
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"distance_m": 0,
"edge_id": 0,
"matchings_index": 0,
"name": "name",
"original": [
0,
0
],
"waypoint_index": 0
},
"type": "Feature"
}
],
"matchings": [
{
"foo": "bar"
}
],
"type": "FeatureCollection"
}Returns Examples
{
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"distance_m": 0,
"edge_id": 0,
"matchings_index": 0,
"name": "name",
"original": [
0,
0
],
"waypoint_index": 0
},
"type": "Feature"
}
],
"matchings": [
{
"foo": "bar"
}
],
"type": "FeatureCollection"
}