The HowTo example draws the lines in Shape layer, so you need to include such layer in order to use that approach. Please try appending the shape layer after all other layers and append the line to it.
This is the same code as the link-marker-to-location document, but with the tile layer added. It looks like linking markers by paths is not possible with a map tile layer present?
I tried adding a shape layer to my own code, but it seems the tile layer is still preventing the paths from showing. Is there any work around or is linking markers not possible currently?