ebidel / geo-location

Web component element for the Geolocation API
https://webcomponents.org/element/ebidel/geo-location
86 stars 25 forks source link

Watch position when multiple geo-location elements #22

Closed rbellens closed 7 years ago

rbellens commented 7 years ago

When you add multiple geo-location elements with watch-pos in a single document, only one will effectively watch the position. The watch for the other elements is cleared. Is this on purpose?

Possible fix in this fork: https://github.com/appsup-polymer/geo-location

ebidel commented 7 years ago

Not on purpose!

The fix you have is correct. That is make https://github.com/ebidel/geo-location/blob/master/geo-location.html#L37 a member of the element so watch instance has its own state.

Feel free to submit a PR. I'm happy to take that change :)

rbellens commented 7 years ago

ok, great. see PR https://github.com/ebidel/geo-location/pull/23

FluorescentHallucinogen commented 7 years ago

23 is merged. I think this issue can be closed.