Why am I not getting 'Warning'-s included in my Route from the Bing Maps API -


the bing maps api can include 'warning' information part of each itineraryitem - things trafficflow, unpavedroad, , forth.

however, these warnings don't make part of returned route.

to recreate: in rest service toolkit test app, change route waypoint(s) in routebtn_clicked routine reflect route have warning included. (test routing on maps.bing.com - things crossing state boundary, traffic congestion, unpaved road, etc.). note there no warning-s in returned route. however, if paste raw rest call in browser, see warning information included in raw output.

it turns out there's error in json contract provided microsoft.

if change (in restservicemodels.cs):

    [datamember(name = "warning", emitdefaultvalue = false)]     public warning[] warning { get; set; } 

to (note s @ end of name)

    [datamember(name = "warnings", emitdefaultvalue = false)]     public warning[] warning { get; set; } 

then works expected.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -