google maps - Polyline is draw straight instead of proper driving directions route path from point A to B -
i using angular2-google-maps plugin angular2
i have 2 points & b.
i trying draw polyline, draws straight line instead of proper driving directions route.
here plunker:
http://plnkr.co/edit/uz8dz0zb4ea8cjte6wym?p=preview
main code:
<sebm-google-map [latitude]="49.0096941" [longitude]="2.5457305" [zoom]="10"> <sebm-google-map-polyline> <sebm-google-map-polyline-point [latitude]="49.0096941" [longitude]="2.5457305"> </sebm-google-map-polyline-point> <sebm-google-map-polyline-point [latitude]="48.9688538" [longitude]="2.5375751"> </sebm-google-map-polyline-point> </sebm-google-map-polyline> </sebm-google-map>
can identify issue if any? because following docs
you'll need call directions service driving directions between 2 coordinates, response include polyline can display on map.
angular2-google-map doesn't include directive directions service itself, see plenty of example directives available in github issue should point in right direction.
Comments
Post a Comment