HERE 地图中未检测到道路 Javascript API

Road not detected in HERE Maps Javascript API

最近我一直在尝试通过西班牙的一条特定道路制作一些路线(屏幕截图和 link 到下面的路线),虽然我已经能够通过网络引导它通过它应用程序,我不可能使用 Javascript API 做同样的事情。 当我尝试在所需道路上放置路标时,收到此错误消息

NoRouteFound:

{
    "_type":"ns2:RoutingServiceErrorType",
    "type":"ApplicationError",
    "subtype":"NoRouteFound",
    "details":"Error is NGEO_ERROR_GRAPH_DISCONNECTED_CHECK_OPTIONS","additionalData":[{"key":"error_code","value":"NGEO_ERROR_GRAPH_DISCONNECTED_CHECK_OPTIONS"}],
    "metaInfo":
    {
        "timestamp":"2021-02-04T14:43:16Z",
        "mapVersion":"8.30.117.150",
        "moduleVersion":"7.2.202105-1486",
        "interfaceVersion":"2.6.76",
        "availableMapVersion":["8.30.117.150"]
    }
}

我也尝试过取消路线限制,但没有成功。只是希望有人遇到过同样的问题

路线通过此处网络应用程序here

在你的custom request中你设置了fastest;truck;tollroad:-3的交通方式,这意味着你正在寻找一条可以被卡车使用的路线].

同时,您链接的 HERE WeGo 示例正在为 cars 计算路线。 如果我们从 mode=fastest;truck;tollroad:-3 切换到 mode=fastest;car;tollroad:-3,并保持所有其他参数不变,我们可以找到一条通过那些 waypoints:

的路线

回应

{
  "response": {
    "metaInfo": {
      "timestamp": "2021-02-08T15:08:38Z",
      "mapVersion": "8.30.117.151",
      "moduleVersion": "7.2.202105-8389",
      "interfaceVersion": "2.6.76",
      "availableMapVersion": [
        "8.30.117.151"
      ]
    },
    "route": [
      {
        "routeId": "ABUBCAAAAB4AAAB1AAAAlwAAANUBAAB42mO4ysjAxMYABDmulnW5ShfjGKCgT_6tKCODkzXD__8QgQ_7GZAAF4g45XH-JRMDS05mncyqbrjOWfNfiNYxOFng06ka_ESOkaF55dk6ndAyuM7N8c9FhTmcbPDpXFCY-JaRYXXvtboM60y4zq3zn4nmsuLXKbYwxwpo59ZrdROFUhE645-JvmDBr7O62z2VkeE80M6gA8kInfLPRDcw4tcp7Tx_OyOIwcgAphjYGHABw3UrapWYGBgMQBx-A0YFBgeGBwwMPAwMcxgUQDo5FLQYWRyC2gxUgLwvDDwODPxgjQkMzo4tfy4vvMEYkMCgwMVYI3aQEQBgWFlRrc9XUA",
        "waypoint": [
          {
            "linkId": "-1238197473",
            "mappedPosition": {
              "latitude": 43.3362329,
              "longitude": -2.4982456
            },
            "originalPosition": {
              "latitude": 43.33631,
              "longitude": -2.4979
            },
            "type": "stopOver",
            "spot": 0.3538462,
            "sideOfStreet": "left",
            "mappedRoadName": "Barrio Urrutia",
            "label": "Barrio Urrutia - BI-2405",
            "shapeIndex": 0,
            "source": "user"
          },
          {
            "linkId": "+724111030",
            "mappedPosition": {
              "latitude": 42.9544249,
              "longitude": -2.2336662
            },
            "originalPosition": {
              "latitude": 42.9547,
              "longitude": -2.2334
            },
            "type": "stopOver",
            "spot": 0.0839161,
            "sideOfStreet": "right",
            "mappedRoadName": "",
            "label": "N-I",
            "shapeIndex": 2413,
            "source": "user"
          },
          {
            "linkId": "-785506068",
            "mappedPosition": {
              "latitude": 42.8375127,
              "longitude": -1.6827625
            },
            "originalPosition": {
              "latitude": 42.8375209,
              "longitude": -1.682764
            },
            "type": "stopOver",
            "spot": 0.325,
            "sideOfStreet": "right",
            "mappedRoadName": "Calle E",
            "label": "Calle E",
            "shapeIndex": 3564,
            "source": "user"
          },
          {
            "linkId": "+784694977",
            "mappedPosition": {
              "latitude": 42.7655521,
              "longitude": -1.6340184
            },
            "originalPosition": {
              "latitude": 42.7655569,
              "longitude": -1.633923
            },
            "type": "stopOver",
            "spot": 0.6483516,
            "sideOfStreet": "right",
            "mappedRoadName": "Calle A",
            "label": "Calle A",
            "shapeIndex": 3912,
            "source": "user"
          },
          {
            "linkId": "+1167198260",
            "mappedPosition": {
              "latitude": 42.7426922,
              "longitude": -1.6330802
            },
            "originalPosition": {
              "latitude": 42.742708,
              "longitude": -1.6330681
            },
            "type": "stopOver",
            "spot": 0.3364486,
            "sideOfStreet": "neither",
            "mappedRoadName": "Carretera Salinas",
            "label": "Carretera Salinas",
            "shapeIndex": 4006,
            "source": "user"
          },
          {
            "linkId": "+1171177552",
            "mappedPosition": {
              "latitude": 42.7354551,
              "longitude": -1.633918
            },
            "originalPosition": {
              "latitude": 42.73545,
              "longitude": -1.63392
            },
            "type": "stopOver",
            "spot": 0.2121212,
            "sideOfStreet": "neither",
            "mappedRoadName": "Polígono Industrial Morea Norte",
            "label": "Polígono Industrial Morea Norte",
            "shapeIndex": 4025,
            "source": "user"
          }
        ],
        "mode": {
          "type": "fastest",
          "transportModes": [
            "car"
          ],
          "trafficMode": "disabled",
          "feature": [
            {
              "value": "tollroad",
              "weight": [
                "Byte",
                -3
              ]
            }
          ]
        },
        "boundingBox": {
          "topLeft": {
            "latitude": 43.3362329,
            "longitude": -2.5007308
          },
          "bottomRight": {
            "latitude": 42.7354002,
            "longitude": -1.6270387
          }
        },
        "leg": [
          {
            "start": {
              "linkId": "-1238197473",
              "mappedPosition": {
                "latitude": 43.3362329,
                "longitude": -2.4982456
              },
              "originalPosition": {
                "latitude": 43.33631,
                "longitude": -2.4979
              },
              "type": "stopOver",
              "spot": 0.3538462,
              "sideOfStreet": "left",
              "mappedRoadName": "Barrio Urrutia",
              "label": "Barrio Urrutia - BI-2405",
              "shapeIndex": 0,
              "source": "user"
            },
            "end": {
              "linkId": "+724111030",
              "mappedPosition": {
                "latitude": 42.9544249,
                "longitude": -2.2336662
              },
              "originalPosition": {
                "latitude": 42.9547,
                "longitude": -2.2334
              },
              "type": "stopOver",
              "spot": 0.0839161,
              "sideOfStreet": "right",
              "mappedRoadName": "",
              "label": "N-I",
              "shapeIndex": 2413,
              "source": "user"
            },
            "length": 79900,
            "travelTime": 5026,
            "maneuver": [
              {
                "position": {
                  "latitude": 43.3362329,
                  "longitude": -2.4982456
                },
                "instruction": "Diríjase al <span class=\"heading\">sur</span> por <span class=\"street\">Barrio Urrutia</span> <span class=\"number\">(BI-2405)</span>. <span class=\"distance-description\">Siga durante <span class=\"length\">170 m</span>.</span>",
                "travelTime": 10,
                "length": 170,
                "firstPoint": 0,
                "lastPoint": 8,
                "note": [],
                "nextManeuver": "M2",
                "toLink": "-1238197473",
                "boundingBox": {
                  "topLeft": {
                    "latitude": 43.3362329,
                    "longitude": -2.4984133
                  },
                  "bottomRight": {
                    "latitude": 43.3347344,
                    "longitude": -2.4981666
                  }
                },
                "shapeQuality": "exact",
                "direction": "forward",
                "action": "depart",
                "roadName": "",
                "nextRoadName": "Barrio Urrutia",
                "roadNumber": "",
                "nextRoadNumber": "BI-2405",
                "trafficTime": 10,
                "baseTime": 10,
                "roadShield": {
                  "region": "ESP",
                  "category": "3",
                  "label": "BI-2405"
                },
                "startAngle": 163,
                "id": "M1",
                "_type": "PrivateTransportManeuverType"
              },
              {
                "position": {
                  "latitude": 43.3347344,
                  "longitude": -2.4983704
                },
                "instruction": "Continúe por <span class=\"number\">BI-2405</span>. <span class=\"distance-description\">Siga durante <span class=\"length\">1.3 km</span>.</span>",
                "travelTime": 76,
                "length": 1298,
                "firstPoint": 8,
                "lastPoint": 42,
                "note": [],
                "nextManeuver": "M3",
                "toLink": "-1004767700",
                "boundingBox": {
                  "topLeft": {
                    "latitude": 43.3347344,
                    "longitude": -2.4983704
                  },
                  "bottomRight": {
                    "latitude": 43.3243382,
                    "longitude": -2.4930918
                  }
                },
                "shapeQuality": "exact",
                "direction": "forward",
                "action": "continue",
                "roadName": "Barrio Urrutia",
                "nextRoadName": "",
                "roadNumber": "BI-2405",
                "nextRoadNumber": "BI-2405",
                "trafficTime": 76,
                "baseTime": 76,
                "roadShield": {
                  "region": "ESP",
                  "category": "3",
                  "label": "BI-2405"
                },
                "startAngle": 171,
                "id": "M2",
                "_type": "PrivateTransportManeuverType"
              },
              {
                "position": {
                  "latitude": 43.3243382,
                  "longitude": -2.4930918
                },
                "instruction": "Continúe por <span class=\"next-street\">Atxurra</span> <span class=\"number\">(BI-2405)</span>. <span class=\"distance-description\">Siga durante <span class=\"length\">64 m</span>.</span>",
                "travelTime": 3,
                "length": 64,
                "firstPoint": 42,
                "lastPoint": 43,
                "note": [],
                "nextManeuver": "M4",
                "toLink": "-799933634",
                "boundingBox": {
                  "topLeft": {
                    "latitude": 43.3243382,
                    "longitude": -2.4930918
                  },
                  "bottomRight": {
                    "latitude": 43.3238447,
                    "longitude": -2.4926949
                  }
                },
                "shapeQuality": "exact",
                "direction": "forward",
                "action": "continue",
                "roadName": "",
                "nextRoadName": "Atxurra",
                "roadNumber": "BI-2405",
                "nextRoadNumber": "BI-2405",
                "trafficTime": 3,
                "baseTime": 3,
                "roadShield": {
                  "region": "ESP",
                  "category": "3",
                  "label": "BI-2405"
                },
                "startAngle": 149,
                "id": "M3",
                "_type": "PrivateTransportManeuverType"
              },
              {
                "position": {
                  "latitude": 43.3238447,
                  "longitude": -2.4926949
                },
                "instruction": "Continúe por <span class=\"number\">BI-2405</span>. <span class=\"distance-description\">Siga durante <span class=\"length\">4.6 km</span>.</span>",
                "travelTime": 315,
                "length": 4571,
                "firstPoint": 43,
                "lastPoint": 223,
                "note": [],
                "nextManeuver": "M5",
                "toLink": "-909177678",
                "boundingBox": {
                  "topLeft": {
                    "latitude": 43.3238447,
                    "longitude": -2.4926949
                  },
                  "bottomRight": {
                    "latitude": 43.3015716,
                    "longitude": -2.4772775
                  }
                },
                "shapeQuality": "exact",
                "direction": "forward",
                "action": "continue",
                "roadName": "Atxurra",
                "nextRoadName": "",
                "roadNumber": "BI-2405",
                "nextRoadNumber": "BI-2405",
                "trafficTime": 315,
                "baseTime": 315,
                "roadShield": {
                  "region": "ESP",
                  "category": "3",
                  "label": "BI-2405"
                },
                "startAngle": 149,
                "id": "M4",
                "_type": "PrivateTransportManeuverType"
              },
              {
                "position": {
                  "latitude": 43.3015716,
                  "longitude": -2.4783933
                },
                "instruction": "Continúe por <span class=\"next-street\">Barrio Ubilla Urberuaga</span> <span class=\"number\">(BI-2405)</span>. <span class=\"distance-description\">Siga durante <span class=\"length\">763 m</span>.</span>",
                "travelTime": 64,
                "length": 763,
                "firstPoint": 223,
                "lastPoint": 252,
                "note": [],
                "nextManeuver": "M6",
                "toLink": "-1238195842",
                "boundingBox": {
                  "topLeft": {
                    "latitude": 43.3015716,
                    "longitude": -2.4797666
                  },
                  "bottomRight": {
                    "latitude": 43.2969904,
                    "longitude": -2.4754214
                  }
                },
                "shapeQuality": "exact",
                "direction": "forward",
                "action": "continue",
                "roadName": "",
                "nextRoadName": "Barrio Ubilla Urberuaga",
                "roadNumber": "BI-2405",
                "nextRoadNumber": "BI-2405",
                "trafficTime": 64,
                "baseTime": 64,
                "roadShield": {
                  "region": "ESP",
                  "category": "3",
                  "label": "BI-2405"
                },
                "startAngle": 185,
                "id": "M5",
                "_type": "PrivateTransportManeuverType"
              },
              {
                "position": {
                  "latitude": 43.2969904,
                  "longitude": -2.4754214
                },
                "instruction": "Gire a la <span class=\"direction\">derecha</span> en <span class=\"next-street\">Barrio Ubilla Urberuaga</span> <span class=\"number\">(BI-633)</span>. <span class=\"distance-description\">Siga durante <span class=\"length\">4.0 km</span>.</span>",
                "travelTime": 291,
                "length": 3994,
                "firstPoint": 252,
                "lastPoint": 371,
                "note": [],
                "nextManeuver": "M7",
                "toLink": "-1218484943",
                "boundingBox": {
                  "topLeft": {
                    "latitude": 43.2969904,
                    "longitude": -2.4975228
                  },
                  "bottomRight": {
                    "latitude": 43.27299,
                    "longitude": -2.4754214
                  }
                },
                "shapeQuality": "exact",
                "direction": "right",
                "action": "rightTurn",
                "roadName": "Barrio Ubilla Urberuaga",
                "nextRoadName": "Barrio Ubilla Urberuaga",
                "roadNumber": "BI-2405",
                "nextRoadNumber": "BI-633",
                "trafficTime": 324,
                "baseTime": 291,
                "roadShield": {
                  "region": "ESP",
                  "category": "2",
                  "label": "BI-633"
                },
                "startAngle": 118,
                "id": "M6",
                "_type": "PrivateTransportManeuverType"
              },
              {
                "position": {
                  "latitude": 43.27299,
                  "longitude": -2.4975228
                },
                "instruction": "Gire a la <span class=\"direction\">izquierda</span> en dirección a <span class=\"sign\">Calle Beko-Benta</span>. <span class=\"distance-description\">Siga durante <span class=\"length\">20 m</span>.</span>",
                "travelTime": 5,
                "length": 20,
                "firstPoint": 371,
                "lastPoint": 373,
                "note": [],
                "nextManeuver": "M8",
                "toLink": "-77389318",
                "boundingBox": {
                  "topLeft": {
                    "latitude": 43.27299,
                    "longitude": -2.4975228
                  },
                  "bottomRight": {
                    "latitude": 43.2728291,
                    "longitude": -2.4974155
                  }
                },
                "shapeQuality": "exact",
                "direction": "left",
                "action": "leftTurn",
                "roadName": "",
                "nextRoadName": "",
                "roadNumber": "BI-633",
                "nextRoadNumber": "",
                "trafficTime": 5,
                "baseTime": 5,
                "startAngle": 203,
                "id": "M7",
                "_type": "PrivateTransportManeuverType"
              },
              {
                "position": {
                  "latitude": 43.2728291,
                  "longitude": -2.4974155
                },
                
// REDACTED FOR BREVITY
// REDACTED FOR BREVITY
// REDACTED FOR BREVITY
// REDACTED FOR BREVITY
              
        "incident": [
          {
            "validityPeriod": {
              "from": "2021-02-03T05:56:19Z",
              "until": "2021-02-12T06:11:28Z"
            },
            "text": "trabajos de construcción",
            "type": "roadworks",
            "criticality": 2,
            "firstPoint": 2110,
            "lastPoint": 2148
          }
        ],
        "label": [
          "A-10",
          "N-I"
        ],
        "zone": []
      }
    ],
    "language": "es-es"
  }
}

编辑

原来有一条允许卡车通行的道路,穿过那些 waypoints,但由于它包含通行费,因此有必要从参数 [=] 中删除 tollroad:-3 部分12=] 以便返回路由。