this._yMap - this.handleApiAvaliable this._mapElement - ref
I tried two options can not get customization
Through the dots:
addRoute = (startPoint, endPoint) => { if (this._yMap && this._mapElement) { this._yMap.route( [ startPoint, endPoint ], { mapStateAutoApply: true } ) .then(route => { this._route = route; this._route.getPaths().options.set({ strokeColor: "fa6600", opacity: 0.9 }); const points = this._route.getWayPoints(), lastPoint = points.getLength() - 1; points.get(0).properties.set('iconLayout', 'default#image'); points.get(0).properties.set('iconImageHref', objectMap); points.get(0).properties.set('iconImageSize', [33, 40]); points.get(0).properties.set('iconImageOffset', [-16, -20]); this._mapElement.geoObjects.add(route); }) } };
Setting options for the entire route
addRoute = (startPoint, endPoint) => { if (this._yMap && this._mapElement) { this._yMap.route( [ startPoint, endPoint ], { mapStateAutoApply: true } ) .then(route => { this._route = route; this._route.getPaths().options.set({ strokeColor: "fa6600", opacity: 0.9 }); this._route.getWayPoints().options.set({ wayPointStartIconLayout: 'default#image', wayPointFinishIconLayout: 'default#image', wayPointStartIconImageHref: objectMap, wayPointFinishIconImageHref: objectMapSelected, wayPointStartIconImageSize: [33, 40], wayPointFinishIconImageSize: [49, 60] }); this._mapElement.geoObjects.add(route); }) } };
Not so, not so no results?