angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

Implement support for icons property of Google Maps Polyline object

Open marcorpsa opened this issue 8 years ago • 13 comments

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"

marcorpsa avatar Jul 23 '18 17:07 marcorpsa

Would love to see this feature.

tarikki avatar Sep 22 '18 08:09 tarikki

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 21 '18 09:12 stale[bot]

we need it too

hope4555 avatar Jan 15 '19 07:01 hope4555

need this.

ctmackay avatar Jan 16 '19 00:01 ctmackay

I think this should be reopened, it is a pretty useful feature that the lib is missing

tbnovaes avatar Jan 16 '19 17:01 tbnovaes

Need this too +1

rohit-aneja avatar Feb 04 '19 09:02 rohit-aneja

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.

ziye201810 avatar Feb 14 '19 03:02 ziye201810

Need this too +1

kezlee avatar Feb 21 '19 09:02 kezlee

Need this too +1

dave1981 avatar Mar 26 '19 07:03 dave1981

Need this

gokuldhas avatar Apr 01 '19 07:04 gokuldhas

When can we expect it? I need it as well.

zencakd avatar May 10 '19 11:05 zencakd

The issue is closed because it's a duplicate of #721, but keep in mind we are working on it

ghost avatar May 30 '19 20:05 ghost

const dottedPolyline = new window.google.maps.Polyline({
                path: item?.path,
                strokeColor: "#000",
                strokeWeight: 2,
                zIndex: 1,
                fillOpacity: 1,
                editable: true,
                 strokeOpacity: 0,
                icons: [
                  {
                    icon: {
                      path: window.google.maps.SymbolPath.CIRCLE,
                      scale: 3,
                      strokeColor: "#000",
                    },
                    offset: "0",
                    repeat: "9px",
                  },
                ],
              });
              dottedPolyline.setMap(maps);

daxdesai avatar May 07 '24 10:05 daxdesai