Wed, 12/07/2016 - 06:26
#1
How to use Leaflet Directions API with routeType = bicycle
Hi there,
i´m using the leaflet plugin directions API and want to generate routings for bike. I tried it this way:
dir.route({
locations: [
{ latLng: { lat: #{reportBean.coworker.lat_home}, lng: #{reportBean.coworker.lon_home} }},
{ latLng: { lat: #{reportBean.coworker.lat_department}7, lng: #{reportBean.coworker.lon_department} }}
],
options: { routeType: ['bicycle'] }
});
But it´s apparently the wrong syntax to apply the routeType parameter. Has anybody used it successfully?
Thanks in advance
O.Martin
Wed, 12/07/2016 - 06:35
The routeType parameter only
The routeType parameter only takes one value so remove the square brackets and you should be good to go.