Implement Along the route with multiple routes

bala autade 1 Reputation point
2021-10-04T04:43:20.593+00:00

Hi Team,

We are working on one project, where we used Bing Maps for showing Multiple routes on the map and it works fine.

We try to implement the along the route with multiple routes, here we need to apply, this code on each route, one by one?

Can anyone guide us to implement this?

Thanks,

Vikas

Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
253 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. IoTGirl 3,051 Reputation points Microsoft Employee
    2021-10-04T17:33:20.737+00:00

    Hi Vikas,

    The source code is provided in the sample when you click through and you should be able to extend that to multiple routes. This sample turns the route into a polygon so you would end up with multiple polygons that you would need to process instead of just one.

    Sincerely,

    IoTGirl

    0 comments No comments

  2. bala autade 1 Reputation point
    2021-10-05T19:01:46.153+00:00

    Hi Team,

    Thank you for quick response.

    We have one question below:

    137828-capture.png

    how does this work with two routes that are very long from each other, should we need to execute the below line of code for each route (search area of route) differently to get along the route pushpins:

    var routePath = new Microsoft.Maps.Polyline(route.routePath);
    var searchArea = Microsoft.Maps.SpatialMath.Geometry.buffer(routePath, 1, Microsoft.Maps.Directions.DistanceUnit.miles);

    var intersectingPins = Microsoft.Maps.SpatialMath.Geometry.intersection(pins, searchArea);

    Thanks,
    Vikas

    0 comments No comments