The recent use of Baidu map to do projects, you need to use Baidu Map navigation route to draw two toll station traffic road map, because to use different colors to indicate the size of the flow. So we should first use the navigation function of Baidu map to find road routes, and then cover the line, so that set different colors, in order to more accurately find two toll station route, added toll station between the toll station, navigation out of the route on the emergence of a lot of Baidu from the beginning, end, through the points of the mark, resulting in a line chart can not , so to remove all of the Baidu map comes with the label, online find a lot of information did not say how to remove through the site, the back by looking at the structure of the callback method parameters, found the method.
Driving.setmarkerssetcallback (function (routes) {map.removeoverlay (routes[0].marker);
Map.removeoverlay (Routes[routes.length-1].marker);
for (Var m=1;m<routes.length-1;m++) {
var mm=routes[m]. Nm;
Map.removeoverlay (mm)
}
})