It is good to have the information about the cycling paths and common routes on top of base maps; Google Maps offers this as an overlay layer.
Continuing from the previous recipe, Adding the traffic layer, will simplify our work, as we will only replace the
TransitLayer object with the
BicyclingLayer classes. Remember to copy the code of the original recipe.
The steps required for showing the cycling paths and routes are presented as follows:
TransitLayer, supplanting the
BicyclingLayerobject instead of the
var bicyclingLayer = ...