2

我将为路线的方向建立自己的风格,但只有当我使用带有属性的setRenderOptions方法时,我才能使用回调函数(事件)访问。itineraryContainerDirectionStepsafterStepRender

var directionsManager = new Microsoft.Maps.Directions.DirectionsManager(map);

// ...

directionsManager.setRenderOptions({ itineraryContainer: document.getElementById('itineraryDiv') });

是否有可能在呈现隐藏的 html 元素中的步骤的情况下获得具有所有 DirectionSteps 的对象?

4

1 回答 1

0

解决方案是使用 Bing Maps 中的 url 模板,请参阅文档:http: //msdn.microsoft.com/en-us/library/ff701717.aspx

http://dev.virtualearth.net/REST/v1/Routes?wayPoint.1=wayPoint1&viaWaypoint.2=viaWaypoint2&waypoint.3=wayPoint3&wayPoint.n=wayPointn&heading=heading&optimize=optimize&avoid=avoidOptions&distanceBeforeFirstTurn=distanceBeforeFirstTurn&maxSolutions=maxSolutions&routePathOutput=routePathOutput&tolerances=tolerance1,tolerance2,tolerancen&distanceUnit=distanceUnit&key=BingMapsKey
于 2013-06-28T08:56:41.053 回答