Search code examples
angulargoogle-mapspolylineangular-google-maps

How to add an overview polyline to my angular google maps


I am working with Angular Google Maps and specifically the Directions API and so I am able to see an overview polyline using the DirectionsService, but I don't understand how to implement that overview polyline in my agm window

I tried to use legs initially however that did not work as it just gave me functions which would have been overly complicated.


Solution

  • I am using Angular Google Maps (aka angular-maps.com -> agm/core) and tried to use the DirectionRenderer and DirectionService but it never worked for me. However I found a solution online where you can create a Directive and a package that helped you do the same thing.