Map Routes

The Map Routes API takes a list of geographic coordinate points that make up the requested route and draws the route on a map image.

Requires a license for access to Trimble MAPS JavaScript.

POST /mapRoutes?dataset={dataset}

Resource URL

https://pcmiler.alk.com/apis/rest/v1.0/service.svc/mapRoutes?dataset={dataset}

Request Element

The MapRoutes operation wraps the MapRouteRequestBody to form a JSON POST body. See details in MapRoutesRequestBody. You will be redirected to the SOAP Service page since REST and SOAP Requests use the same class object.

Element Definition Required
MapRoutesRequestBody A MapRoutesRequestBody System Object. It contains Map System Object and Route System Object Y
RegionalDataSet The regional dataset. Possible value: Current (default), PCM_EU, PCM_OC, PCM_SA, PCM_AF, PCM_AS, PCM_ME, PCM_GT, PCM_WW and PCM_NA. Y

Sample JSON Post Body

Click here to see all available icons on map.

{
  "Map": {
    "Viewport": {
      "Center": null,
      "ScreenCenter": null,
      "ZoomRadius": 0,
      "CornerA": null,
      "CornerB": null,
      "Region": 0
    },
    "Projection": 0,
    "Style": 0,
    "ImageOption": 0,
    "Width": 1366,
    "Height": 768,
    "Drawers": [8, 2, 7, 17, 15],
    "LegendDrawer": [
      {
        "Type": 0,
        "DrawOnMap": true
      }
    ],
    "GeometryDrawer": null,
    "PinDrawer": {
      "Pins": [
        {
          "Point": {
            "Lat": 41.63411,
            "Lon": -87.96074
          },
          "Image": "ltruck_r"
        },
        {
          "Point": {
            "Lat": 25.75312,
            "Lon": -80.29229
          },
          "Image": "lbldg_bl"
        }
      ]
    },
    "PinCategories": null,
    "TrafficDrawer": null,
    "MapLayering": 0,
    "Language": null,
    "ImageSource": null
  },
  "Routes": [
    {
      "RouteId": null,
      "Stops": [
        {
          "Address": {
            "StreetAddress": null,
            "City": "Chicago",
            "State": "IL",
            "Zip": "60629",
            "County": null,
            "Country": null,
            "SPLC": null,
            "CountryPostalFilter": 0,
            "AbbreviationFormat": 0
          },
          "Coords": null,
          "Region": 4,
          "Label": null,
          "PlaceName": null,
          "Costs": null,
          "IsViaPoint": false
        },
        {
          "Address": {
            "StreetAddress": null,
            "City": "Miami",
            "State": "FL",
            "Zip": "",
            "County": null,
            "Country": null,
            "SPLC": null,
            "CountryPostalFilter": 0,
            "AbbreviationFormat": 0
          },
          "Coords": null,
          "Region": 4,
          "Label": null,
          "PlaceName": null,
          "Costs": null,
          "IsViaPoint": false
        }
      ],
      "Options": {
        "AFSetIDs": null,
        "BordersOpen": null,
        "ClassOverrides": 0,
        "DistanceUnits": 0,
        "ElevLimit": null,
        "FerryDiscourage": false,
        "FuelRoute": false,
        "HazMatType": 0,
        "HighwayOnly": true,
        "HubRouting": false,
        "OverrideRestrict": false,
        "RouteOptimization": 0,
        "RoutingType": 0,
        "TollDiscourage": false,
        "TruckCfg": null,
        "UseAvoidsAndFavors": false,
        "VehicleType": 0
      },
      "FuelOptions": null,
      "DrawLeastCost": false,
      "RouteLegOptions": null,
      "StopLabelDrawer": 0
    }
  ]
}

Sample Response

MapRouteResult