예제 #1
0
        public void GetTrafficIncidentDetail()
        {
            var am  = new AzureMapsToolkit.AzureMapsServices(_KEY);
            var req = new TrafficIncidentDetailRequest
            {
                Style          = TrafficIncidentTileStyle.s3,
                Boundingbox    = "6841263.950712,511972.674418,6886056.049288,582676.925582",
                BoundingZoom   = 11,
                Trafficmodelid = "1335294634919",
                Projection     = "EPSG900913"
            };

            var r = am.GetTrafficIncidentDetail(req).Result;

            Assert.Null(r.Error);
        }
예제 #2
0
        /// <summary>
        /// Traffic Incident Detail This API provides information on traffic incidents inside a given bounding box, based on the current Traffic Model ID. The Traffic Model ID is available to grant synchronization of data between calls and API's. The Traffic Model ID is a key value for determining the currency of traffic incidents. It is updated every minute, and is valid for two minutes before it times out. It is used in rendering incident tiles. It can be obtained from the Viewport API.
        /// </summary>
        /// <returns></returns>
        public virtual async Task <Response <TrafficIncidentDetailResult> > GetTrafficIncidentDetail(TrafficIncidentDetailRequest req)
        {
            var res = await ExecuteRequest <TrafficIncidentDetailResult, TrafficIncidentDetailRequest>
                          ("https://atlas.microsoft.com/traffic/incident/detail/json", req);

            return(res);
        }