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

_setMarkers not defined #377

Open
cmalagar opened this issue Aug 2, 2017 · 2 comments
Open

_setMarkers not defined #377

cmalagar opened this issue Aug 2, 2017 · 2 comments

Comments

@cmalagar
Copy link

cmalagar commented Aug 2, 2017

Hi,

Someone correct if I am overlooking something, but it looks like the "markers" attribute is not getting populated with the current markers added on the page. The markers should be set in _updateMarkers where _setMarkers(newMarkers) is called, but that function is not set anywhere and the markers attribute still returns an empty list of markers when that attribute is referenced.

@ammopt
Copy link

ammopt commented Aug 25, 2017

Hello @cmalagar,

I was having the same problem until I figured you have to declare the google-map-marker as:

<google-map-marker slot="markers" draggable="true" latitude="whatever" longitude="whatever"></google-map-marker>

Notice the slot="markers" property. After that, my markers array is populated. You can see it in commit 361d389
This was the issue for me, at least.

Have a good one.

@JohnRiv
Copy link

JohnRiv commented Mar 29, 2018

Thanks for figuring this out! Note this solution appears to need #354 to be merged in to work, otherwise you get this error:

Uncaught TypeError: Cannot set property markers of #<google-map> which has only a getter

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

3 participants