Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup templates and data binding question #51

Open
RossRothenstine opened this issue Oct 15, 2015 · 1 comment
Open

Popup templates and data binding question #51

RossRothenstine opened this issue Oct 15, 2015 · 1 comment

Comments

@RossRothenstine
Copy link

I cannot seem to get the popup to update when the data changes. Any suggestions?

Example HTML:

<dom-module id="x-app">
  <template>
    <leaflet-map>
      <leaflet-marker latitude="51.5" longitude="-0.09" title="Popup Demo">
        <p>Content <span>[[num]]</span></p>
        <!-- Num should be 2 after a while, but perpetually remains 1 -->
      </leaflet-marker>
    </leaflet-map>
  </template>
  <script>
    Polymer({
      is: 'x-app',
      properties: {
        num: {
          type: Number,
          value: 1
        }
      },
      ready: function () {
        this.async(function () { this.num++ }, 2000);
      }
    });
  </script>
</dom-module>
@ghost
Copy link

ghost commented Dec 22, 2015

The same to me. But, I use dom-repeat in order to represent diferent points that could be changed, however, they don't change neither latitudes nor longitudes.

<leaflet-map longitude="1.5" latitude="23.1" zoom="14">
   <template is="dom-repeat" items="{{positions}}" as="position">
      <leaflet-marker latitude="{{position.lat}}" longitude="{{position.long}}"></leaflet-marker>
   </template>
 </leaflet-map>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant