none
Bings Map API needs getTMC, not described on documentation RRS feed

  • Question

  • I'm trying to use the Bings Map API, but keeps getting the error:

    getTMCs: This parameter value has an invalid format
    

    Looking through the doc's says nothing about the parameter getTMCs.

    Friday, February 19, 2016 2:21 PM

Answers

  • Ok, that's a REST service, and you are seeing an error that is returned by the service. Trying that request I see two error messages:

    <string>One or more parameters are not valid.</string>
    <string>getTMCs: This parameter value has an invalid format.</string>

    It looks like one of your parameter values is not a valid value and as a result it is causing something in the service to throw an error. Taking a look at the URL you provided I see several issues with the query you are making;

    • You left the "includeLocationCodes" placeholder in the URL, this should be true, false or not included at all (default is false).
    • The severity types that you have passed in are "setype2,typen". The documentation clearly shows that these should be a comma delimited list of numbers.

    http://rbrundritt.wordpress.com


    Friday, February 19, 2016 4:54 PM
  • This is the traffic incident service. If you see little triangles on the Bing maps site for traffic issues, those will be in this service. Traffic flow data is only shown on the map, the raw data is not exposed in any of the Bing maps services.


    http://rbrundritt.wordpress.com

    Sunday, February 21, 2016 3:50 AM

All replies

  • Which Bing maps API? Can you provide a code sample that reproduces this never seen or heard of this error. Suspect it may be something else in your app and the map control is just catching the error.

    http://rbrundritt.wordpress.com

    Friday, February 19, 2016 3:13 PM
  • Maps API Get Traffic Incidents, just trying to call:

    http://dev.virtualearth.net/REST/v1/Traffic/Incidents/45.219,-122.325,47.610,-122.107/includeLocationCodes?severity=setype2,typen&key=MY-API-KEY

    As the example in https://msdn.microsoft.com/en-us/library/hh441726.


    • Edited by Mr. Cloak Friday, February 19, 2016 4:08 PM
    Friday, February 19, 2016 4:03 PM
  • Ok, that's a REST service, and you are seeing an error that is returned by the service. Trying that request I see two error messages:

    <string>One or more parameters are not valid.</string>
    <string>getTMCs: This parameter value has an invalid format.</string>

    It looks like one of your parameter values is not a valid value and as a result it is causing something in the service to throw an error. Taking a look at the URL you provided I see several issues with the query you are making;

    • You left the "includeLocationCodes" placeholder in the URL, this should be true, false or not included at all (default is false).
    • The severity types that you have passed in are "setype2,typen". The documentation clearly shows that these should be a comma delimited list of numbers.

    http://rbrundritt.wordpress.com


    Friday, February 19, 2016 4:54 PM
  • I see, so a bit more like this?:

    http://dev.virtualearth.net/REST/v1/Traffic/Incidents/45.219,-122.325,47.610,-122.107/false?severity=1,2,3,4&type=2&key=MY-API-KEY

    Saturday, February 20, 2016 11:07 AM
  • Trying to call it around my area in Copenhagen, Denmark doesn't return anything - nor any error:

    http://dev.virtualearth.net/REST/v1/Traffic/Incidents/11,54,13,56?key=MY-API-KEY

    ...

    "resourceSets":[{"estimatedTotal":0,"resources":[]}],"statusCode":200,"statusDescription":"OK"...

    But looking Copenhagen on Bing Maps does show congestion some places. Shouldn't that appear in the result from the API call?

    Saturday, February 20, 2016 11:33 AM
  • This is the traffic incident service. If you see little triangles on the Bing maps site for traffic issues, those will be in this service. Traffic flow data is only shown on the map, the raw data is not exposed in any of the Bing maps services.


    http://rbrundritt.wordpress.com

    Sunday, February 21, 2016 3:50 AM