marker
The address and map coordinates of a physical location are represented by a marker object.
Name | Type | Description |
---|---|---|
country | string | Optional. The two-letter country code; for example, US . This field is used only by the UI. |
custom | custom | User-supplied custom fields that are returned unmodified in the response. These have no effect on optimization. |
formatted_address | string | Optional. The formatted address of the geocode. This should not include the country; for example, 4436 Delaware St, Denver, Colorado, 80216 . This field is used only by the UI. |
id | id | A unique marker ID. |
intersection | latlon | Optional. The map coordinates of where the address intersects with the street. |
location_type | path_request_location_type | Optional Defines the type of location to support more accurate routing. |
is_depot | boolean | Optional. If set to true , the optimizer considers the marker location to be a depot that the driver can return to mid-route. |
attributes | string[] | Optional. The attributes provided by this depot (when is_depot is true ). Use this with job.required_pre_job_depot_attributes and job.required_post_job_depot_attributes. See Routing with Attributes. |
location | latlon | The map coordinates of the marker. |
name | string | Optional. The name of the marker. |
Location and Intersection
The Geocode call returns both an intersection
and a location
.
The intersection
is the point where the driveway meets the road.
If location
is used without intersection
, the location
can snap to a driveway on a different road when routing to the marker
.
Short Form
For simplicity, a string can be specified instead of a marker object when making requests.
This is a shorthand method for setting the location field directly. In the following example, job0
and job1
are at the same location:
{
"jobs": [
{
"id": "job0",
"location": "33.584409,-117.730949",
},
{
"id": "job1",
"location": {
"location": "33.584409,-117.730949"
}
}
]
},
Example
Example marker
object:
{
"location": "33.584362,-117.730968",
"intersection": "33.584409,-117.730949",
"formatted_address": "20 Enterprise, Aliso Viejo, California, 92656",
"country": "US"
}
See Also
- job.location, route.location.
- The Geocode endpoint.
- The Reverse Geocode endpoint.