question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement support for icons property of Google Maps Polyline object

See original GitHub issue

It appears that support for the icons property of Google Maps Polyline has been catered for somewhat (refer to interfaces https://angular-maps.com/api-docs/agm-core/interfaces/IconSequence.html#source line 242-247 where there is a definition of IconSequence). The IconSequence interface matches the required definition of the data the PolyLine object requires in its icons property (https://developers.google.com/maps/documentation/javascript/examples/overlay-symbol-dashed)

However the AgmPolyline directive does not contain an @Input() for the icons property so there does not seem to be a way (currently) to pass through the icons object which is necessary to create a dashed PolyLine.

It looks like a relatively simple change - I am happy to give it a go but need some guidance on my first time out updating a GH project.

Steps to reproduce and a minimal demo of the problem The below currently does nothing but I expect that once implemented this should be the correct code to pass through the icons data to the GM PolyLine [component]

public polyOptions:IconSequence = {
 icon: {
   path: 'M 0,-1 0,1',
   strokeOpacity: 1,
   scale: 4
 },
 offset: '0',
 repeat: '20px'
}

[Template]

<agm-polyline [icons]="polyOptions" ...></agm>

Expected/desired behavior Would be nice if we could pass through an icons object to the PolyLine.

angular2 & angular-google-maps version Angular Version: 6 AGM: @agm/core": “^1.0.0-beta.3”

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:12

github_iconTop GitHub Comments

2reactions
ziye201810commented, Feb 14, 2019

https://github.com/SebastianM/angular-google-maps/pull/1594

I create a pull request for “Implement support for icons property of Google Maps Polyline object”. waiting for merge approval.

2reactions
rohit-anejacommented, Feb 4, 2019

Need this too +1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implement support for icons property of Google Maps Polyline ...
I create a pull request for "Implement support for icons property of Google Maps Polyline object". waiting for merge approval.
Read more >
Symbols (Vector-Based Icons) | Maps JavaScript API
A Symbol is a vector-based icon that can be displayed on a Marker or a Polyline object. The symbol's shape is defined by...
Read more >
Google maps api v3.22 - how to add a custom icon as a png ...
Polyline accept a type of Array IconSequence who have a property named "icon" who accept google.maps.Symbol, no a google.maps.Icon!
Read more >
Google Maps Overlays - W3Schools
Overlays are objects on the map that are bound to latitude/longitude coordinates. Google Maps has several ... A polyline supports the following properties:....
Read more >
@react-google-maps/api - npm
if you need an access to map object, instead of ref prop, you need to use onLoad callback on <GoogleMap /> component. Before:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found