none
Bing Maps - Current location as a waypoint in driving directions module

Answers

  • I've was able to solve the problem, although I don't know if this is the best way. I used the "User Location Example's" code Bing Maps V8 Web Control User Location :

                navigator.geolocation.getCurrentPosition(function (position) {
                    new Microsoft.Maps.Location(
                        position.coords.latitude,
                        position.coords.longitude);
                    var x = position.coords.latitude;
                    var y = position.coords.longitude;

    and then assigned x and y to the latitude and longitude parameters of the Waypoint 

                    var workWaypoint = new Microsoft.Maps.Directions.Waypoint({
                        address: 'Current Location', location: new Microsoft.Maps.Location(x, y)


    Paul1953

    • Marked as answer by Paul1953 Sunday, March 31, 2019 4:53 PM
    Sunday, March 31, 2019 4:53 PM