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

google-map markers property is not notifying #297

Open
thexs-dev opened this issue May 11, 2016 · 2 comments
Open

google-map markers property is not notifying #297

thexs-dev opened this issue May 11, 2016 · 2 comments

Comments

@thexs-dev
Copy link

When using a sample code as below

<google-map map="{{map}}" markers="{{markers}}">
  <template is="dom-repeat" items="{{locations}}">
    <google-map-marker latitude="{{item.latitude}}" longitude="{{item.longitude}}">
    </google-map-marker>
  </template>
</google-map>

markers changes are not visible outside google-map element, it always returns undefined

Just by adding notify:true within google-map element, markers property becomes available outside google-map element.

markers: {
        type: Array,
        value: function() { return []; },
        notify: true,
        readOnly: true
      },

Could you please, fix or report this issue to be fixed?
Thanks

@ebidel
Copy link
Contributor

ebidel commented May 11, 2016

What's the use case for notifying markers? Every property that notifies
hurts perf.

On Wed, May 11, 2016, 6:04 AM Fausto-theXS [email protected] wrote:

When using a sample code as below

markers changes are not visible outside google-map element, it always
returns undefined

Just by adding notify:true within google-map element, markers property
becomes available outside google-map element.

markers: {
type: Array,
value: function() { return []; },
notify: true,
readOnly: true
},

Could you please, fix or report this issue to be fixed?
Thanks


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#297

@thexs-dev
Copy link
Author

That's a good point

It's probably due to my still limited understanding. This is my use case:

  • I have a filter in the dom-repeat, that allows for hide/show locations in the map, depending on user interaction.
  • I need to work with the filtered array (subset of locations), and I am not aware of an easy way of having access to that filtered array. That's the reason I'd use markers
  • But, If I'd knew how to access the filtered array (corresponding with locations showing in the map), then I won't need to use markers, I guess

Any option for having that instead of markers?

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

2 participants