bnavetta / aurelia-polymer

Aurelia plugin to support Polymer
MIT License
18 stars 5 forks source link

google-map-markers issue with repeat.for #21

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi,

I'm experiencing some trouble combining repeat.for and google-map-marker. By adding the marker manually, the HTML structure is as follows:

<google-map>
   <iron-selector>
      <google-map-marker></google-map-marker>
      <google-map-marker></google-map-marker>
      <google-map-marker></google-map-marker>
   </iron-selector>
</google-map>

But using repeat.for, it is like this:

<google-map>
   <iron-selector></iron-selector>
   <google-map-marker></google-map-marker>
   <google-map-marker></google-map-marker>
   <google-map-marker></google-map-marker>
</google-map>

and the marker is not present on the map...

Has anyone faced the same problem?

bnavetta commented 7 years ago

There have been a bunch of issues with iron-selector and repeat.for - see #17 for some more discussion. Basically, Aurelia wraps things in a <template> element, which iron-selector is written to ignore. @HIRANO-Satoshi found a workaround that might help

bnavetta commented 7 years ago

The au-select workaround attribute is in master now, could you give that a try?

ghost commented 7 years ago

@roguePanda Thanks for the answer! But due to project requirements we'd switched to ESRI maps...

bnavetta commented 7 years ago

No problem!