You've been able to do this for ages. In 10.5, you can add bing maps via a one click operation.
Options>Toolbars>Web Services
Quote from the user guide:
Server-Side Authentication for WMS and WFS:
You can access WFS and WMS servers that require basic authentication using the built-in standard mechanism for internet servers. To connect to a WFS or WMS server that requires authentication, complete the Connect dialog box that displays.
10 user guide
Tips and tricks WMS
No plugin required
There is a core functionality XYZ Tile Server provider which was implemented with some other nice UX enhancements for tiled services (available since QGIS 2.18). This means, that there is no need for an external plugin although for an easy setup you can still use external plugins (see bottom of this post) and it offers various improvements over pure plugin based solutions.
In the browser panel, locate the Tile Server entry and right click it to add a new service.
Enter the URL of the service which you would like to use, replacing x, y and z parts with curly brackets substitution as can be seen below.
Double Click the newly created entry to add the layer to the map.
Layers added this way:
- Load faster
- Support reprojection
- Support printing
- Are cached in a powerful way
- Are compatible with QField
Some example URLs
OpenTopoMap
https://tile.opentopomap.org/{z}/{x}/{y}.png
(See comment below for attribution)
OpenStreetMap
http://tile.openstreetmap.org/{z}/{x}/{y}.png
Google Hybrid
https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}
Google Satellite
https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}
Google Road
https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}
(Codes for other tile types from Google found here)
Bing Aerial
http://ecn.t3.tiles.virtualearth.net/tiles/a{q}.jpeg?g=1
Configuration GUI
Since version 0.18.7 and in combination with QGIS >= 2.18.8 it's possible to use QuickMapServices as a very easy to use tool for configuring layers. Just check the "Use native renderer" checkbox (thanks @DmitryBaryshnikov)
Best Answer
Using Google Maps API v3 Directions you can achieve this road segment length using waypoints.
http://code.google.com/apis/maps/documentation/javascript/examples/directions-waypoints.html
To work out line length http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/3a9f3b83b941a2d7/06792073b2529413?lnk=gst&q=polyline+length#06792073b2529413