POSTbody_builder_directions_geojson | R Documentation |
Constructs the GeoJSON part of the request body for the Azure Maps Route Directions API. This includes the origin, destination, and any waypoints.
POSTbody_builder_directions_geojson(origin, destination, waypoints = NULL)
origin |
A numeric vector of coordinates (longitude, latitude) or an |
destination |
A numeric vector of coordinates (longitude, latitude) or an
|
waypoints |
Optional. A numeric vector, a matrix of coordinates, or an
|
A list formatted as a GeoJSON FeatureCollection, ready to be included in the API request body.
## Not run:
origin <- c(-122.201399, 47.608678)
destination <- c(-122.201669, 47.615076)
waypoints <- c(-122.20687, 47.612002)
geojson_part <- POSTbody_builder_directions_geojson(origin, destination, waypoints)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.